Update model token mappings/cost to include 0613 models (#6122)

Add `gpt-3.5-turbo-16k` to model token mappings, as per the following
new OpenAI blog post:
https://openai.com/blog/function-calling-and-other-api-updates

Fixes #6118 


Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
This commit is contained in:
Elijah Tarr 2023-06-21 01:37:16 -07:00 committed by GitHub
parent 5d149e4d50
commit e0f468f6c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -517,10 +517,15 @@ class BaseOpenAI(BaseLLM):
model_token_mapping = { model_token_mapping = {
"gpt-4": 8192, "gpt-4": 8192,
"gpt-4-0314": 8192, "gpt-4-0314": 8192,
"gpt-4-0613": 8192,
"gpt-4-32k": 32768, "gpt-4-32k": 32768,
"gpt-4-32k-0314": 32768, "gpt-4-32k-0314": 32768,
"gpt-4-32k-0613": 32768,
"gpt-3.5-turbo": 4096, "gpt-3.5-turbo": 4096,
"gpt-3.5-turbo-0301": 4096, "gpt-3.5-turbo-0301": 4096,
"gpt-3.5-turbo-0613": 4096,
"gpt-3.5-turbo-16k": 16385,
"gpt-3.5-turbo-16k-0613": 16385,
"text-ada-001": 2049, "text-ada-001": 2049,
"ada": 2049, "ada": 2049,
"text-babbage-001": 2040, "text-babbage-001": 2040,