Class: OpenAI::Models::Graders::StringCheckGrader

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

Defined Under Namespace

Modules: Operation

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:, name:, operation:, reference:, type: :string_check) ⇒ Object

Parameters:

  • input —

    The input text. This may include template strings.

  • name —

    The name of the grader.

  • operation —

    The string check operation to perform. One of eq, ne, like, or ilike.

  • reference —

    The reference text. This may include template strings.

  • type (defaults to: :string_check) —

    The object type, which is always string_check.



# File 'lib/openai/models/graders/string_check_grader.rb', line 37


Instance Attribute Details

#input ⇒ String

The input text. This may include template strings.

Returns:

  • (String)


11
# File 'lib/openai/models/graders/string_check_grader.rb', line 11

required :input, String

#name ⇒ String

The name of the grader.

Returns:

  • (String)


17
# File 'lib/openai/models/graders/string_check_grader.rb', line 17

required :name, String

#operation ⇒ OpenAI::Models::Graders::StringCheckGrader::operation

The string check operation to perform. One of eq, ne, like, or ilike.

Returns:

  • (OpenAI::Models::Graders::StringCheckGrader::operation)


23
# File 'lib/openai/models/graders/string_check_grader.rb', line 23

required :operation, enum: -> { OpenAI::Graders::StringCheckGrader::Operation }

#reference ⇒ String

The reference text. This may include template strings.

Returns:

  • (String)


29
# File 'lib/openai/models/graders/string_check_grader.rb', line 29

required :reference, String

#type ⇒ :string_check

The object type, which is always string_check.

Returns:

  • (:string_check)


35
# File 'lib/openai/models/graders/string_check_grader.rb', line 35

required :type, const: :string_check

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


49
# File 'sig/openai/models/graders/string_check_grader.rbs', line 49

def to_hash: -> {