mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
add ollama fix
This commit is contained in:
parent
ed0772fdd0
commit
be33311002
1 changed files with 6 additions and 3 deletions
|
|
@ -19,6 +19,7 @@ SUPPORTED_PROVIDERS = [
|
|||
"together_ai",
|
||||
"azure_openai",
|
||||
"xai",
|
||||
"ollama",
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -219,10 +220,12 @@ def validate_and_render_schema():
|
|||
)
|
||||
provider = model_name_tokens[0]
|
||||
|
||||
# Validate azure_openai provider requires base_url
|
||||
if provider == "azure_openai" and llm_provider.get("base_url") is None:
|
||||
# Validate azure_openai and ollama provider requires base_url
|
||||
if (
|
||||
provider == "azure_openai" or provider == "ollama"
|
||||
) and llm_provider.get("base_url") is None:
|
||||
raise Exception(
|
||||
f"Provider 'azure_openai' requires 'base_url' to be set for model {model_name}"
|
||||
f"Provider '{provider}' requires 'base_url' to be set for model {model_name}"
|
||||
)
|
||||
|
||||
model_id = "/".join(model_name_tokens[1:])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue