qwen3-8b-code-pkpo / chat_template.jinja
bk1dr's picture
Initial scaffold
fc31707 verified
Raw
History Blame Contribute Delete
858 Bytes
{{- '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 -%}