mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-03 16:46:40 +08:00
commit
ef013634ee
@ -50,9 +50,9 @@ export async function requestOpenai(
|
||||
"/api/openai/",
|
||||
"",
|
||||
);
|
||||
let baseUrl = isAzure
|
||||
? serverConfig.azureUrl
|
||||
: serverConfig.baseUrl || OPENAI_BASE_URL;
|
||||
|
||||
let baseUrl =
|
||||
(isAzure ? serverConfig.azureUrl : serverConfig.baseUrl) || OPENAI_BASE_URL;
|
||||
|
||||
if (!baseUrl.startsWith("http")) {
|
||||
baseUrl = `https://${baseUrl}`;
|
||||
@ -110,10 +110,9 @@ export async function requestOpenai(
|
||||
}
|
||||
}
|
||||
|
||||
// const fetchUrl = `${baseUrl}/${path}`;
|
||||
const jsonBody = await req.json();
|
||||
const fetchUrl = cloudflareAIGatewayUrl(`${baseUrl}/${path}`);
|
||||
console.log("fetchUrl", fetchUrl);
|
||||
const jsonBody = await req.json();
|
||||
const fetchOptions: RequestInit = {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
@ -1195,8 +1195,7 @@ export function Settings() {
|
||||
{/* <ListItem*/}
|
||||
{/* title={Locale.Settings.Access.Baidu.Endpoint.Title}*/}
|
||||
{/* subTitle={*/}
|
||||
{/* Locale.Settings.Access.Anthropic.Endpoint.SubTitle +*/}
|
||||
{/* Baidu.ExampleEndpoint*/}
|
||||
{/* Locale.Settings.Access.Baidu.Endpoint.SubTitle*/}
|
||||
{/* }*/}
|
||||
{/* >*/}
|
||||
{/* <input*/}
|
||||
|
Loading…
Reference in New Issue
Block a user