Skip to content

Commit

Permalink
[FEAT] add gpt-4-turbo-preview (#651)
Browse files Browse the repository at this point in the history
* add gpt-4-turbo-preview

* add gpt-4-turbo-preview to valid models
  • Loading branch information
shatfield4 authored Jan 26, 2024
1 parent 39d07fe commit 21653b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand Down
3 changes: 3 additions & 0 deletions server/utils/AiProviders/openAi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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);
Expand Down

0 comments on commit 21653b0

Please sign in to comment.