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/",
|
"/api/openai/",
|
||||||
"",
|
"",
|
||||||
);
|
);
|
||||||
let baseUrl = isAzure
|
|
||||||
? serverConfig.azureUrl
|
let baseUrl =
|
||||||
: serverConfig.baseUrl || OPENAI_BASE_URL;
|
(isAzure ? serverConfig.azureUrl : serverConfig.baseUrl) || OPENAI_BASE_URL;
|
||||||
|
|
||||||
if (!baseUrl.startsWith("http")) {
|
if (!baseUrl.startsWith("http")) {
|
||||||
baseUrl = `https://${baseUrl}`;
|
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}`);
|
const fetchUrl = cloudflareAIGatewayUrl(`${baseUrl}/${path}`);
|
||||||
console.log("fetchUrl", fetchUrl);
|
console.log("fetchUrl", fetchUrl);
|
||||||
|
const jsonBody = await req.json();
|
||||||
const fetchOptions: RequestInit = {
|
const fetchOptions: RequestInit = {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
@ -1195,8 +1195,7 @@ export function Settings() {
|
|||||||
{/* <ListItem*/}
|
{/* <ListItem*/}
|
||||||
{/* title={Locale.Settings.Access.Baidu.Endpoint.Title}*/}
|
{/* title={Locale.Settings.Access.Baidu.Endpoint.Title}*/}
|
||||||
{/* subTitle={*/}
|
{/* subTitle={*/}
|
||||||
{/* Locale.Settings.Access.Anthropic.Endpoint.SubTitle +*/}
|
{/* Locale.Settings.Access.Baidu.Endpoint.SubTitle*/}
|
||||||
{/* Baidu.ExampleEndpoint*/}
|
|
||||||
{/* }*/}
|
{/* }*/}
|
||||||
{/* >*/}
|
{/* >*/}
|
||||||
{/* <input*/}
|
{/* <input*/}
|
||||||
|
Loading…
Reference in New Issue
Block a user