mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-28 06:06:38 +08:00
Update common.ts
This commit is contained in:
parent
342f7b17c1
commit
22da0d4bfc
@ -55,10 +55,6 @@ const isAzure = req.nextUrl.pathname.includes("azure/deployments") || Boolean(se
|
|||||||
req?.nextUrl?.searchParams?.get("api-version") ||
|
req?.nextUrl?.searchParams?.get("api-version") ||
|
||||||
serverConfig.azureApiVersion;
|
serverConfig.azureApiVersion;
|
||||||
baseUrl = baseUrl.split("/deployments").shift() as string;
|
baseUrl = baseUrl.split("/deployments").shift() as string;
|
||||||
path = `${req.nextUrl.pathname.replaceAll(
|
|
||||||
"/api/azure/",
|
|
||||||
"",
|
|
||||||
)}?api-version=${azureApiVersion}`;
|
|
||||||
|
|
||||||
// Forward compatibility:
|
// Forward compatibility:
|
||||||
// if display_name(deployment_name) not set, and '{deploy-id}' in AZURE_URL
|
// if display_name(deployment_name) not set, and '{deploy-id}' in AZURE_URL
|
||||||
@ -89,7 +85,7 @@ const isAzure = req.nextUrl.pathname.includes("azure/deployments") || Boolean(se
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const fetchUrl = cloudflareAIGatewayUrl(`${baseUrl}`);
|
const fetchUrl = cloudflareAIGatewayUrl(`${baseUrl}/${path}`);
|
||||||
console.log("fetchUrl", fetchUrl);
|
console.log("fetchUrl", fetchUrl);
|
||||||
const fetchOptions: RequestInit = {
|
const fetchOptions: RequestInit = {
|
||||||
headers: {
|
headers: {
|
||||||
|
Loading…
Reference in New Issue
Block a user