enforce default model via config.ts

This commit is contained in:
DirkSchlossmacher 2024-08-09 08:45:18 +02:00
parent 2f7e78de18
commit e1ca34fcb4
3 changed files with 5 additions and 2 deletions

View File

@ -184,7 +184,7 @@ export class ChatGPTApi implements LLMApi {
];
// Check if the current model is in the list of models to replace
const finalModel = modelsToReplace.includes(modelConfig.model) ? "gpt-4o-2024-08-06" : modelConfig.model;
const finalModel = modelsToReplace.includes(modelConfig.model) ? "gpt-4o-mini" : modelConfig.model;
let requestPayload: RequestPayload | DalleRequestPayload;

View File

@ -267,7 +267,7 @@ const openaiModels = [
"gpt-4o-mini",
"gpt-4o",
"gpt-4o-2024-08-06",
"gpt-4o-2024-05-13",
// "gpt-4o-2024-05-13",
// "gpt-4-vision-preview",
// "gpt-4-turbo-2024-04-09"
"dall-e-3",

View File

@ -142,6 +142,9 @@ export const useAppConfig = createPersistStore(
migrate(persistedState, version) {
const state = persistedState as ChatConfig;
// optionally: hard set/reset model for everyone
state.modelConfig.model = "gpt-4o-mini";
if (version < 3.4) {
state.modelConfig.sendMemory = true;
state.modelConfig.historyMessageCount = 4;