Class: OpenAI::Models::ComparisonFilter

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

Defined Under Namespace

Modules: Type, Value

Instance Attribute Summary collapse

Class Method 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(key: , type: , value: ) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::ComparisonFilter for more details.

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

Parameters:

  • key (String) (defaults to: )

    The key to compare against the value.

  • type (Symbol, OpenAI::Models::ComparisonFilter::Type) (defaults to: )

    Specifies the comparison operator: ‘eq`, `ne`, `gt`, `gte`, `lt`, `lte`.

  • value (String, Float, Boolean) (defaults to: )

    The value to compare against the attribute key; supports string, number, or bool



# File 'lib/openai/models/comparison_filter.rb', line 32

Instance Attribute Details

#keyString

The key to compare against the value.

Returns:

  • (String)


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

required :key, String

#typeSymbol, OpenAI::Models::ComparisonFilter::Type

Specifies the comparison operator: ‘eq`, `ne`, `gt`, `gte`, `lt`, `lte`.

  • ‘eq`: equals

  • ‘ne`: not equal

  • ‘gt`: greater than

  • ‘gte`: greater than or equal

  • ‘lt`: less than

  • ‘lte`: less than or equal



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

required :type, enum: -> { OpenAI::ComparisonFilter::Type }

#valueString, ...

The value to compare against the attribute key; supports string, number, or boolean types.

Returns:



30
# File 'lib/openai/models/comparison_filter.rb', line 30

required :value, union: -> { OpenAI::ComparisonFilter::Value }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/comparison_filter.rb', line 65