Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 45b34dd

Browse files
Change role to user for user prompts
1 parent 019f76f commit 45b34dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchchat/generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ def chat(
11221122
messages_to_encode.append(
11231123
{"role": "system", "content": self.system_prompt}
11241124
)
1125-
messages_to_encode.append({"role": "system", "content": prompt})
1125+
messages_to_encode.append({"role": "user", "content": prompt})
11261126
encoded = self.chat_formatter.encode_dialog_prompt(
11271127
messages_to_encode, add_generation_prompt=True,
11281128
)

0 commit comments

Comments
 (0)