adk-typescript
Version:
TypeScript port of Google's Agent Development Kit (ADK)
72 lines (71 loc) • 2.44 kB
TypeScript
import { BaseTool } from './BaseTool';
import { ToolContext } from './ToolContext';
/**
* Options for the Vertex AI Search tool
*/
export interface VertexAISearchToolOptions {
/**
* The Vertex AI search data store resource ID in the format of
* "projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}".
*/
dataStoreId?: string;
/**
* The Vertex AI search engine resource ID in the format of
* "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}".
*/
searchEngineId?: string;
}
/**
* A built-in tool that uses Vertex AI Search.
*/
export declare class VertexAISearchTool extends BaseTool {
/**
* The Vertex AI search data store resource ID
*/
private dataStoreId?;
/**
* The Vertex AI search engine resource ID
*/
private searchEngineId?;
/**
* Create a new Vertex AI Search tool
*
* @param options Options for the Vertex AI Search tool
*/
constructor(options: VertexAISearchToolOptions);
/**
* Process the LLM request to enable Vertex AI Search capability
*
* @param params Parameters for processing
* @param params.toolContext The tool context
* @param params.llmRequest The LLM request to process
*/
processLlmRequest({ toolContext, llmRequest }: {
toolContext: ToolContext;
llmRequest: any;
}): Promise<void>;
/**
* Execute the Vertex AI Search tool
*
* This is a placeholder as the actual execution happens internally in the model.
*
* @param params The parameters for tool execution
* @param context The context for tool execution
* @returns A placeholder response
*/
execute(params: Record<string, any>, context: ToolContext): Promise<any>;
}
/**
* Creates a new Vertex AI Search tool with the provided data store ID
*
* @param dataStoreId The Vertex AI search data store resource ID
* @returns A new Vertex AI Search tool instance
*/
export declare function createVertexAISearchToolWithDataStore(dataStoreId: string): VertexAISearchTool;
/**
* Creates a new Vertex AI Search tool with the provided search engine ID
*
* @param searchEngineId The Vertex AI search engine resource ID
* @returns A new Vertex AI Search tool instance
*/
export declare function createVertexAISearchToolWithEngine(searchEngineId: string): VertexAISearchTool;