mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
add_function_to_prompt bug fix
This blows up when there's no "functions" in the dictionary even when tools is present because the inner function executes regardless (does not short circuit).
This commit is contained in:
parent
0d3aa8d323
commit
78890e2f33
1 changed files with 1 additions and 1 deletions
|
@ -4956,7 +4956,7 @@ def get_optional_params(
|
|||
litellm.add_function_to_prompt
|
||||
): # if user opts to add it to prompt instead
|
||||
optional_params["functions_unsupported_model"] = non_default_params.pop(
|
||||
"tools", non_default_params.pop("functions")
|
||||
"tools", non_default_params.pop("functions", None)
|
||||
)
|
||||
else:
|
||||
raise UnsupportedParamsError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue