mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 13:46:37 +08:00
Update openai.ts
This commit is contained in:
parent
c5776ceb34
commit
e0f6ffdec1
@ -99,8 +99,13 @@ export class ChatGPTApi implements LLMApi {
|
||||
|
||||
if (baseUrl.length === 0) {
|
||||
const isApp = !!getClientConfig()?.isApp;
|
||||
const isAIFoundation = accessStore.azureUrl?.includes(".models.ai.azure.com");
|
||||
if (isAzure && isAIFoundation) {
|
||||
baseUrl = accessStore.azureUrl || "";
|
||||
} else {
|
||||
const apiPath = isAzure ? ApiPath.Azure : ApiPath.OpenAI;
|
||||
baseUrl = isApp ? OPENAI_BASE_URL : apiPath;
|
||||
}
|
||||
}
|
||||
|
||||
if (baseUrl.endsWith("/")) {
|
||||
|
Loading…
Reference in New Issue
Block a user