Class: OpenAI::Models::Graders::ScoreModelGrader
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Graders::ScoreModelGrader
- Defined in:
- lib/openai/models/graders/score_model_grader.rb,
sig/openai/models/graders/score_model_grader.rbs
Direct Known Subclasses
EvalCreateParams::TestingCriterion::ScoreModel, EvalCreateResponse::TestingCriterion::EvalGraderScoreModel, EvalListResponse::TestingCriterion::EvalGraderScoreModel, EvalRetrieveResponse::TestingCriterion::EvalGraderScoreModel, EvalUpdateResponse::TestingCriterion::EvalGraderScoreModel
Defined Under Namespace
Classes: Input, SamplingParams
Instance Attribute Summary collapse
-
#input ⇒ ::Array[OpenAI::Graders::ScoreModelGrader::Input]
The input messages evaluated by the grader.
-
#model ⇒ String
The model to use for the evaluation.
-
#name ⇒ String
The name of the grader.
-
#range ⇒ ::Array[Float]?
The service requires two numbers for the score range.
-
#sampling_params ⇒ OpenAI::Graders::ScoreModelGrader::SamplingParams?
The sampling parameters for the model.
-
#type ⇒ :score_model
The object type, which is always
score_model.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ScoreModelGrader
constructor
A new instance of ScoreModelGrader.
- #to_hash ⇒ { input: ::Array[OpenAI::Graders::ScoreModelGrader::Input], model: String, name: String, ?type: :score_model, ?range: ::Array[Float], ?sampling_params: OpenAI::Graders::ScoreModelGrader::SamplingParams }
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 ⇒ ScoreModelGrader
Returns a new instance of ScoreModelGrader.
57 58 59 60 61 62 63 64 |
# File 'sig/openai/models/graders/score_model_grader.rbs', line 57
def initialize: (
input: ::Array[OpenAI::Graders::ScoreModelGrader::Input],
model: String,
name: String,
?range: ::Array[Float],
?sampling_params: OpenAI::Graders::ScoreModelGrader::SamplingParams,
?type: :score_model
) -> void
|
Instance Attribute Details
#input ⇒ ::Array[OpenAI::Graders::ScoreModelGrader::Input]
The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.
12 |
# File 'lib/openai/models/graders/score_model_grader.rb', line 12 required :input, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Graders::ScoreModelGrader::Input] } |
#model ⇒ String
The model to use for the evaluation.
18 |
# File 'lib/openai/models/graders/score_model_grader.rb', line 18 required :model, String |
#name ⇒ String
The name of the grader.
24 |
# File 'lib/openai/models/graders/score_model_grader.rb', line 24 required :name, String |
#range ⇒ ::Array[Float]?
The service requires two numbers for the score range. Defaults to [0, 1].
36 |
# File 'lib/openai/models/graders/score_model_grader.rb', line 36 optional :range, OpenAI::Internal::Type::ArrayOf[Float] |
#sampling_params ⇒ OpenAI::Graders::ScoreModelGrader::SamplingParams?
The sampling parameters for the model.
42 |
# File 'lib/openai/models/graders/score_model_grader.rb', line 42 optional :sampling_params, -> { OpenAI::Graders::ScoreModelGrader::SamplingParams } |
#type ⇒ :score_model
The object type, which is always score_model.
30 |
# File 'lib/openai/models/graders/score_model_grader.rb', line 30 required :type, const: :score_model |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/graders/score_model_grader.rb', line 215
|
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 }
66 67 68 69 70 71 72 73 |
# File 'sig/openai/models/graders/score_model_grader.rbs', line 66
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
}
|