From 35e7f12d88f24eca133e174dec45127a436d137c Mon Sep 17 00:00:00 2001 From: sijinhui Date: Sun, 28 Apr 2024 14:34:58 +0800 Subject: [PATCH] add model --- app/constant.ts | 10 ++++++++++ app/store/config.ts | 4 ++-- app/utils/hooks.ts | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/constant.ts b/app/constant.ts index 932382679..498ab17a1 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -262,6 +262,16 @@ export const DEFAULT_MODELS = [ providerType: "openai", }, }, + { + name: "gpt-4-turbo-2024-04-09", + describe: "GPT-4,新版,测试", + available: true, + provider: { + id: "openai", + providerName: "OpenAI", + providerType: "openai", + }, + }, { name: "claude-3-opus-20240229", describe: "claude第三代模型最强版", diff --git a/app/store/config.ts b/app/store/config.ts index 5b332b3f5..56ca4c072 100644 --- a/app/store/config.ts +++ b/app/store/config.ts @@ -137,7 +137,7 @@ export const useAppConfig = createPersistStore( }), { name: StoreKey.Config, - version: 3.8993, + version: 3.8994, migrate(persistedState, version) { const state = persistedState as ChatConfig; @@ -168,7 +168,7 @@ export const useAppConfig = createPersistStore( if (version < 3.8) { state.lastUpdate = Date.now(); } - if (version < 3.8993) { + if (version < 3.8994) { state.lastUpdate = Date.now(); return { ...DEFAULT_CONFIG }; } diff --git a/app/utils/hooks.ts b/app/utils/hooks.ts index a1f67096f..072ff90e2 100644 --- a/app/utils/hooks.ts +++ b/app/utils/hooks.ts @@ -11,6 +11,7 @@ export function useAllModels() { [configStore.customModels, accessStore.customModels].join(","), accessStore.defaultModel, ).filter((m) => !configStore.dontUseModel.includes(m.name as any)); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [ accessStore.customModels, configStore.customModels,