UNPKG

@bobmatnyc/ai-code-review

Version:

A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter

40 lines (39 loc) 1.17 kB
/** * @fileoverview Factory for creating token and cost estimators. * * This module provides a factory for creating the appropriate estimator * based on the model name or provider. */ import { TokenEstimator } from './baseEstimator'; /** * Factory for creating token and cost estimators */ export declare class EstimatorFactory { private static instance; /** * Get the singleton instance of the factory * @returns EstimatorFactory instance */ static getInstance(): EstimatorFactory; /** * Private constructor to enforce singleton pattern */ private constructor(); /** * Get the appropriate estimator for a given model * @param modelName Name of the model * @returns TokenEstimator instance */ getEstimatorForModel(modelName: string): TokenEstimator; /** * Get the estimator for a specific provider * @param provider Provider name * @returns TokenEstimator instance */ getEstimatorForProvider(provider: string): TokenEstimator; /** * Get the default estimator * @returns TokenEstimator instance */ getDefaultEstimator(): TokenEstimator; }