Class: OpenAI::Models::CompoundFilter

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

Defined Under Namespace

Modules: Filter, Type

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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(filters:, type:) ⇒ Object

Parameters:

  • filters —

    Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.

  • type —

    Type of operation: and or or.



# File 'lib/openai/models/compound_filter.rb', line 19

Instance Attribute Details

#filters ⇒ ::Array[OpenAI::Models::CompoundFilter::filter]

Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.

Returns:

  • (::Array[OpenAI::Models::CompoundFilter::filter])


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

required :filters, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::CompoundFilter::Filter] }

#type ⇒ OpenAI::Models::CompoundFilter::type_

Type of operation: and or or.

Returns:

  • (OpenAI::Models::CompoundFilter::type_)


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

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

Class Method Details

.variants ⇒ Array(OpenAI::Models::ComparisonFilter, Object)

Returns:



# File 'lib/openai/models/compound_filter.rb', line 39

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


27
# File 'sig/openai/models/compound_filter.rbs', line 27

def to_hash: -> {