mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-04-17 18:18:11 +00:00
parent
88a0335fd2
commit
dde8bc238b
1 changed files with 1 additions and 12 deletions
|
@ -15,7 +15,7 @@ const KEY_MAPPING = {
|
|||
// Azure OpenAI Settings
|
||||
AzureOpenAiEndpoint: {
|
||||
envKey: "AZURE_OPENAI_ENDPOINT",
|
||||
checks: [isNotEmpty, validAzureURL],
|
||||
checks: [isNotEmpty],
|
||||
},
|
||||
AzureOpenAiTokenLimit: {
|
||||
envKey: "AZURE_OPENAI_TOKEN_LIMIT",
|
||||
|
@ -622,17 +622,6 @@ function validChromaURL(input = "") {
|
|||
: null;
|
||||
}
|
||||
|
||||
function validAzureURL(input = "") {
|
||||
try {
|
||||
new URL(input);
|
||||
if (!input.includes("openai.azure.com") && !input.includes("microsoft.com"))
|
||||
return "Valid Azure endpoints must contain openai.azure.com OR microsoft.com";
|
||||
return null;
|
||||
} catch {
|
||||
return "Not a valid URL";
|
||||
}
|
||||
}
|
||||
|
||||
function validOpenAiTokenLimit(input = "") {
|
||||
const tokenLimit = Number(input);
|
||||
if (isNaN(tokenLimit)) return "Token limit is not a number";
|
||||
|
|
Loading…
Add table
Reference in a new issue