Class: OpenAI::Resources::FineTuning::Alpha::Graders

Inherits:
Object
  • Object
show all
Defined in:
lib/openai/resources/fine_tuning/alpha/graders.rb

Overview

Manage fine-tuning jobs to tailor a model to your specific training data.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Graders

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Graders.

Parameters:

API:

  • private



63
64
65
# File 'lib/openai/resources/fine_tuning/alpha/graders.rb', line 63

def initialize(client:)
  @client = client
end

Instance Method Details

#run(grader:, model_sample:, item: nil, request_options: {}) ⇒ OpenAI::Models::FineTuning::Alpha::GraderRunResponse

Some parameter documentations has been truncated, see Models::FineTuning::Alpha::GraderRunParams for more details.

Run a grader.

See Also:

Parameters:

  • The grader used for the fine-tuning job.

  • The model sample to be evaluated. This value will be used to populate

  • The dataset item provided to the grader. This will be used to populate

Returns:



27
28
29
30
31
32
33
34
35
36
# File 'lib/openai/resources/fine_tuning/alpha/graders.rb', line 27

def run(params)
  parsed, options = OpenAI::FineTuning::Alpha::GraderRunParams.dump_request(params)
  @client.request(
    method: :post,
    path: "fine_tuning/alpha/graders/run",
    body: parsed,
    model: OpenAI::Models::FineTuning::Alpha::GraderRunResponse,
    options: options
  )
end

#validate(grader:, request_options: {}) ⇒ OpenAI::Models::FineTuning::Alpha::GraderValidateResponse

Validate a grader.

See Also:

Parameters:

  • The grader used for the fine-tuning job.

Returns:



49
50
51
52
53
54
55
56
57
58
# File 'lib/openai/resources/fine_tuning/alpha/graders.rb', line 49

def validate(params)
  parsed, options = OpenAI::FineTuning::Alpha::GraderValidateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "fine_tuning/alpha/graders/validate",
    body: parsed,
    model: OpenAI::Models::FineTuning::Alpha::GraderValidateResponse,
    options: options
  )
end