Class: OpenAI::Models::Responses::FileSearchTool

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

Defined Under Namespace

Modules: Filters Classes: RankingOptions

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(vector_store_ids:, filters: nil, max_num_results: nil, ranking_options: nil, type: :file_search) ⇒ Object

Parameters:

  • vector_store_ids —

    The IDs of the vector stores to search.

  • filters (defaults to: nil) —

    A filter to apply.

  • max_num_results (defaults to: nil) —

    The maximum number of results to return. This number should be between 1 and 50 inclusive.

  • ranking_options (defaults to: nil) —

    Ranking options for search.

  • type (defaults to: :file_search) —

    The type of the file search tool. Always file_search.



# File 'lib/openai/models/responses/file_search_tool.rb', line 38

Instance Attribute Details

#filters ⇒ OpenAI::Models::Responses::FileSearchTool::filters?

A filter to apply.

Returns:

  • (OpenAI::Models::Responses::FileSearchTool::filters, nil)


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

optional :filters, union: -> { OpenAI::Responses::FileSearchTool::Filters }, nil?: true

#max_num_results ⇒ Integer?

The maximum number of results to return. This number should be between 1 and 50 inclusive.

Returns:

  • (Integer, nil)


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

optional :max_num_results, Integer

#ranking_options ⇒ OpenAI::Responses::FileSearchTool::RankingOptions?

Ranking options for search.

Returns:

  • (OpenAI::Responses::FileSearchTool::RankingOptions, nil)


36
# File 'lib/openai/models/responses/file_search_tool.rb', line 36

optional :ranking_options, -> { OpenAI::Responses::FileSearchTool::RankingOptions }

#type ⇒ :file_search

The type of the file search tool. Always file_search.

Returns:

  • (:file_search)


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

required :type, const: :file_search

#vector_store_ids ⇒ ::Array[String]

The IDs of the vector stores to search.

Returns:

  • (::Array[String])


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

required :vector_store_ids, OpenAI::Internal::Type::ArrayOf[String]

Class Method Details

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



# File 'lib/openai/models/responses/file_search_tool.rb', line 71

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


58
# File 'sig/openai/models/responses/file_search_tool.rbs', line 58

def to_hash: -> {