mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-14 05:03:43 +08:00
feat: add env
This commit is contained in:
@@ -216,7 +216,9 @@ export function getHeaders(ignoreHeaders?: boolean) {
|
||||
const accessStore = useAccessStore.getState();
|
||||
let headers: Record<string, string> = {};
|
||||
const modelConfig = useChatStore.getState().currentSession().mask.modelConfig;
|
||||
const isGoogle = modelConfig.model.startsWith("gemini");
|
||||
const isGoogle =
|
||||
modelConfig.model.startsWith("gemini") &&
|
||||
!!!process.env.NEXT_PUBLIC_USE_OPENAI_ENDPOINT_FOR_ALL_MODELS;
|
||||
if (!ignoreHeaders && !isGoogle) {
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Reference in New Issue
Block a user