mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 13:46:37 +08:00
Update common.ts
This commit is contained in:
parent
4aa0ff789e
commit
7f13025590
@ -52,11 +52,7 @@ const isAzure = req.nextUrl.pathname.includes("azure/deployments") || Boolean(se
|
|||||||
|
|
||||||
if (isAzure) {
|
if (isAzure) {
|
||||||
const isAIFoundation = serverConfig.azureUrl?.includes(".models.ai.azure.com");
|
const isAIFoundation = serverConfig.azureUrl?.includes(".models.ai.azure.com");
|
||||||
if (isAIFoundation && serverConfig.azureUrl) {
|
if (!isAIFoundation) {
|
||||||
// For AI Foundation, use the path directly without api-version
|
|
||||||
baseUrl = serverConfig.azureUrl;
|
|
||||||
// path = req.nextUrl.pathname.replaceAll("/api/azure/", "");
|
|
||||||
} else {
|
|
||||||
const azureApiVersion =
|
const azureApiVersion =
|
||||||
req?.nextUrl?.searchParams?.get("api-version") ||
|
req?.nextUrl?.searchParams?.get("api-version") ||
|
||||||
serverConfig.azureApiVersion;
|
serverConfig.azureApiVersion;
|
||||||
|
Loading…
Reference in New Issue
Block a user