对接 deepseek 模型

This commit is contained in:
yangyongju
2024-08-12 17:36:18 +08:00
parent cf1c8e8f2a
commit 9fdf7ef78f
16 changed files with 473 additions and 21 deletions

View File

@@ -39,6 +39,10 @@ const DEFAULT_ALIBABA_URL = isApp
? DEFAULT_API_HOST + "/api/proxy/alibaba"
: ApiPath.Alibaba;
const DEFAULT_DEEPSEEK_URL = isApp
? DEFAULT_API_HOST + "/api/proxy/deepseek"
: ApiPath.Deepseek;
const DEFAULT_TENCENT_URL = isApp
? DEFAULT_API_HOST + "/api/proxy/tencent"
: ApiPath.Tencent;
@@ -93,7 +97,9 @@ const DEFAULT_ACCESS_STATE = {
// alibaba
alibabaUrl: DEFAULT_ALIBABA_URL,
alibabaApiKey: "",
// DEEPSEEK
deepseekUrl: DEFAULT_DEEPSEEK_URL,
deepseekApiKey: "",
// moonshot
moonshotUrl: DEFAULT_MOONSHOT_URL,
moonshotApiKey: "",
@@ -159,6 +165,9 @@ export const useAccessStore = createPersistStore(
isValidAlibaba() {
return ensure(get(), ["alibabaApiKey"]);
},
isValidDeepseekApiKey() {
return ensure(get(), ["deepseekApiKey"]);
},
isValidTencent() {
return ensure(get(), ["tencentSecretKey", "tencentSecretId"]);
@@ -183,6 +192,7 @@ export const useAccessStore = createPersistStore(
this.isValidBaidu() ||
this.isValidByteDance() ||
this.isValidAlibaba() ||
this.isValidDeepseekApiKey() ||
this.isValidTencent ||
this.isValidMoonshot() ||
this.isValidIflytek() ||

View File

@@ -106,7 +106,7 @@ export const useUpdateStore = createPersistStore(
if (version === remoteId) {
// Show a notification using Tauri
window.__TAURI__?.notification.sendNotification({
title: "NextChat",
title: "清明上河图小助手",
body: `${Locale.Settings.Update.IsLatest}`,
icon: `${ChatGptIcon.src}`,
sound: "Default",
@@ -116,7 +116,7 @@ export const useUpdateStore = createPersistStore(
Locale.Settings.Update.FoundUpdate(`${remoteId}`);
// Show a notification for the new version using Tauri
window.__TAURI__?.notification.sendNotification({
title: "NextChat",
title: "清明上河图小助手",
body: updateMessage,
icon: `${ChatGptIcon.src}`,
sound: "Default",