Support for Ollama Structured output json_schema (#11880)
This commit is contained in:
parent
aaa41d1e24
commit
34bfaf5e71
@ -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…
Reference in New Issue
Block a user