Added new models to token_count_utils (#1511)

* Added new models to token_count_utils

* Added token costs for new models.
This commit is contained in:
afourney 2024-02-01 18:10:45 -08:00 committed by GitHub
parent 9cd458ecbc
commit b0c1f8d88d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,8 @@ OAI_PRICE1K = {
"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
}

View File

@ -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]