fix: USE_OPENAI_ENDPOINT_FOR_ALL_MODELS

This commit is contained in:
Hk-Gosuto
2024-06-07 18:04:05 +08:00
parent c289305b05
commit 740ece39da
6 changed files with 16 additions and 3 deletions

View File

@@ -218,7 +218,7 @@ export function getHeaders(ignoreHeaders?: boolean) {
const modelConfig = useChatStore.getState().currentSession().mask.modelConfig;
const isGoogle =
modelConfig.model.startsWith("gemini") &&
!!!process.env.NEXT_PUBLIC_USE_OPENAI_ENDPOINT_FOR_ALL_MODELS;
!accessStore.useOpenAIEndpointForAllModels();
if (!ignoreHeaders && !isGoogle) {
headers = {
"Content-Type": "application/json",