UNPKG

@yk1028-test/ai-chat-supporter

Version:

AI Chat Supporter - TypeScript library for intelligent chat processing with LangChain integration

48 lines 1.53 kB
export interface Document { id: string; title: string; content: string; filePath: string; metadata: Record<string, any>; lastModified: Date; } export interface RAGConfig { maxDocuments?: number; maxContextLength?: number; similarityThreshold?: number; chunkSize?: number; chunkOverlap?: number; } export interface IDocumentProcessor { supportedExtensions: string[]; process(filePath: string): Promise<Document>; } export declare class TextDocumentProcessor implements IDocumentProcessor { readonly supportedExtensions: string[]; process(filePath: string): Promise<Document>; private generateId; } export declare class RAGManager { private documents; private processors; private config; constructor(config?: RAGConfig); registerProcessor(processor: IDocumentProcessor): void; addDocument(filePath: string): Promise<Document>; addDocuments(filePaths: string[]): Promise<Document[]>; removeDocument(documentId: string): boolean; getDocument(documentId: string): Document | undefined; listDocuments(): Document[]; searchDocuments(query: string): Document[]; buildContext(query: string): string[]; private chunkDocument; private calculateSimpleScore; updateConfig(newConfig: Partial<RAGConfig>): void; getSupportedExtensions(): string[]; getStats(): { documentCount: number; totalContentLength: number; supportedExtensions: string[]; }; } //# sourceMappingURL=RAGManager.d.ts.map