mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-08 11:06:37 +08:00
enforce default model via config.ts
This commit is contained in:
parent
2f7e78de18
commit
e1ca34fcb4
@ -184,7 +184,7 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Check if the current model is in the list of models to replace
|
// 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;
|
let requestPayload: RequestPayload | DalleRequestPayload;
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ const openaiModels = [
|
|||||||
"gpt-4o-mini",
|
"gpt-4o-mini",
|
||||||
"gpt-4o",
|
"gpt-4o",
|
||||||
"gpt-4o-2024-08-06",
|
"gpt-4o-2024-08-06",
|
||||||
"gpt-4o-2024-05-13",
|
// "gpt-4o-2024-05-13",
|
||||||
// "gpt-4-vision-preview",
|
// "gpt-4-vision-preview",
|
||||||
// "gpt-4-turbo-2024-04-09"
|
// "gpt-4-turbo-2024-04-09"
|
||||||
"dall-e-3",
|
"dall-e-3",
|
||||||
|
@ -142,6 +142,9 @@ export const useAppConfig = createPersistStore(
|
|||||||
migrate(persistedState, version) {
|
migrate(persistedState, version) {
|
||||||
const state = persistedState as ChatConfig;
|
const state = persistedState as ChatConfig;
|
||||||
|
|
||||||
|
// optionally: hard set/reset model for everyone
|
||||||
|
state.modelConfig.model = "gpt-4o-mini";
|
||||||
|
|
||||||
if (version < 3.4) {
|
if (version < 3.4) {
|
||||||
state.modelConfig.sendMemory = true;
|
state.modelConfig.sendMemory = true;
|
||||||
state.modelConfig.historyMessageCount = 4;
|
state.modelConfig.historyMessageCount = 4;
|
||||||
|
Loading…
Reference in New Issue
Block a user