mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
fix(utils.py): only add non none values to extra body
This commit is contained in:
parent
085194b11d
commit
8db3f6f927
1 changed files with 2 additions and 2 deletions
|
|
@ -4085,7 +4085,7 @@ def add_provider_specific_params_to_optional_params(
|
|||
):
|
||||
extra_body = passed_params.pop("extra_body", {})
|
||||
for k in passed_params.keys():
|
||||
if k not in openai_params:
|
||||
if k not in openai_params and passed_params[k] is not None:
|
||||
extra_body[k] = passed_params[k]
|
||||
optional_params.setdefault("extra_body", {})
|
||||
initial_extra_body = {
|
||||
|
|
@ -4107,7 +4107,7 @@ def add_provider_specific_params_to_optional_params(
|
|||
)
|
||||
else:
|
||||
for k in passed_params.keys():
|
||||
if k not in openai_params:
|
||||
if k not in openai_params and passed_params[k] is not None:
|
||||
optional_params[k] = passed_params[k]
|
||||
return optional_params
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue