mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
Revert "Fix #20557: Fix Gemini multi-turn tool calling message formatting (#2…"
This reverts commit 49078b3c6b.
This commit is contained in:
parent
e68b970953
commit
4931bac3da
1 changed files with 2 additions and 2 deletions
|
|
@ -500,7 +500,7 @@ def _gemini_convert_messages_with_history( # noqa: PLR0915
|
|||
messages[msg_i]["role"] not in tool_call_message_roles
|
||||
):
|
||||
if len(tool_call_responses) > 0:
|
||||
contents.append(ContentType(role="user", parts=tool_call_responses))
|
||||
contents.append(ContentType(parts=tool_call_responses))
|
||||
tool_call_responses = []
|
||||
|
||||
if msg_i == init_msg_i: # prevent infinite loops
|
||||
|
|
@ -510,7 +510,7 @@ def _gemini_convert_messages_with_history( # noqa: PLR0915
|
|||
)
|
||||
)
|
||||
if len(tool_call_responses) > 0:
|
||||
contents.append(ContentType(role="user", parts=tool_call_responses))
|
||||
contents.append(ContentType(parts=tool_call_responses))
|
||||
|
||||
if len(contents) == 0:
|
||||
verbose_logger.warning(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue