forked from phoenix/litellm-mirror
Merge pull request #3439 from phact/patch-3
add_function_to_prompt bug fix
This commit is contained in:
commit
4e7b5aa9d7
2 changed files with 12 additions and 2 deletions
|
@ -4836,7 +4836,7 @@ def get_optional_params(
|
|||
**kwargs,
|
||||
):
|
||||
# retrieve all parameters passed to the function
|
||||
passed_params = locals()
|
||||
passed_params = locals().copy()
|
||||
special_params = passed_params.pop("kwargs")
|
||||
for k, v in special_params.items():
|
||||
if k.startswith("aws_") and (
|
||||
|
@ -4933,6 +4933,7 @@ def get_optional_params(
|
|||
and custom_llm_provider != "mistral"
|
||||
and custom_llm_provider != "anthropic"
|
||||
and custom_llm_provider != "cohere_chat"
|
||||
and custom_llm_provider != "cohere"
|
||||
and custom_llm_provider != "bedrock"
|
||||
and custom_llm_provider != "ollama_chat"
|
||||
):
|
||||
|
@ -4957,7 +4958,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