Update common.ts

This commit is contained in:
Richard C Lim 2025-02-01 21:24:00 -05:00 committed by GitHub
parent 3b3bcea8ac
commit 039b606e6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,10 +28,10 @@ const isAzure = req.nextUrl.pathname.includes("azure/deployments") || Boolean(se
}
let path = `${req.nextUrl.pathname}`.replaceAll("/api/openai/", "");
let baseUrl =
let baseUrl = serverConfig.azureUrl;
/* let baseUrl =
(isAzure ? serverConfig.azureUrl : serverConfig.baseUrl) || OPENAI_BASE_URL;
*/
if (!baseUrl.startsWith("http")) {
baseUrl = `https://${baseUrl}`;
}