Update openai.ts

update modelsToReplace
This commit is contained in:
DirkSchlossmacher 2024-04-16 22:12:54 +02:00 committed by GitHub
parent 94ea750137
commit f6e2d3a68c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,10 +124,15 @@ export class ChatGPTApi implements LLMApi {
"gpt-4-0613",
"gpt-4-32k-0314",
"gpt-4-32k-0613",
"gpt-4-1106-preview",
"gpt-4-0125-preview",
"gpt-4-1106-vision",
"gpt-4-1106-vision-preview",
];
// Check if the current model is in the list of models to replace
const finalModel = modelsToReplace.includes(modelConfig.model) ? "gpt-4-turbo-preview" : modelConfig.model;
const finalModel = modelsToReplace.includes(modelConfig.model) ? "gpt-4-turbo" : modelConfig.model;
const requestPayload = {
messages,