mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 13:46:37 +08:00
Update common.ts
added baseUrl
This commit is contained in:
parent
104264cde7
commit
32d788d808
@ -54,7 +54,9 @@ export async function requestOpenai(req: NextRequest) {
|
||||
const isAIFoundation = serverConfig.azureUrl?.includes(".models.ai.azure.com");
|
||||
if (isAIFoundation) {
|
||||
// For AI Foundation, use the path directly without api-version
|
||||
path = req.nextUrl.pathname.replaceAll("/api/azure/", "");
|
||||
baseUrl = serverConfig.azureUrl;
|
||||
path = "chat/completions";
|
||||
// path = req.nextUrl.pathname.replaceAll("/api/azure/", "");
|
||||
} else {
|
||||
const azureApiVersion =
|
||||
req?.nextUrl?.searchParams?.get("api-version") ||
|
||||
|
Loading…
Reference in New Issue
Block a user