UNPKG

hikma-engine

Version:

Code Knowledge Graph Indexer - A sophisticated TypeScript-based indexer that transforms Git repositories into multi-dimensional knowledge stores for AI agents

50 lines 1.52 kB
/** * LLM-based RAG service for generating code explanations * Uses Python backend with code-specialized LLMs */ export interface RAGResponse { success: boolean; explanation?: string; error?: string; model: string; device?: string; usage?: { prompt_tokens?: number; completion_tokens?: number; total_tokens?: number; }; responseId?: string; finishReason?: string; [key: string]: any; } export interface SearchResult { file_path: string; node_type: string; similarity: number; source_text: string; [key: string]: any; } export declare function adaptSearchResults(results: any[]): SearchResult[]; export interface RAGOptions { model?: string; timeout?: number; maxResults?: number; maxTokens?: number; } /** * Generate an explanation for search results using LLM-based RAG * Uses the configurable provider system with intelligent fallback * * @param query - The original search query * @param searchResults - Array of search results to explain * @param options - Optional configuration * @returns Promise resolving to RAG response */ export declare function generateRAGExplanation(query: string, searchResults: SearchResult[], options?: RAGOptions): Promise<RAGResponse>; /** * Cleanup RAG service resources * Cleans up both the provider manager and legacy Python service * Ensures proper shutdown coordination */ export declare function cleanupRAGService(): Promise<void>; //# sourceMappingURL=llm-rag.d.ts.map