mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(utils.py): add 'enforce_validation' param
This commit is contained in:
parent
69d06cfbcd
commit
7670c5bd13
2 changed files with 14 additions and 3 deletions
|
@ -621,8 +621,14 @@ def client(original_function):
|
|||
],
|
||||
dict,
|
||||
)
|
||||
and "enforce_validation"
|
||||
in optional_params["response_format"]
|
||||
and optional_params["response_format"][
|
||||
"enforce_validation"
|
||||
]
|
||||
is True
|
||||
):
|
||||
# schema given, json response expected
|
||||
# schema given, json response expected, and validation enforced
|
||||
litellm.litellm_core_utils.json_validation_rule.validate_schema(
|
||||
schema=optional_params["response_format"][
|
||||
"response_schema"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue