Skip to content

A programming framework for agentic AI

Update token_count_utils.py (#2531)

Jinhua Wangbcb6117c97b0
diff --git a/autogen/token_count_utils.py b/autogen/token_count_utils.py
index d68e4ee81..589d7b404 100644
--- a/autogen/token_count_utils.py
+++ b/autogen/token_count_utils.py
@@ -14,7 +14,8 @@ def get_max_token_limit(model: str = "gpt-3.5-turbo-0613") -> int:
model = re.sub(r"^gpt4", "gpt-4", model)
max_token_limit = {
- "gpt-3.5-turbo": 4096,
+ "gpt-3.5-turbo": 16385,
+ "gpt-3.5-turbo-0125": 16385,
"gpt-3.5-turbo-0301": 4096,
"gpt-3.5-turbo-0613": 4096,
"gpt-3.5-turbo-instruct": 4096,
@@ -22,6 +23,8 @@ def get_max_token_limit(model: str = "gpt-3.5-turbo-0613") -> int:
"gpt-3.5-turbo-16k-0613": 16385,
"gpt-3.5-turbo-1106": 16385,
"gpt-4": 8192,
+ "gpt-4-turbo": 128000,
+ "gpt-4-turbo-2024-04-09": 128000,
"gpt-4-32k": 32768,
"gpt-4-32k-0314": 32768, # deprecate in Sep
"gpt-4-0314": 8192, # deprecate in Sep