expand support for non-US azure deployments (#1080)

* expand support for non-US azure deployments

* update conditional
This commit is contained in:
Timothy Carambat 2024-04-10 09:34:14 -07:00 committed by GitHub
parent 7407406643
commit d54e1c1f2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -425,8 +425,8 @@ function validChromaURL(input = "") {
function validAzureURL(input = "") { function validAzureURL(input = "") {
try { try {
new URL(input); new URL(input);
if (!input.includes("openai.azure.com")) if (!input.includes("openai.azure.com") && !input.includes("microsoft.com"))
return "URL must include openai.azure.com"; return "Valid Azure endpoints must contain openai.azure.com OR microsoft.com";
return null; return null;
} catch { } catch {
return "Not a valid URL"; return "Not a valid URL";