Fix: ollama provider (#16519)

This commit is contained in:
Lynn
2026-07-01 13:24:31 +08:00
committed by GitHub
parent 8f24b30652
commit b6fa5ce4ea
2 changed files with 3 additions and 11 deletions

View File

@@ -336,8 +336,8 @@ async def create_provider_instance(tenant_id: str = None, provider_id_or_name: s
type: object
"""
data = await request.get_json()
if not data or "instance_name" not in data or ("api_key" not in data and provider_id_or_name != "VLLM"):
return get_error_argument_result(message="instance_name and api_key are required")
if not data or "instance_name" not in data:
return get_error_argument_result(message="instance_name is required")
instance_name = data["instance_name"]
api_key = data.get("api_key", "")

View File

@@ -1760,15 +1760,7 @@
"tags": "LLM,TEXT EMBEDDING,SPEECH2TEXT,MODERATION",
"status": "1",
"rank": "830",
"llm": [
{
"llm_name": "agnuxo/cajal-4b-p2pclaw",
"tags": "LLM,CHAT,32K,SCIENTIFIC_WRITING",
"max_tokens": 32768,
"model_type": "chat",
"is_tools": false
}
]
"llm": []
},
{
"name": "ModelScope",