UNPKG

gpt-tokens

Version:

Calculate the token consumption and amount of openai gpt message

33 lines (32 loc) 1.36 kB
export type supportModelType = 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-4' | 'gpt-4-32k' | 'gpt-4-turbo-preview' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-4-1106-preview' | 'gpt-4-0125-preview' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'o1' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'chatgpt-4o-latest' | 'o3-mini' | 'o3-mini-2025-01-31'; /** * Pricing * @class * https://openai.com/pricing */ export declare class Pricing { /** * General Model Mapping * @public * General Model => Incremental Model */ static readonly generalModelMapping: { [key: string]: string; }; /** * Incremental Models * @public * Model: [Input , Output, Train (If support)] ($/1K Tokens) */ static readonly incrementalModels: { [model: string]: [number, number, number?]; }; /** * Fine-tuning Models * @public * Model: [Input , Output, Train] ($/1K Tokens) */ static readonly fineTuningModels: { [model: string]: [number, number, number]; }; }