Function: fileSearchTool()
@providerprotocol/ai / openai / fileSearchTool
Function: fileSearchTool()
Section titled “Function: fileSearchTool()”fileSearchTool(
options):OpenAIFileSearchTool
Defined in: src/providers/openai/types.ts:1378
Creates a file search tool configuration for the Responses API.
The file search tool enables the model to search through files in vector stores.
Parameters
Section titled “Parameters”options
Section titled “options”Configuration including vector store IDs and search options
filters?
Section titled “filters?”Record<string, unknown>
max_num_results?
Section titled “max_num_results?”number
ranking_options?
Section titled “ranking_options?”{ ranker?: "auto" | "default_2024_08_21"; score_threshold?: number; }
ranking_options.ranker?
Section titled “ranking_options.ranker?”"auto" | "default_2024_08_21"
ranking_options.score_threshold?
Section titled “ranking_options.score_threshold?”number
vector_store_ids
Section titled “vector_store_ids”string[]
Returns
Section titled “Returns”A file search tool configuration object
Example
Section titled “Example”const fileSearch = fileSearchTool({ vector_store_ids: ['vs_abc123'], max_num_results: 10});