This commit is contained in:
lloydzhou
2024-07-09 19:56:52 +08:00
parent 23872086fa
commit 3628d68d9a
4 changed files with 12 additions and 18 deletions

View File

@@ -185,6 +185,7 @@ export function getHeaders() {
const isAnthropic = modelConfig.providerName === ServiceProvider.Anthropic;
const isBaidu = modelConfig.providerName == ServiceProvider.Baidu;
const isByteDance = modelConfig.providerName === ServiceProvider.ByteDance;
const isAlibaba = modelConfig.providerName === ServiceProvider.Alibaba;
const isEnabledAccessControl = accessStore.enabledAccessControl();
const apiKey = isGoogle
? accessStore.googleApiKey
@@ -194,6 +195,8 @@ export function getHeaders() {
? accessStore.anthropicApiKey
: isByteDance
? accessStore.bytedanceApiKey
: isAlibaba
? accessStore.alibabaApiKey
: accessStore.openaiApiKey;
return {
isGoogle,
@@ -201,6 +204,7 @@ export function getHeaders() {
isAnthropic,
isBaidu,
isByteDance,
isAlibaba,
apiKey,
isEnabledAccessControl,
};