Skip to content

Function: fileSearchTool()

@providerprotocol/ai


@providerprotocol/ai / openai / 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.

Configuration including vector store IDs and search options

Record<string, unknown>

number

{ ranker?: "auto" | "default_2024_08_21"; score_threshold?: number; }

"auto" | "default_2024_08_21"

number

string[]

OpenAIFileSearchTool

A file search tool configuration object

const fileSearch = fileSearchTool({
vector_store_ids: ['vs_abc123'],
max_num_results: 10
});