mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 03:11:47 +08:00
feat: close #2192 use /list/models to get model ids
This commit is contained in:
@@ -3,7 +3,6 @@ import { persist } from "zustand/middleware";
|
||||
import { DEFAULT_API_HOST, StoreKey } from "../constant";
|
||||
import { getHeaders } from "../client/api";
|
||||
import { BOT_HELLO } from "./chat";
|
||||
import { ALL_MODELS } from "./config";
|
||||
import { getClientConfig } from "../config/client";
|
||||
|
||||
export interface AccessControlStore {
|
||||
@@ -76,14 +75,6 @@ export const useAccessStore = create<AccessControlStore>()(
|
||||
console.log("[Config] got config from server", res);
|
||||
set(() => ({ ...res }));
|
||||
|
||||
if (!res.enableGPT4) {
|
||||
ALL_MODELS.forEach((model) => {
|
||||
if (model.name.startsWith("gpt-4")) {
|
||||
(model as any).available = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ((res as any).botHello) {
|
||||
BOT_HELLO.content = (res as any).botHello;
|
||||
}
|
||||
|
Reference in New Issue
Block a user