@vfarcic/dot-ai
Version:
Universal Kubernetes application deployment agent with CLI and MCP interfaces
81 lines • 2.16 kB
TypeScript
/**
* Vector DB Service
*
* Handles Qdrant Vector Database integration for semantic search and storage
*/
export interface VectorDBConfig {
url?: string;
apiKey?: string;
collectionName?: string;
}
export interface VectorDocument {
id: string;
payload: Record<string, any>;
vector?: number[];
}
export interface SearchResult {
id: string;
score: number;
payload: Record<string, any>;
}
export interface SearchOptions {
limit?: number;
scoreThreshold?: number;
}
export declare class VectorDBService {
private client;
private config;
private collectionName;
constructor(config?: VectorDBConfig);
private validateConfig;
private shouldInitializeClient;
/**
* Initialize the collection if it doesn't exist
*/
initializeCollection(vectorSize?: number): Promise<void>;
/**
* Create collection with specified vector size
*/
private createCollection;
/**
* Store a document with optional vector
*/
upsertDocument(document: VectorDocument): Promise<void>;
/**
* Search for similar documents using vector similarity
*/
searchSimilar(vector: number[], options?: SearchOptions): Promise<SearchResult[]>;
/**
* Search for documents using payload filtering (keyword search)
*/
searchByKeywords(keywords: string[], options?: SearchOptions): Promise<SearchResult[]>;
/**
* Get a document by ID
*/
getDocument(id: string): Promise<VectorDocument | null>;
/**
* Delete a document by ID
*/
deleteDocument(id: string): Promise<void>;
/**
* Get all documents (for listing)
*/
getAllDocuments(limit?: number): Promise<VectorDocument[]>;
/**
* Get collection info and statistics
*/
getCollectionInfo(): Promise<any>;
/**
* Check if Vector DB is available and responsive
*/
healthCheck(): Promise<boolean>;
/**
* Check if client is initialized
*/
isInitialized(): boolean;
/**
* Get configuration (for debugging)
*/
getConfig(): VectorDBConfig;
}
//# sourceMappingURL=vector-db-service.d.ts.map