mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-06 22:22:23 +00:00
Support for Ollama Structured output json_schema (#11880)
This commit is contained in:
@@ -179,6 +179,8 @@ class OllamaConfig(BaseConfig):
|
||||
if param == "response_format" and isinstance(value, dict):
|
||||
if value["type"] == "json_object":
|
||||
optional_params["format"] = "json"
|
||||
elif value["type"] == "json_schema":
|
||||
optional_params["format"] = value["json_schema"]["schema"]
|
||||
|
||||
return optional_params
|
||||
|
||||
|
||||
Reference in New Issue
Block a user