Hosted vector store search tool for searching indexed documents.
This tool integrates with OpenAI's vector store file search capabilities, allowing searches across indexed documents with optional filtering and ranking.
Options
Options can be passed during registration or via context metadata:
:searcher- Required callback function to execute the search:vector_store_ids- List of vector store IDs to search:filters- Search filters to apply:ranking_options- Options for result ranking:include_search_results- Whether to include full search results
Usage
searcher = fn args, _ctx, _meta ->
{:ok, %{results: [%{text: args["query"]}]}}
end
{:ok, _} = Codex.Tools.register(VectorStoreSearchTool,
searcher: searcher,
vector_store_ids: ["vs_123"]
)