mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 21:56:38 +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");
|
const isAIFoundation = serverConfig.azureUrl?.includes(".models.ai.azure.com");
|
||||||
if (isAIFoundation) {
|
if (isAIFoundation) {
|
||||||
// For AI Foundation, use the path directly without api-version
|
// 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 {
|
} else {
|
||||||
const azureApiVersion =
|
const azureApiVersion =
|
||||||
req?.nextUrl?.searchParams?.get("api-version") ||
|
req?.nextUrl?.searchParams?.get("api-version") ||
|
||||||
|
Loading…
Reference in New Issue
Block a user