mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Support for Ollama Structured output json_schema (#11880)
This commit is contained in:
parent
aaa41d1e24
commit
34bfaf5e71
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue