对接 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

@@ -56,7 +56,9 @@ declare global {
// alibaba only
ALIBABA_URL?: string;
ALIBABA_API_KEY?: string;
// deepseek only
DEEPSEEK_API_KEY?: string;
DEEPSEEK_URL?: string;
// tencent only
TENCENT_URL?: string;
TENCENT_SECRET_KEY?: string;
@@ -141,6 +143,7 @@ export const getServerSideConfig = () => {
const isBaidu = !!process.env.BAIDU_API_KEY;
const isBytedance = !!process.env.BYTEDANCE_API_KEY;
const isAlibaba = !!process.env.ALIBABA_API_KEY;
const isDeepseek = !!process.env.DEEPSEEK_API_KEY;
const isMoonshot = !!process.env.MOONSHOT_API_KEY;
const isIflytek = !!process.env.IFLYTEK_API_KEY;
// const apiKeyEnvVar = process.env.OPENAI_API_KEY ?? "";
@@ -191,6 +194,10 @@ export const getServerSideConfig = () => {
alibabaUrl: process.env.ALIBABA_URL,
alibabaApiKey: getApiKey(process.env.ALIBABA_API_KEY),
isDeepseek,
deepseekApiKey: getApiKey(process.env.DEEPSEEK_API_KEY),
deepseekApiUrl: process.env.DEEPSEEK_URL,
isTencent,
tencentUrl: process.env.TENCENT_URL,
tencentSecretKey: getApiKey(process.env.TENCENT_SECRET_KEY),