[FEAT] add gpt-4-turbo-preview (#651)

* add gpt-4-turbo-preview

* add gpt-4-turbo-preview to valid models
This commit is contained in:
Sean Hatfield 2024-01-26 13:03:50 -08:00 committed by GitHub
parent 39d07feaed
commit 21653b09fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 0 deletions

View File

@ -85,6 +85,7 @@ function OpenAIModelSelection({ apiKey, settings }) {
"gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"gpt-4",
"gpt-4-turbo-preview",
"gpt-4-1106-preview",
"gpt-4-32k",
].map((model) => {

View File

@ -8,6 +8,7 @@ const PROVIDER_DEFAULT_MODELS = {
"gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"gpt-4",
"gpt-4-turbo-preview",
"gpt-4-1106-preview",
"gpt-4-32k",
],

View File

@ -52,6 +52,8 @@ class OpenAiLLM {
return 8192;
case "gpt-4-1106-preview":
return 128000;
case "gpt-4-turbo-preview":
return 128000;
case "gpt-4-32k":
return 32000;
default:
@ -65,6 +67,7 @@ class OpenAiLLM {
"gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"gpt-4-1106-preview",
"gpt-4-turbo-preview",
"gpt-4-32k",
];
const isPreset = validModels.some((model) => modelName === model);