Class: OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/beta_file_search_tool.rb,
sig/openai/models/beta/beta_file_search_tool.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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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:) ⇒ CompoundFilter

Returns a new instance of CompoundFilter.

Parameters:

  • filters —

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

  • type —

    Type of operation: and or or.

  • filters: (::Array[OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::filter])
  • type: (OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::type_)


# File 'lib/openai/models/beta/beta_file_search_tool.rb', line 215

Instance Attribute Details

#filters ⇒ ::Array[OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::filter]

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

Returns:

  • (::Array[OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::filter])


200
201
202
203
204
205
206
207
# File 'lib/openai/models/beta/beta_file_search_tool.rb', line 200

required(
  :filters,
  -> {
    OpenAI::Internal::Type::ArrayOf[
      union: OpenAI::Beta::BetaFileSearchTool::Filters::CompoundFilter::Filter
    ]
  }
)

#type ⇒ OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::type_

Type of operation: and or or.

Returns:

  • (OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::type_)


213
# File 'lib/openai/models/beta/beta_file_search_tool.rb', line 213

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

Class Method Details

.variants ⇒ Array(OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::Filter::ComparisonFilter, Object)



# File 'lib/openai/models/beta/beta_file_search_tool.rb', line 370

Instance Method Details

#to_hash ⇒ { filters: ::Array[OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::filter], type: OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::type_ }

Returns:

  • ({ filters: ::Array[OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::filter], type: OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::type_ })


196
197
198
199
# File 'sig/openai/models/beta/beta_file_search_tool.rbs', line 196

def to_hash: -> {
  filters: ::Array[OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::filter],
  type: OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::type_
}