Class: OpenAI::Models::EvalCreateParams::TestingCriterion::ScoreModel

Inherits:
Graders::ScoreModelGrader show all
Defined in:
lib/openai/models/eval_create_params.rb,
sig/openai/models/eval_create_params.rbs

Instance Attribute Summary collapse

Attributes inherited from Graders::ScoreModelGrader

#input, #model, #name, #range, #sampling_params, #type

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Graders::ScoreModelGrader

values

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(input:, model:, name:, range: nil, sampling_params: nil, pass_threshold: nil, type: :score_model) ⇒ ScoreModel

Returns a new instance of ScoreModel.

Parameters:

  • input —

    The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.

  • model —

    The model to use for the evaluation.

  • name —

    The name of the grader.

  • range (defaults to: nil) —

    The service requires two numbers for the score range. Defaults to [0, 1].

  • sampling_params (defaults to: nil) —

    The sampling parameters for the model.

  • pass_threshold (defaults to: nil) —

    The threshold for the score.

  • type (defaults to: :score_model) —

    The object type, which is always score_model.

  • input: (::Array[OpenAI::Graders::ScoreModelGrader::Input])
  • model: (String)
  • name: (String)
  • range: (::Array[Float]) (defaults to: nil)
  • sampling_params: (OpenAI::Graders::ScoreModelGrader::SamplingParams) (defaults to: nil)
  • pass_threshold: (Float) (defaults to: nil)
  • type: (:score_model) (defaults to: :score_model)


# File 'lib/openai/models/eval_create_params.rb', line 539

Instance Attribute Details

#pass_threshold ⇒ Float?

The threshold for the score.

Returns:

  • (Float, nil)


537
# File 'lib/openai/models/eval_create_params.rb', line 537

optional :pass_threshold, Float

Instance Method Details

#to_hash ⇒ { input: ::Array[OpenAI::Graders::ScoreModelGrader::Input], model: String, name: String, ?type: :score_model, ?range: ::Array[Float], ?sampling_params: OpenAI::Graders::ScoreModelGrader::SamplingParams, ?pass_threshold: Float }

Returns:

  • ({ input: ::Array[OpenAI::Graders::ScoreModelGrader::Input], model: String, name: String, ?type: :score_model, ?range: ::Array[Float], ?sampling_params: OpenAI::Graders::ScoreModelGrader::SamplingParams, ?pass_threshold: Float })


594
595
596
597
598
599
600
601
602
# File 'sig/openai/models/eval_create_params.rbs', line 594

def to_hash: -> {
  input: ::Array[OpenAI::Graders::ScoreModelGrader::Input],
  model: String,
  name: String,
  ?type: :score_model,
  ?range: ::Array[Float],
  ?sampling_params: OpenAI::Graders::ScoreModelGrader::SamplingParams,
  ?pass_threshold: Float
}