feat: init support for deepseek

This commit is contained in:
Fred
2024-05-15 14:47:43 +08:00
parent 3513c6801e
commit 27ac18d9d7
8 changed files with 54 additions and 25 deletions

View File

@@ -89,6 +89,7 @@ export const getServerSideConfig = () => {
const isAzure = !!process.env.AZURE_URL;
const isGoogle = !!process.env.GOOGLE_API_KEY;
const isAnthropic = !!process.env.ANTHROPIC_API_KEY;
const isDeepSeek = !!process.env.DEEPSEEK_API_KEY;
// const apiKeyEnvVar = process.env.OPENAI_API_KEY ?? "";
// const apiKeys = apiKeyEnvVar.split(",").map((v) => v.trim());
@@ -99,7 +100,7 @@ export const getServerSideConfig = () => {
// );
const allowedWebDevEndpoints = (
process.env.WHITE_WEBDEV_ENDPOINTS ?? ""
process.env.WEBDEV_ENDPOINTS_WHITELIST ?? ""
).split(",");
return {
@@ -121,6 +122,8 @@ export const getServerSideConfig = () => {
anthropicApiVersion: process.env.ANTHROPIC_API_VERSION,
anthropicUrl: process.env.ANTHROPIC_URL,
deepseekApiKey: getApiKey(process.env.DEEPSEEK_API_KEY),
gtmId: process.env.GTM_ID,
needCode: ACCESS_CODES.size > 0,