mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-28 06:06:38 +08:00
Update openai.ts
This commit is contained in:
parent
82f75d9f41
commit
3e18e7b0fb
@ -87,14 +87,12 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
let baseUrl = "";
|
let baseUrl = "";
|
||||||
|
|
||||||
const isAzure = path.includes("deployments") || accessStore.azureUrl?.includes(".models.ai.azure.com");
|
const isAzure = path.includes("deployments") || accessStore.azureUrl?.includes(".models.ai.azure.com");
|
||||||
if (accessStore.useCustomConfig) {
|
|
||||||
if (isAzure && !accessStore.isValidAzure()) {
|
if (isAzure && !accessStore.isValidAzure()) {
|
||||||
throw Error(
|
throw Error(
|
||||||
"incomplete azure config, please check it in your settings page",
|
"incomplete azure config, please check it in your settings page",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
baseUrl = isAzure ? accessStore.azureUrl : accessStore.openaiUrl;
|
baseUrl = isAzure ? accessStore.azureUrl : accessStore.openaiUrl;
|
||||||
}
|
|
||||||
|
|
||||||
if (baseUrl.length === 0) {
|
if (baseUrl.length === 0) {
|
||||||
const isApp = !!getClientConfig()?.isApp;
|
const isApp = !!getClientConfig()?.isApp;
|
||||||
|
Loading…
Reference in New Issue
Block a user