//#region src/tools/collections_search.ts
/**
* xAI Collections Search tool type constant.
* Note: The Responses API uses "file_search" as the type name.
*/
const XAI_COLLECTIONS_SEARCH_TOOL_TYPE = "file_search";
/**
* Creates an xAI collections search tool.
* Enables the model to search through your uploaded knowledge bases (collections)
* to retrieve relevant information from your documents.
*
* This tool is executed server-side by the xAI API as part of the agentic
* tool calling workflow.
*
* @param options - Configuration options for the collections search tool
* @returns An XAICollectionsSearchTool object to pass to the model
*
* @example Basic usage with collection IDs
* ```typescript
* import { ChatXAIResponses, tools } from "@langchain/xai";
*
* const llm = new ChatXAIResponses({
*   model: "grok-4-1-fast",
* });
*
* const collectionsSearch = tools.xaiCollectionsSearch({
*   vectorStoreIds: ["collection_abc123"],
* });
*
* const result = await llm.invoke(
*   "What are the key findings in the Q3 report?",
*   { tools: [collectionsSearch] }
* );
* ```
*
* @example Combining with other tools for hybrid analysis
* ```typescript
* const collectionsSearch = tools.xaiCollectionsSearch({
*   vectorStoreIds: ["collection_sec_filings"],
* });
* const webSearch = tools.xaiWebSearch();
* const codeExecution = tools.xaiCodeExecution();
*
* const result = await llm.invoke(
*   "Based on our internal SEC filings, what is the market sentiment on our performance?",
*   { tools: [collectionsSearch, webSearch, codeExecution] }
* );
* ```
*/
function xaiCollectionsSearch(options = {}) {
	const tool = { type: XAI_COLLECTIONS_SEARCH_TOOL_TYPE };
	if (options.vectorStoreIds !== void 0) tool.vector_store_ids = options.vectorStoreIds;
	return tool;
}

//#endregion
export { XAI_COLLECTIONS_SEARCH_TOOL_TYPE, xaiCollectionsSearch };
//# sourceMappingURL=collections_search.js.map