Class: OpenAI::Models::Graders::LabelModelGrader

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

Defined Under Namespace

Classes: 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

#initializeObject

Parameters:

  • labels

    The labels to assign 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

    The object type, which is always label_model.



44
# File 'sig/openai/models/graders/label_model_grader.rbs', line 44

def initialize: (

Instance Attribute Details

#inputArray<OpenAI::Models::Graders::LabelModelGrader::Input>

Parameters:

  • value (::Array[OpenAI::Graders::LabelModelGrader::Input])

Returns:



10
# File 'lib/openai/models/graders/label_model_grader.rb', line 10

required :input, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Graders::LabelModelGrader::Input] }

#labels::Array[String]

The labels to assign to each item in the evaluation.

Returns:

  • (::Array[String])


16
# File 'lib/openai/models/graders/label_model_grader.rb', line 16

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

#modelString

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

Returns:

  • (String)


22
# File 'lib/openai/models/graders/label_model_grader.rb', line 22

required :model, String

#nameString

The name of the grader.

Returns:

  • (String)


28
# File 'lib/openai/models/graders/label_model_grader.rb', line 28

required :name, String

#passing_labels::Array[String]

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

Returns:

  • (::Array[String])


34
# File 'lib/openai/models/graders/label_model_grader.rb', line 34

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

#type:label_model

The object type, which is always label_model.

Returns:

  • (:label_model)


40
# File 'lib/openai/models/graders/label_model_grader.rb', line 40

required :type, const: :label_model

Instance Method Details

#to_hash{

Returns:

  • ({)


53
# File 'sig/openai/models/graders/label_model_grader.rbs', line 53

def to_hash: -> {