mirror of
https://github.com/katanemo/plano.git
synced 2026-06-26 15:39:40 +02:00
adding valdiating for azure_openai
This commit is contained in:
parent
ff35799fbe
commit
03753481ce
1 changed files with 6 additions and 0 deletions
|
|
@ -124,6 +124,12 @@ def validate_and_render_schema():
|
||||||
f"Invalid model name {model_name}. Please provide model name in the format <provider>/<model_id>."
|
f"Invalid model name {model_name}. Please provide model name in the format <provider>/<model_id>."
|
||||||
)
|
)
|
||||||
provider = model_name_tokens[0]
|
provider = model_name_tokens[0]
|
||||||
|
# Validate azure_openai provider requires base_url
|
||||||
|
if provider == "azure_openai" and llm_provider.get("base_url") is None:
|
||||||
|
raise Exception(
|
||||||
|
f"Provider 'azure_openai' requires 'base_url' to be set for model {model_name}"
|
||||||
|
)
|
||||||
|
|
||||||
model_id = "/".join(model_name_tokens[1:])
|
model_id = "/".join(model_name_tokens[1:])
|
||||||
if provider not in SUPPORTED_PROVIDERS:
|
if provider not in SUPPORTED_PROVIDERS:
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue