|
13 | 13 | NON_CACHE_KEY = ["api_key", "base_url", "api_type", "api_version"]
|
14 | 14 | DEFAULT_AZURE_API_VERSION = "2024-02-15-preview"
|
15 | 15 | OAI_PRICE1K = {
|
| 16 | + # https://openai.com/pricing |
| 17 | + # gpt-4-turbo |
| 18 | + "gpt-4-0125-preview": (0.01, 0.03), |
| 19 | + "gpt-4-1106-preview": (0.01, 0.03), |
| 20 | + "gpt-4-1106-vision-preview": (0.01, 0.03), # TODO: support vision pricing of images |
| 21 | + # gpt-4 |
| 22 | + "gpt-4": (0.03, 0.06), |
| 23 | + "gpt-4-32k": (0.06, 0.12), |
| 24 | + # gpt-3.5 turbo |
| 25 | + "gpt-3.5-turbo": (0.0005, 0.0015), # default is 0125 |
| 26 | + "gpt-3.5-turbo-0125": (0.0005, 0.0015), # 16k |
| 27 | + "gpt-3.5-turbo-instruct": (0.0015, 0.002), |
| 28 | + # base model |
| 29 | + "davinci-002": 0.002, |
| 30 | + "babbage-002": 0.0004, |
| 31 | + # old model |
| 32 | + "gpt-3.5-turbo-1106": (0.001, 0.002), |
| 33 | + "gpt-3.5-turbo-0613": (0.0015, 0.002), |
| 34 | + # "gpt-3.5-turbo-16k": (0.003, 0.004), |
| 35 | + "gpt-3.5-turbo-16k-0613": (0.003, 0.004), |
| 36 | + "gpt-3.5-turbo-0301": (0.0015, 0.002), |
16 | 37 | "text-ada-001": 0.0004,
|
17 | 38 | "text-babbage-001": 0.0005,
|
18 | 39 | "text-curie-001": 0.002,
|
19 | 40 | "code-cushman-001": 0.024,
|
20 | 41 | "code-davinci-002": 0.1,
|
21 | 42 | "text-davinci-002": 0.02,
|
22 | 43 | "text-davinci-003": 0.02,
|
23 |
| - "gpt-3.5-turbo-instruct": (0.0015, 0.002), |
24 |
| - "gpt-3.5-turbo-0301": (0.0015, 0.002), # deprecate in Sep |
25 |
| - "gpt-3.5-turbo-0613": (0.0015, 0.002), |
26 |
| - "gpt-3.5-turbo-16k": (0.003, 0.004), |
27 |
| - "gpt-3.5-turbo-16k-0613": (0.003, 0.004), |
28 |
| - "gpt-35-turbo": (0.0015, 0.002), |
29 |
| - "gpt-35-turbo-16k": (0.003, 0.004), |
30 |
| - "gpt-35-turbo-instruct": (0.0015, 0.002), |
31 |
| - "gpt-4": (0.03, 0.06), |
32 |
| - "gpt-4-32k": (0.06, 0.12), |
33 | 44 | "gpt-4-0314": (0.03, 0.06), # deprecate in Sep
|
34 | 45 | "gpt-4-32k-0314": (0.06, 0.12), # deprecate in Sep
|
35 | 46 | "gpt-4-0613": (0.03, 0.06),
|
36 | 47 | "gpt-4-32k-0613": (0.06, 0.12),
|
37 |
| - # 11-06 |
38 |
| - "gpt-3.5-turbo": (0.0015, 0.002), # default is still 0613 |
39 |
| - "gpt-3.5-turbo-1106": (0.001, 0.002), |
40 |
| - "gpt-35-turbo-1106": (0.001, 0.002), |
41 |
| - "gpt-4-1106-preview": (0.01, 0.03), |
42 |
| - "gpt-4-0125-preview": (0.01, 0.03), |
43 | 48 | "gpt-4-turbo-preview": (0.01, 0.03),
|
44 |
| - "gpt-4-1106-vision-preview": (0.01, 0.03), # TODO: support vision pricing of images |
| 49 | + # https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/#pricing |
| 50 | + "gpt-35-turbo": (0.0005, 0.0015), # what's the default? using 0125 here. |
| 51 | + "gpt-35-turbo-0125": (0.0005, 0.0015), |
| 52 | + "gpt-35-turbo-instruct": (0.0015, 0.002), |
| 53 | + "gpt-35-turbo-1106": (0.001, 0.002), |
| 54 | + "gpt-35-turbo-0613": (0.0015, 0.002), |
| 55 | + "gpt-35-turbo-0301": (0.0015, 0.002), |
| 56 | + "gpt-35-turbo-16k": (0.003, 0.004), |
| 57 | + "gpt-35-turbo-16k-0613": (0.003, 0.004), |
45 | 58 | }
|
46 | 59 |
|
47 | 60 |
|
|
0 commit comments