mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
update factory.py
This commit is contained in:
parent
7ca213e92f
commit
4c7d94b2b4
1 changed files with 4 additions and 2 deletions
|
|
@ -698,8 +698,10 @@ def anthropic_messages_pt_xml(messages: list):
|
|||
if messages[msg_i].get(
|
||||
"tool_calls", []
|
||||
): # support assistant tool invoke convertion
|
||||
assistant_text += convert_to_anthropic_tool_invoke( # type: ignore
|
||||
messages[msg_i]["tool_calls"]
|
||||
assistant_content.extend(
|
||||
convert_to_anthropic_tool_invoke( # type: ignore
|
||||
messages[msg_i]["tool_calls"]
|
||||
)
|
||||
)
|
||||
|
||||
assistant_content.append({"type": "text", "text": assistant_text})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue