unit-test-model-16bit / chat_template.jinja
metindeder's picture
Upload tokenizer
a067ff1 verified
raw
history blame contribute delete
538 Bytes
{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages %}{% else %}{% set loop_messages = [{'role': 'system', 'content': 'You are an expert programmer and unit test generator. Your goal is to write a comprehensive and correct unit test code for the given source code based on the instruction.'}] + messages %}{% endif %}{% for message in loop_messages %}{{'<|im_start|>' + message['role'] + '
' + message['content'] + '<|im_end|>' + '
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
' }}{% endif %}