Bertug1911 commited on
Commit
efe0871
·
verified ·
1 Parent(s): a00c22f

Update chat_template.jinja

Browse files
Files changed (1) hide show
  1. chat_template.jinja +1 -1
chat_template.jinja CHANGED
@@ -1 +1 @@
1
- {% for message in messages %}<|im_start|>{{ message['role'] }}<|im_sep|>{{ message['content'] }}<|im_end|>{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant<|im_sep|>{% endif %}
 
1
+ {% set default_system = "Your name is BrtGPT and you are a LLM model, developed by BrtAI, respond helpfull and harmless to the questions." %}{% set ns = namespace(all_system_parts=[]) %}{% if system_message %}{% set ns.all_system_parts = ns.all_system_parts + [system_message] %}{% endif %}{% for message in messages %}{% if message['role'] == 'system' %}{% set ns.all_system_parts = ns.all_system_parts + [message['content']] %}{% endif %}{% endfor %}{% if ns.all_system_parts %}{% set combined_system = ns.all_system_parts | join(' ') + ' ' + default_system %}{% else %}{% set combined_system = default_system %}{% endif %}<|im_start|>system<|im_sep|>{{ combined_system }}<|im_end|>{% for message in messages %}{% if message['role'] != 'system' %}<|im_start|>{{ message['role'] }}<|im_sep|>{{ message['content'] }}<|im_end|>{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant<|im_sep|>{% endif %}