mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-21 16:26:49 +08:00
Merge remote-tracking branch 'upstream/main' into dev
# Conflicts: # .github/workflows/deploy_preview.yml # app/client/api.ts # app/client/platforms/google.ts # app/store/chat.ts
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
"use client";
|
||||
import {
|
||||
ApiPath,
|
||||
AZURE_MODELS,
|
||||
@@ -46,7 +47,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("/")) {
|
||||
@@ -60,6 +63,8 @@ export class ChatGPTApi implements LLMApi {
|
||||
path = makeAzurePath(path, accessStore.azureApiVersion, azureModel);
|
||||
}
|
||||
|
||||
console.log("[Proxy Endpoint] ", baseUrl, path);
|
||||
|
||||
return [baseUrl, path].join("/");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user