mirror of https://github.com/microsoft/autogen.git
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 <wang.chi@microsoft.com> Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
This commit is contained in:
parent
ba9ff45adb
commit
bcb6117c97
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue