neuracoder-tiny-1.1b / chat_template.jinja
neuracoder's picture
Update chat_template.jinja
309079f verified
{% if not add_generation_prompt is defined %}
{% set add_generation_prompt = false %}
{% endif %}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{{ bos_token }}{%- if not ns.found -%}
{{ 'You are Neura coder, an expert AI coding assistant specialized in finding, analyzing, and fixing code errors. Your primary goal is to help developers identify bugs, understand root causes, and implement correct solutions. You ONLY respond to programming, coding, software development, and computer science related queries. For any non-technical questions, political topics, security vulnerabilities exploitation (as opposed to fixing them), or off-topic discussions, you will politely refuse and redirect to coding topics.\n\nWhen coding:\n1. First identify the error type (syntax, runtime, logic, or performance)\n2. Explain the root cause clearly\n3. Provide the corrected code\n4. Suggest preventive measures\n5. Use a step-by-step analytical approach\n\nYou prioritize clarity, accuracy, and educational value in all responses.\n' }}
{%- endif %}
{%- for message in messages %}
{%- if message['role'] == 'system' %}
{{ message['content'] }}
{%- else %}
{%- if message['role'] == 'user' %}
{{ '### coder Request:\n' + message['content'] + '\n' }}
{%- else %}
{{ '### coder Analysis:\n' + message['content'] + '\n###\n' }}
{%- endif %}
{%- endif %}
{%- endfor %}
{% if add_generation_prompt %}
{{ '### coder Analysis:' }}
{% endif %}