mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-19 04:54:37 +00:00
style: ruff format on map_system_message_pt fix
This commit is contained in:
parent
e45ab7c774
commit
23922773ab
1 changed files with 4 additions and 6 deletions
|
|
@ -115,12 +115,10 @@ def map_system_message_pt(messages: list) -> list:
|
|||
# Merge system prompt into the next message. Contents may be
|
||||
# strings or lists of content blocks (e.g. Anthropic-style
|
||||
# requests); merge as block lists when either side is a list.
|
||||
if isinstance(m["content"], list) or isinstance(
|
||||
next_m["content"], list
|
||||
):
|
||||
next_m["content"] = _content_as_block_list(
|
||||
m["content"]
|
||||
) + _content_as_block_list(next_m["content"])
|
||||
if isinstance(m["content"], list) or isinstance(next_m["content"], list):
|
||||
next_m["content"] = _content_as_block_list(m["content"]) + _content_as_block_list(
|
||||
next_m["content"]
|
||||
)
|
||||
else:
|
||||
next_m["content"] = m["content"] + " " + next_m["content"]
|
||||
elif next_role == "system": # Next message is a system message
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue