mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 01:08:41 +08:00
feat: close #3187 use CUSTOM_MODELS to control model list
This commit is contained in:
@@ -17,6 +17,7 @@ const DEFAULT_ACCESS_STATE = {
|
||||
hideBalanceQuery: false,
|
||||
disableGPT4: false,
|
||||
disableFastLink: false,
|
||||
customModels: "",
|
||||
|
||||
openaiUrl: DEFAULT_OPENAI_URL,
|
||||
};
|
||||
@@ -52,12 +53,6 @@ export const useAccessStore = createPersistStore(
|
||||
.then((res: DangerConfig) => {
|
||||
console.log("[Config] got config from server", res);
|
||||
set(() => ({ ...res }));
|
||||
|
||||
if (res.disableGPT4) {
|
||||
DEFAULT_MODELS.forEach(
|
||||
(m: any) => (m.available = !m.name.startsWith("gpt-4")),
|
||||
);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
console.error("[Config] failed to fetch config");
|
||||
|
Reference in New Issue
Block a user