/**
 * Vector embeddings utilities using OpenAI
 */
import type { DatabaseConnection } from '../database/connection.js';
export declare class EmbeddingService {
    private openai;
    private model;
    private usageTracker;
    private db;
    private readonly EMBEDDING_PRICE_PER_1M;
    constructor(apiKey?: string, model?: string, db?: DatabaseConnection);
    /**
     * Generate embeddings for text
     */
    generateEmbedding(text: string, userId?: string): Promise<number[]>;
    /**
     * Generate embeddings for multiple texts
     */
    generateEmbeddings(texts: string[], userId?: string): Promise<number[][]>;
    /**
     * Calculate cosine similarity between two vectors
     */
    static cosineSimilarity(a: number[], b: number[]): number;
    /**
     * Find the most similar vectors from a list
     */
    static findMostSimilar(queryVector: number[], vectors: Array<{
        vector: number[];
        data: any;
    }>, threshold?: number, limit?: number): Array<{
        similarity: number;
        data: any;
    }>;
    /**
     * Prepare text for embedding (clean and truncate)
     */
    static prepareTextForEmbedding(text: string, maxLength?: number): string;
    /**
     * Create a combined text for embedding from memory data
     */
    static createMemoryEmbeddingText(memory: {
        title: string;
        content: string;
        tags?: string[];
        memoryType?: string;
    }): string;
    /**
     * Create a combined text for embedding from entity data
     */
    static createEntityEmbeddingText(entity: {
        name: string;
        description?: string;
        company?: string;
        title?: string;
        notes?: string;
        tags?: string[];
    }): string;
    /**
     * Batch process embeddings with rate limiting
     */
    generateEmbeddingsBatch(texts: string[], batchSize?: number, delayMs?: number): Promise<number[][]>;
    /**
     * Calculate embedding statistics
     */
    static calculateEmbeddingStats(embeddings: number[][]): {
        dimensions: number;
        count: number;
        avgMagnitude: number;
        minMagnitude: number;
        maxMagnitude: number;
    };
    /**
     * Normalize vector to unit length
     */
    static normalizeVector(vector: number[]): number[];
    /**
     * Calculate dot product between two vectors
     */
    static dotProduct(a: number[], b: number[]): number;
    /**
     * Calculate Euclidean distance between two vectors
     */
    static euclideanDistance(a: number[], b: number[]): number;
    /**
     * Calculate cost from token count
     */
    private calculateCost;
    /**
     * Record usage to database
     */
    private recordUsage;
    /**
     * Estimate token count before API call
     */
    estimateTokens(text: string): number;
    /**
     * Estimate cost before API call
     */
    estimateCost(text: string): number;
    /**
     * Get daily usage summary
     */
    getDailyUsage(userId: string): Promise<any>;
}
//# sourceMappingURL=embeddings.d.ts.map