mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 00:15:38 +08:00
fix: fix gemini issue when using app (#4013)
* chore: update path * fix: fix google auth logic * fix: not using header authorization for google api * chore: revert to allow stream
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
"use client";
|
||||
import {
|
||||
ApiPath,
|
||||
DEFAULT_API_HOST,
|
||||
@@ -45,7 +46,9 @@ export class ChatGPTApi implements LLMApi {
|
||||
|
||||
if (baseUrl.length === 0) {
|
||||
const isApp = !!getClientConfig()?.isApp;
|
||||
baseUrl = isApp ? DEFAULT_API_HOST : ApiPath.OpenAI;
|
||||
baseUrl = isApp
|
||||
? DEFAULT_API_HOST + "/proxy" + ApiPath.OpenAI
|
||||
: ApiPath.OpenAI;
|
||||
}
|
||||
|
||||
if (baseUrl.endsWith("/")) {
|
||||
@@ -59,6 +62,8 @@ export class ChatGPTApi implements LLMApi {
|
||||
path = makeAzurePath(path, accessStore.azureApiVersion);
|
||||
}
|
||||
|
||||
console.log("[Proxy Endpoint] ", baseUrl, path);
|
||||
|
||||
return [baseUrl, path].join("/");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user