UNPKG

adk-typescript

Version:

TypeScript port of Google's Agent Development Kit (ADK)

36 lines (35 loc) 1.12 kB
import { BaseRetrievalTool, RetrievalToolOptions } from './BaseRetrievalTool'; import { ToolContext } from '../ToolContext'; /** * Options for creating a LlamaIndex retrieval tool */ export interface LlamaIndexRetrievalOptions extends RetrievalToolOptions { /** * The LlamaIndex retriever to use */ retriever: any; } /** * Retrieval tool that uses LlamaIndex to retrieve information */ export declare class LlamaIndexRetrieval extends BaseRetrievalTool { /** * The LlamaIndex retriever */ private retriever; /** * Create a new LlamaIndex retrieval tool * * @param options Options for the LlamaIndex retrieval tool */ constructor(options: LlamaIndexRetrievalOptions); /** * Retrieve information using LlamaIndex * * @param query The query to retrieve information for * @param maxResults Maximum number of results to return * @param context The context for the retrieval * @returns The retrieved information */ protected retrieve(query: string, maxResults: number, context: ToolContext): Promise<string>; }