mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix(anthropic): handle tool_choice type 'none' in messages API
This commit is contained in:
parent
63425b4cb4
commit
3c591f0379
1 changed files with 2 additions and 0 deletions
|
|
@ -776,6 +776,8 @@ class LiteLLMAnthropicMessagesAdapter:
|
|||
return ChatCompletionToolChoiceObjectParam(
|
||||
type="function", function=tc_function_param
|
||||
)
|
||||
elif tool_choice["type"] == "none":
|
||||
return "none"
|
||||
else:
|
||||
raise ValueError(
|
||||
"Incompatible tool choice param submitted - {}".format(tool_choice)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue