{% for message in messages %}{{'<|im_start|>' + message['role'] + '
' + message['content'].strip() + '<|im_end|>' + '
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
' }}{% endif %}