mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-20 04:30:17 +09:00
Merge pull request #5553 from ConnectAI-E/fix/default-model
fix: default model
This commit is contained in:
commit
f9d6f4f9da
@ -211,10 +211,13 @@ export const useAccessStore = createPersistStore(
|
|||||||
})
|
})
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// Set default model from env request
|
const defaultModel = res.defaultModel ?? "";
|
||||||
let defaultModel = res.defaultModel ?? "";
|
if (defaultModel !== "") {
|
||||||
if (defaultModel !== "")
|
const [model, providerName] = defaultModel.split("@");
|
||||||
DEFAULT_CONFIG.modelConfig.model = defaultModel;
|
DEFAULT_CONFIG.modelConfig.model = model;
|
||||||
|
DEFAULT_CONFIG.modelConfig.providerName = providerName;
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
})
|
})
|
||||||
.then((res: DangerConfig) => {
|
.then((res: DangerConfig) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user