/** * Cost Estimator * * Functions for estimating costs before processing. * Used to give users price quotes and set spending limits. */ import type { AIProvider, CostEstimate, CostEstimateInput, EmbeddingProvider } from './types'; /** * Default assumptions for cost estimation. * These are based on analysis of real chat data. */ export declare const ESTIMATION_DEFAULTS: { /** Average tokens per chat message */ readonly avgTokensPerMessage: 80; /** Ratio of activities found to messages processed */ readonly activitiesPerMessage: number; /** Messages per classification batch */ readonly classificationBatchSize: 50; /** Average output tokens per classified activity */ readonly outputTokensPerActivity: 150; /** Percentage of activities that are geocodable */ readonly geocodableRatio: 0.7; /** Low estimate multiplier (80% confidence) */ readonly lowMultiplier: 0.6; /** High estimate multiplier (80% confidence) */ readonly highMultiplier: 1.8; }; /** * Estimate token count for a text string. * Uses a simple character-based heuristic. * * Rough rule: ~4 characters per token for English text. */ export declare function estimateTokenCount(text: string): number; /** * Estimate tokens for a batch of messages. */ export declare function estimateMessageTokens(messageCount: number, avgTokensPerMessage?: number): number; /** * Estimate number of activities that will be found. */ export declare function estimateActivityCount(messageCount: number): number; /** * Estimate number of geocodable activities. */ export declare function estimateGeocodableCount(activityCount: number): number; /** * Estimate the full cost of processing a chat. * * @param input - Estimation input parameters * @param aiProvider - AI provider to use (default: 'google') * @param embeddingProvider - Embedding provider to use (default: 'openai') * @returns Cost estimate with breakdown */ export declare function estimateProcessingCost(input: CostEstimateInput, aiProvider?: AIProvider, embeddingProvider?: EmbeddingProvider): CostEstimate; /** * Quick estimate for display (just returns cents). * Simpler version for UI price display. */ export declare function quickEstimateCents(messageCount: number, aiProvider?: AIProvider): number; /** * Format an estimate for display. */ export declare function formatEstimate(estimate: CostEstimate): string; /** * Format estimate with breakdown. */ export declare function formatEstimateDetailed(estimate: CostEstimate): string; //# sourceMappingURL=estimator.d.ts.map