/** * Vector memory implementation * * Note: This is a placeholder implementation. In a real application, * you would integrate with a vector database like Pinecone, Weaviate, * or use a local vector store. */ import { MemoryInterface, MemoryEntry } from './memory-interface'; /** * Interface for a vector database service */ interface VectorDBService { storeVector(id: string, vector: number[], data: any): Promise; searchVectors(vector: number[], limit: number): Promise>; deleteVector(id: string): Promise; clearVectors(): Promise; } /** * Simple mock for text-to-vector embedding service */ declare class MockEmbeddingService { textToVector(text: string): Promise; } /** * Configuration for vector memory */ export interface VectorMemoryConfig { vectorService?: VectorDBService; embeddingService?: MockEmbeddingService; } /** * Vector-based memory implementation * Uses embeddings to find semantically similar memories */ export declare class VectorMemory implements MemoryInterface { private vectorDB; private embeddingService; private logger; /** * Creates a new vector memory system * * @param config - Configuration for the vector memory */ constructor(config?: VectorMemoryConfig); /** * Stores a memory entry * * @param memory - The memory to store * @returns Promise that resolves when storage is complete */ store(memory: MemoryEntry): Promise; /** * Retrieves memories relevant to a query using vector similarity * * @param query - The query to find relevant memories for * @param limit - Optional limit on number of memories to retrieve (default: 5) * @returns Promise resolving to an array of memory content strings */ retrieve(query: string, limit?: number): Promise; /** * Get all stored memories * Note: This is inefficient with large vector DBs * * @returns Promise resolving to all memory entries */ getAll(): Promise; /** * Delete a specific memory by ID * * @param id - ID of the memory to delete * @returns Promise resolving to true if deleted, false if not found */ delete(id: string): Promise; /** * Clear all memories * * @returns Promise resolving when all memories are cleared */ clear(): Promise; } export {};