Skip to content

Commit

Permalink
chat: Change role to user for user prompts (#1447)
Browse files Browse the repository at this point in the history
Co-authored-by: Jack-Khuu <[email protected]>
  • Loading branch information
vladoovtcharov and Jack-Khuu authored Jan 22, 2025
1 parent 025d412 commit fb65b8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchchat/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ def chat(
messages_to_encode.append(
{"role": "system", "content": self.system_prompt}
)
messages_to_encode.append({"role": "system", "content": prompt})
messages_to_encode.append({"role": "user", "content": prompt})
encoded = self.chat_formatter.encode_dialog_prompt(
messages_to_encode, add_generation_prompt=True,
)
Expand Down

0 comments on commit fb65b8b

Please sign in to comment.