Merge remote-tracking branch 'upstream/main' into dev

# Conflicts:
#	app/api/auth.ts
#	app/client/platforms/openai.ts
#	app/components/settings.tsx
#	app/config/server.ts
#	app/constant.ts
#	app/locales/pt.ts
#	app/locales/sk.ts
#	app/locales/tw.ts
#	app/store/chat.ts
This commit is contained in:
sijinhui
2024-04-09 10:39:16 +08:00
19 changed files with 832 additions and 33 deletions

View File

@@ -71,6 +71,7 @@ export const getServerSideConfig = () => {
// const isAzure = !!process.env.AZURE_URL;
const isGoogle = !!process.env.GOOGLE_API_KEY;
const isAnthropic = !!process.env.ANTHROPIC_API_KEY;
// 需要一个函数来判断请求中模型是否为微软的。
// 当前逻辑gpt-4-32k模型为微软别的不是
// const isAzure = !!process.env.AZURE_URL;
@@ -100,6 +101,11 @@ export const getServerSideConfig = () => {
googleApiKey: process.env.GOOGLE_API_KEY,
googleUrl: process.env.GOOGLE_URL,
isAnthropic,
anthropicApiKey: process.env.ANTHROPIC_API_KEY,
anthropicApiVersion: process.env.ANTHROPIC_API_VERSION,
anthropicUrl: process.env.ANTHROPIC_URL,
gtmId: process.env.GTM_ID,
needCode: ACCESS_CODES.size > 0,