Fix loop step from 1 to 2 in get_conversation_turns, ensure user-assistant pairing
This commit is contained in:
parent
0c42d66954
commit
3150c2812f
1 changed files with 1 additions and 1 deletions
|
|
@ -655,7 +655,7 @@ def get_conversation_turns(conversation_history: list[dict], num_turns: int) ->
|
|||
else:
|
||||
turn = [msg1, msg2] # user, assistant
|
||||
turns.append(turn)
|
||||
i += 1
|
||||
i += 2
|
||||
|
||||
# Keep only the most recent num_turns
|
||||
if len(turns) > num_turns:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue