neuracoder commited on
Commit
33f3474
·
verified ·
1 Parent(s): a4353ce

Update chat_template.jinja

Browse files
Files changed (1) hide show
  1. chat_template.jinja +18 -14
chat_template.jinja CHANGED
@@ -1,26 +1,30 @@
1
  {% if not add_generation_prompt is defined %}
2
- {% set add_generation_prompt = false %}
3
  {% endif %}
 
4
  {%- set ns = namespace(found=false) -%}
5
  {%- for message in messages -%}
6
- {%- if message['role'] == 'system' -%}
7
- {%- set ns.found = true -%}
8
- {%- endif -%}
9
  {%- endfor -%}
10
- {{bos_token}}{%- if not ns.found -%}
11
- {{'You are an AI programming assistant, utilizing the Deepseek Coder model, developed by Deepseek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer\n'}}
 
12
  {%- endif %}
 
13
  {%- for message in messages %}
14
- {%- if message['role'] == 'system' %}
15
- {{ message['content'] }}
 
 
 
16
  {%- else %}
17
- {%- if message['role'] == 'user' %}
18
- {{'### Instruction:\n' + message['content'] + '\n'}}
19
- {%- else %}
20
- {{'### Response:\n' + message['content'] + '\n<|EOT|>\n'}}
21
- {%- endif %}
22
  {%- endif %}
 
23
  {%- endfor %}
 
24
  {% if add_generation_prompt %}
25
- {{'### Response:'}}
26
  {% endif %}
 
1
  {% if not add_generation_prompt is defined %}
2
+ {% set add_generation_prompt = false %}
3
  {% endif %}
4
+
5
  {%- set ns = namespace(found=false) -%}
6
  {%- for message in messages -%}
7
+ {%- if message['role'] == 'system' -%}
8
+ {%- set ns.found = true -%}
9
+ {%- endif -%}
10
  {%- endfor -%}
11
+
12
+ {{ bos_token }}{%- if not ns.found -%}
13
+ {{ 'You are Neura Debugger, an expert AI debugging 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, debugging, 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 debugging topics.\n\nWhen debugging:\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' }}
14
  {%- endif %}
15
+
16
  {%- for message in messages %}
17
+ {%- if message['role'] == 'system' %}
18
+ {{ message['content'] }}
19
+ {%- else %}
20
+ {%- if message['role'] == 'user' %}
21
+ {{ '### Debug Request:\n' + message['content'] + '\n' }}
22
  {%- else %}
23
+ {{ '### Debug Analysis:\n' + message['content'] + '\n###\n' }}
 
 
 
 
24
  {%- endif %}
25
+ {%- endif %}
26
  {%- endfor %}
27
+
28
  {% if add_generation_prompt %}
29
+ {{ '### Debug Analysis:' }}
30
  {% endif %}