UNPKG

crewai-ts

Version:

TypeScript port of crewAI for agent-based workflows

45 lines 1.21 kB
/** * RagTool implementation * Provides retrieval-augmented generation capabilities for agents * Leverages the optimized KnowledgeStorage system with tiered hot/warm/cold storage */ /** * Result of a RAG operation */ export interface RagResult { query: string; contextCount: number; results: Array<{ content: string; score: number; metadata?: Record<string, any>; id?: string; }>; } /** * Options for configuring the RagTool */ export interface RagToolOptions { knowledgeBase?: any; texts?: string[]; textChunkSize?: number; textChunkOverlap?: number; cacheResults?: boolean; cacheExpiration?: number; timeoutMs?: number; maxRetries?: number; name?: string; description?: string; } /** * Creates an optimized RAG tool that leverages the KnowledgeStorage system */ export declare function createRagTool(options?: RagToolOptions): import("../StructuredTool.js").StructuredTool<{ query?: string; contextCount?: number; similarityThreshold?: number; filterMetadata?: Record<string, any>; includeMetadata?: boolean; returnSourceText?: boolean; }, RagResult>; //# sourceMappingURL=RagTool.d.ts.map