mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-14 06:24:53 +00:00
* fix(factory.py): fix conditional statement for merging messages with previous ones
This commit is contained in:
@@ -1019,7 +1019,7 @@ def anthropic_messages_pt(messages: list):
|
||||
merge_with_previous = False
|
||||
else:
|
||||
new_messages.append({"role": "user", "content": user_content})
|
||||
else:
|
||||
elif msg_i > 0:
|
||||
merge_with_previous = True
|
||||
|
||||
assistant_content = []
|
||||
@@ -1053,7 +1053,7 @@ def anthropic_messages_pt(messages: list):
|
||||
merge_with_previous = False
|
||||
else:
|
||||
new_messages.append({"role": "assistant", "content": assistant_content})
|
||||
else:
|
||||
elif msg_i > 0:
|
||||
merge_with_previous = True
|
||||
|
||||
if msg_i == init_msg_i: # prevent infinite loops
|
||||
|
||||
Reference in New Issue
Block a user