mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
style(gemini): use list.extend to satisfy strict ruff rules
This commit is contained in:
parent
2ded7fe040
commit
3fde52bef5
1 changed files with 5 additions and 3 deletions
|
|
@ -938,13 +938,15 @@ def gemini_convert_messages_with_history(
|
|||
)
|
||||
## check if gemini_tool_call already exists in assistant_content before this batch
|
||||
pre_existing_parts = list(assistant_content)
|
||||
for gemini_tool_call_part in gemini_tool_call_parts:
|
||||
assistant_content.extend(
|
||||
gemini_tool_call_part
|
||||
for gemini_tool_call_part in gemini_tool_call_parts
|
||||
if not check_if_part_exists_in_parts(
|
||||
pre_existing_parts,
|
||||
gemini_tool_call_part,
|
||||
excluded_keys=["thoughtSignature"],
|
||||
):
|
||||
assistant_content.append(gemini_tool_call_part)
|
||||
)
|
||||
)
|
||||
# Only record this as the active tool-call message when it actually
|
||||
# carries tool calls. The `if` guard above is also entered for a
|
||||
# text-only assistant message (`assistant_msg.get("tool_calls", [])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue