Skip to content
Snippets Groups Projects
Unverified Commit dde8bc23 authored by Sean Hatfield's avatar Sean Hatfield Committed by GitHub
Browse files

[FIX] Remove Azure URL validation (#1758)

remove azure url validation
parent 88a0335f
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ const KEY_MAPPING = { ...@@ -15,7 +15,7 @@ const KEY_MAPPING = {
// Azure OpenAI Settings // Azure OpenAI Settings
AzureOpenAiEndpoint: { AzureOpenAiEndpoint: {
envKey: "AZURE_OPENAI_ENDPOINT", envKey: "AZURE_OPENAI_ENDPOINT",
checks: [isNotEmpty, validAzureURL], checks: [isNotEmpty],
}, },
AzureOpenAiTokenLimit: { AzureOpenAiTokenLimit: {
envKey: "AZURE_OPENAI_TOKEN_LIMIT", envKey: "AZURE_OPENAI_TOKEN_LIMIT",
...@@ -622,17 +622,6 @@ function validChromaURL(input = "") { ...@@ -622,17 +622,6 @@ function validChromaURL(input = "") {
: null; : 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 = "") { function validOpenAiTokenLimit(input = "") {
const tokenLimit = Number(input); const tokenLimit = Number(input);
if (isNaN(tokenLimit)) return "Token limit is not a number"; if (isNaN(tokenLimit)) return "Token limit is not a number";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment