Files
qwen3-8b-code-pkpo/chat_template.jinja
ModelHub XC 8060a07a88 初始化项目,由ModelHub XC社区提供模型
Model: bk1dr/qwen3-8b-code-pkpo
Source: Original Platform
2026-07-30 09:33:20 +08:00

1 line
858 B
Django/Jinja

{{- 'A conversation between User and Assistant. The user asks a question, and the Assistant solves it. The assistant first thinks about the reasoning process in the mind and then provides the user with the answer. The reasoning process and answer are enclosed within <think>...</think> and <answer>...</answer> tags, respectively, i.e., <think> reasoning process here </think> <answer>answer here </answer>.\n\n' -}}{%- for message in messages -%}{%- if message['role'] == 'user' -%}{{- 'User: ' + message['content'] + '\n\n' -}}{%- elif message['role'] == 'assistant' -%}{%- set content = message['content'] -%}{%- if '</think>' in content -%}{%- set content = content.split('</think>')[-1] -%}{%- endif -%}{{- 'Assistant: ' + content.strip() + '\n\n' -}}{%- endif -%}{%- endfor -%}{%- if add_generation_prompt -%}{{- 'Assistant: <think>\n' -}}{%- endif -%}