add model

This commit is contained in:
sijinhui 2024-04-28 14:34:58 +08:00
parent 6c6453644e
commit 35e7f12d88
3 changed files with 13 additions and 2 deletions

View File

@ -262,6 +262,16 @@ export const DEFAULT_MODELS = [
providerType: "openai", 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", name: "claude-3-opus-20240229",
describe: "claude第三代模型最强版", describe: "claude第三代模型最强版",

View File

@ -137,7 +137,7 @@ export const useAppConfig = createPersistStore(
}), }),
{ {
name: StoreKey.Config, name: StoreKey.Config,
version: 3.8993, version: 3.8994,
migrate(persistedState, version) { migrate(persistedState, version) {
const state = persistedState as ChatConfig; const state = persistedState as ChatConfig;
@ -168,7 +168,7 @@ export const useAppConfig = createPersistStore(
if (version < 3.8) { if (version < 3.8) {
state.lastUpdate = Date.now(); state.lastUpdate = Date.now();
} }
if (version < 3.8993) { if (version < 3.8994) {
state.lastUpdate = Date.now(); state.lastUpdate = Date.now();
return { ...DEFAULT_CONFIG }; return { ...DEFAULT_CONFIG };
} }

View File

@ -11,6 +11,7 @@ export function useAllModels() {
[configStore.customModels, accessStore.customModels].join(","), [configStore.customModels, accessStore.customModels].join(","),
accessStore.defaultModel, accessStore.defaultModel,
).filter((m) => !configStore.dontUseModel.includes(m.name as any)); ).filter((m) => !configStore.dontUseModel.includes(m.name as any));
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [ }, [
accessStore.customModels, accessStore.customModels,
configStore.customModels, configStore.customModels,