Class: OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/eval_create_params.rb,
sig/openai/models/eval_create_params.rbs

Defined Under Namespace

Modules: Input

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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:, labels:, model:, name:, passing_labels:, type: :label_model) ⇒ Object

Parameters:

  • input

    A list of chat messages forming the prompt or context. May include variable references to the item namespace, ie OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel.{item{item.name}.

  • labels

    The labels to classify to each item in the evaluation.

  • model

    The model to use for the evaluation. Must support structured outputs.

  • name

    The name of the grader.

  • passing_labels

    The labels that indicate a passing result. Must be a subset of labels.

  • type (defaults to: :label_model)

    The object type, which is always label_model.



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

Instance Attribute Details

#input::Array[OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::input]

A list of chat messages forming the prompt or context. May include variable references to the item namespace, ie OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel.{item{item.name}.

Returns:

  • (::Array[OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::input])


210
211
212
213
214
215
# File 'lib/openai/models/eval_create_params.rb', line 210

required(
  :input,
  -> {
    OpenAI::Internal::Type::ArrayOf[union: OpenAI::EvalCreateParams::TestingCriterion::LabelModel::Input]
  }
)

#labels::Array[String]

The labels to classify to each item in the evaluation.

Returns:

  • (::Array[String])


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

required :labels, OpenAI::Internal::Type::ArrayOf[String]

#modelString

The model to use for the evaluation. Must support structured outputs.

Returns:

  • (String)


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

required :model, String

#nameString

The name of the grader.

Returns:

  • (String)


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

required :name, String

#passing_labels::Array[String]

The labels that indicate a passing result. Must be a subset of labels.

Returns:

  • (::Array[String])


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

required :passing_labels, OpenAI::Internal::Type::ArrayOf[String]

#type:label_model

The object type, which is always label_model.

Returns:

  • (:label_model)


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

required :type, const: :label_model

Instance Method Details

#to_hash{

Returns:

  • ({)


237
# File 'sig/openai/models/eval_create_params.rbs', line 237

def to_hash: -> {