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

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

Defined Under Namespace

Modules: Operation

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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

A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.

Parameters:

  • The input text. This may include template strings.

  • The name of the grader.

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

  • The reference text. This may include template strings.

  • (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

#inputString

The input text. This may include template strings.

Returns:



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

required :input, String

#nameString

The name of the grader.

Returns:



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

required :name, String

#operationSymbol, OpenAI::Models::Graders::StringCheckGrader::Operation

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

Returns:



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

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

#referenceString

The reference text. This may include template strings.

Returns:



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

required :reference, String

#typeSymbol, :string_check

The object type, which is always string_check.

Returns:



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

required :type, const: :string_check