Skip to content

Commit bcb6117

Browse files
ginwardsonichiekzhu
authored
Update token_count_utils.py (#2531)
* Update token_count_utils.py Update the token counts of new gpt models ref: https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4 * format code with pre-commit --------- Co-authored-by: Chi Wang <[email protected]> Co-authored-by: Eric Zhu <[email protected]>
1 parent ba9ff45 commit bcb6117

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

autogen/token_count_utils.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ def get_max_token_limit(model: str = "gpt-3.5-turbo-0613") -> int:
1414
model = re.sub(r"^gpt4", "gpt-4", model)
1515

1616
max_token_limit = {
17-
"gpt-3.5-turbo": 4096,
17+
"gpt-3.5-turbo": 16385,
18+
"gpt-3.5-turbo-0125": 16385,
1819
"gpt-3.5-turbo-0301": 4096,
1920
"gpt-3.5-turbo-0613": 4096,
2021
"gpt-3.5-turbo-instruct": 4096,
2122
"gpt-3.5-turbo-16k": 16385,
2223
"gpt-3.5-turbo-16k-0613": 16385,
2324
"gpt-3.5-turbo-1106": 16385,
2425
"gpt-4": 8192,
26+
"gpt-4-turbo": 128000,
27+
"gpt-4-turbo-2024-04-09": 128000,
2528
"gpt-4-32k": 32768,
2629
"gpt-4-32k-0314": 32768, # deprecate in Sep
2730
"gpt-4-0314": 8192, # deprecate in Sep

0 commit comments

Comments
 (0)