Skip to content

Commit

Permalink
Added new models to token_count_utils (#1511)
Browse files Browse the repository at this point in the history
* Added new models to token_count_utils

* Added token costs for new models.
  • Loading branch information
afourney authored Feb 2, 2024
1 parent 9cd458e commit b0c1f8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autogen/oai/openai_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"gpt-3.5-turbo-1106": (0.001, 0.002),
"gpt-35-turbo-1106": (0.001, 0.002),
"gpt-4-1106-preview": (0.01, 0.03),
"gpt-4-0125-preview": (0.01, 0.03),
"gpt-4-turbo-preview": (0.01, 0.03),
"gpt-4-1106-vision-preview": (0.01, 0.03), # TODO: support vision pricing of images
}

Expand Down
2 changes: 2 additions & 0 deletions autogen/token_count_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def get_max_token_limit(model="gpt-3.5-turbo-0613"):
"gpt-4-0613": 8192,
"gpt-4-32k-0613": 32768,
"gpt-4-1106-preview": 128000,
"gpt-4-0125-preview": 128000,
"gpt-4-turbo-preview": 128000,
"gpt-4-vision-preview": 128000,
}
return max_token_limit[model]
Expand Down

0 comments on commit b0c1f8d

Please sign in to comment.