UNPKG

ai-meter

Version:

A javascript library designed to estimate AI models tokens and its API costs.

12 lines 561 B
import { CalculatedTokensResponse, CalculatedCostResponse, Metrics } from '@/types'; declare class Meter { private static algorithmProvider; private static tokens; private static cost; private static provider; static calculateTokens(model: string, text: string): CalculatedTokensResponse; static calculateCost(model: string, text: string, costType?: string): Promise<CalculatedCostResponse>; static metrics(model: string, text: string, costType?: string): Promise<Metrics>; } export default Meter; //# sourceMappingURL=Meter.d.ts.map