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

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

Defined Under Namespace

Modules: Filters Classes: RankingOptions

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

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

A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](platform.openai.com/docs/guides/tools-file-search).

Parameters:



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

Instance Attribute Details

#filtersOpenAI::Models::ComparisonFilter, ...

A filter to apply.



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

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

#max_num_resultsInteger?

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_optionsOpenAI::Models::Responses::FileSearchTool::RankingOptions?

Ranking options for search.



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

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

#typeSymbol, :file_search

The type of the file search tool. Always ‘file_search`.

Returns:

  • (Symbol, :file_search)


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

required :type, const: :file_search

#vector_store_idsArray<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

.variantsArray(OpenAI::Models::ComparisonFilter, OpenAI::Models::CompoundFilter)



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