Skip to content

Commit 1d1a73a

Browse files
sonichiAaronWard
andauthored
cost update for gpt-3.5-turbo-0125 (#2332)
* cost update for gpt-3.5-turbo-0125 * update price * update price --------- Co-authored-by: Aaron <[email protected]>
1 parent 918fd6b commit 1d1a73a

File tree

1 file changed

+30
-17
lines changed

1 file changed

+30
-17
lines changed

autogen/oai/openai_utils.py

+30-17
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,48 @@
1313
NON_CACHE_KEY = ["api_key", "base_url", "api_type", "api_version"]
1414
DEFAULT_AZURE_API_VERSION = "2024-02-15-preview"
1515
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),
1637
"text-ada-001": 0.0004,
1738
"text-babbage-001": 0.0005,
1839
"text-curie-001": 0.002,
1940
"code-cushman-001": 0.024,
2041
"code-davinci-002": 0.1,
2142
"text-davinci-002": 0.02,
2243
"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),
3344
"gpt-4-0314": (0.03, 0.06), # deprecate in Sep
3445
"gpt-4-32k-0314": (0.06, 0.12), # deprecate in Sep
3546
"gpt-4-0613": (0.03, 0.06),
3647
"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),
4348
"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),
4558
}
4659

4760

0 commit comments

Comments
 (0)