Skip to content

Commit

Permalink
ignore system role messages
Browse files Browse the repository at this point in the history
Signed-off-by: eshwarprasadS <[email protected]>
  • Loading branch information
eshwarprasadS committed Feb 6, 2025
1 parent de945ad commit a5c060c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/instructlab/sdg/subset_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class TemplateConfig:
templates: Dict[str, str] = field(
default_factory=lambda: {
"default": "{{ text }}",
"conversation": "{% for msg in messages %}{{ msg.role }}: {{ msg.content }}\n{% endfor %}",
"conversation": "{% for msg in messages if msg.role != 'system' %}{{ msg.role }}: {{ msg.content }}\n{% endfor %}",
"qa": "Question: {{ question }}\nAnswer: {{ answer }}",
},
metadata={"advanced": True},
Expand Down

0 comments on commit a5c060c

Please sign in to comment.