Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#5553 from ConnectAI-E/fix/default-m…
Browse files Browse the repository at this point in the history
…odel

fix: default model
  • Loading branch information
Dogtiti authored Sep 27, 2024
2 parents a13bd62 + c6ebd6e commit f9d6f4f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/store/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,13 @@ export const useAccessStore = createPersistStore(
})
.then((res) => res.json())
.then((res) => {
// Set default model from env request
let defaultModel = res.defaultModel ?? "";
if (defaultModel !== "")
DEFAULT_CONFIG.modelConfig.model = defaultModel;
const defaultModel = res.defaultModel ?? "";
if (defaultModel !== "") {
const [model, providerName] = defaultModel.split("@");
DEFAULT_CONFIG.modelConfig.model = model;
DEFAULT_CONFIG.modelConfig.providerName = providerName;
}

return res;
})
.then((res: DangerConfig) => {
Expand Down

0 comments on commit f9d6f4f

Please sign in to comment.