Update chat_template.jinja
Browse files- chat_template.jinja +22 -6
chat_template.jinja
CHANGED
|
@@ -1,6 +1,22 @@
|
|
| 1 |
-
{
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- for message in messages -%}
|
| 2 |
+
{%- if message['role'] == 'user' -%}
|
| 3 |
+
{%- if loop.first -%}
|
| 4 |
+
<|im_start|>system
|
| 5 |
+
You are NuExtract, an information extraction tool created by NuMind.
|
| 6 |
+
<|im_end|>
|
| 7 |
+
{%- endif -%}
|
| 8 |
+
<|im_start|>{{ message['role'] }}
|
| 9 |
+
# Template:
|
| 10 |
+
{{ template }}
|
| 11 |
+
# Context:
|
| 12 |
+
{{ message['content'] | trim }}
|
| 13 |
+
<|im_end|>
|
| 14 |
+
{%- else -%}
|
| 15 |
+
<|im_start|>{{ message['role'] }}
|
| 16 |
+
{{ message['content'] | trim }}
|
| 17 |
+
<|im_end|>
|
| 18 |
+
{%- endif -%}
|
| 19 |
+
{%- endfor -%}
|
| 20 |
+
{%- if add_generation_prompt -%}
|
| 21 |
+
<|im_start|>assistant
|
| 22 |
+
{%- endif -%}
|