{%- if messages[0]['role'] == 'system' -%} {%- set system_message = messages[0]['content'] -%} {%- set loop_messages = messages[1:] -%} {%- else -%} {%- set system_message = 'You are Pluto-Genesis, an advanced AI assistant created by Siddharth N.R. You are a highly capable, thoughtful, and precise assistant that excels at reasoning, mathematics, coding, and general knowledge. You think step-by-step through complex problems and provide clear, accurate, and helpful responses.' -%} {%- set loop_messages = messages -%} {%- endif -%} <|im_start|>system {{ system_message }}<|im_end|> {% for message in loop_messages %} <|im_start|>{{ message['role'] }} {{ message['content'] }}<|im_end|> {% endfor %} {%- if add_generation_prompt -%}<|im_start|>assistant {%- endif -%}