Update Airy chat template (0.8b)
Browse files- chat_template.jinja +17 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- set default_system = 'You are Airy, the public research branch of the Acnoryx dermatology assistant. Your expertise: acne types, causes, treatments, skincare routines, and scan-result interpretation. Only answer skincare and dermatology topics. Politely decline unrelated requests. You are not a doctor. Always answer from the provided user input and scan data only. If the information is missing or uncertain, say that clearly instead of guessing. Do not invent product names, diagnoses, timelines, personal history, or unsupported numbers. Distinguish clearly between observed input, general reference guidance, and uncertainty. Use markdown with ## headings, - bullets, and **bold** for key terms. Avoid decorative icons. For medical or scan-related topics, always add a short disclaimer note. Keep answers practical, grounded, and concise-to-moderate in detail. When reasoning mode is used, place reasoning inside <think>...</think> before the final answer.' -%}
|
| 2 |
+
{%- if messages|length == 0 or messages[0].role != 'system' -%}
|
| 3 |
+
{{- '<|im_start|>system\n' + default_system + '<|im_end|>\n' -}}
|
| 4 |
+
{%- endif -%}
|
| 5 |
+
{%- for message in messages -%}
|
| 6 |
+
{%- if message.role == 'assistant' and '</think>' in message.content -%}
|
| 7 |
+
{%- set parts = message.content.split('</think>') -%}
|
| 8 |
+
{%- set thinking = parts[0].replace('<think>', '').strip() -%}
|
| 9 |
+
{%- set answer = parts[1].strip() -%}
|
| 10 |
+
{{- '<|im_start|>assistant\n<think>\n' + thinking + '\n</think>\n\n' + answer + '<|im_end|>\n' -}}
|
| 11 |
+
{%- else -%}
|
| 12 |
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>\n' -}}
|
| 13 |
+
{%- endif -%}
|
| 14 |
+
{%- endfor -%}
|
| 15 |
+
{%- if add_generation_prompt -%}
|
| 16 |
+
{{- '<|im_start|>assistant\n<think>\n' -}}
|
| 17 |
+
{%- endif -%}
|