Skip to content

Commit 8db8662

Browse files
authored
fix(conversation): return_all_except_first_string drops two messages, not one (kyegomez#2133)
return_all_except_first slices [1:] while return_all_except_first_string slices [2:], so the string variant silently loses the first real message. Both document the same contract and history_output_formatter offers them as sibling output types. Fixes kyegomez#2112
1 parent 6d5bc5a commit 8db8662

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

swarms/structs/conversation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1364,7 +1364,7 @@ def return_all_except_first_string(self):
13641364
return "\n".join(
13651365
[
13661366
f"{msg['content']}"
1367-
for msg in self.conversation_history[2:]
1367+
for msg in self.conversation_history[1:]
13681368
]
13691369
)
13701370

0 commit comments

Comments
 (0)