mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
* fix(factory.py): fix conditional statement for merging messages with previous ones
This commit is contained in:
parent
389530efb4
commit
06d1aec49e
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue