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

  • input (String) (defaults to: )

    The input text. This may include template strings.

  • name (String) (defaults to: )

    The name of the grader.

  • operation (Symbol, OpenAI::Models::Graders::StringCheckGrader::Operation) (defaults to: )

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

  • reference (String) (defaults to: )

    The reference text. This may include template strings.

  • type (Symbol, :string_check) (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:

  • (String)


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

required :input, String

#nameString

The name of the grader.

Returns:

  • (String)


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`.



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:

  • (String)


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:

  • (Symbol, :string_check)


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

required :type, const: :string_check