Skip to content

Commit

Permalink
bugfix(ChatData): code merge bug fix (#810)
Browse files Browse the repository at this point in the history
1.code merge bug fix
  • Loading branch information
yhjun1026 authored Nov 21, 2023
2 parents 41430ef + 620cb95 commit dfe1370
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pilot/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,6 @@ def model_adaptation(
can_use_systems = system_messages[:-1]
else:
can_use_systems = system_messages
for i in range(len(user_messages)):
user_messages[-1] = system_messages[-1]
if len(system_messages) > 1:
can_use_system = system_messages[0]

for i in range(len(user_messages)):
conv.append_message(conv.roles[0], user_messages[i])
Expand All @@ -181,8 +177,6 @@ def model_adaptation(
else:
conv.update_system_message("".join(can_use_systems))

conv.update_system_message(can_use_system)

# Add a blank message for the assistant.
conv.append_message(conv.roles[1], None)
new_prompt = conv.get_prompt()
Expand Down

0 comments on commit dfe1370

Please sign in to comment.