tokenizer.chat_template.systemone
{#- Aurelis's prompt for llama.cpp's /v1/systemone (decision type pplx-decider), from Ollama 0.40.5 on: the json.dumps of
{state, question, options} that decidetrain.py trains on (tev1_prompt), one question per prompt, answered by the option's
label letter. As in training, the state and the question are text: an object sent as state is written as compact JSON. -#}
{%- set ns = namespace(question=instructions, state=state, description="", options="") -%}
{%- if ns.question is none or (ns.question is string and ns.question | trim == "") -%}
{%- set ns.question = id -%}
{%- elif ns.question is not string -%}
{%- set ns.question = ns.question | tojson(separators=[",", ":"]) -%}
{%- endif -%}
{%- if ns.state is none or (ns.state is string and ns.state | trim == "") -%}
{%- set ns.state = "(no state)" -%}
{%- elif ns.state is not string -%}
{%- set ns.state = ns.state | tojson(separators=[",", ":"]) -%}
{%- endif -%}
{%- for option in options -%}
{%- set ns.description = option.description -%}
{%- if ns.description is none or (ns.description is string and ns.description | trim == "") -%}
{%- if type == "noul" -%}
{%- set ns.description = "Yes" if option.key == "true" else "No" -%}
{%- else -%}
{%- set ns.description = option.key -%}
{%- endif -%}
{%- elif ns.description is not string -%}
{%- set ns.description = ns.description | tojson(separators=[",", ":"]) -%}
{%- endif -%}
{%- if not loop.first -%}
{%- set ns.options = ns.options + ", " -%}
{%- endif -%}
{%- set ns.options = ns.options + '{"label": ' + (option.label | tojson) + ', "key": ' + (option.key | tojson) + ', "description": ' + (ns.description | tojson) + '}' -%}
{%- endfor -%}
{{- "<|im_start|>user\n" -}}
{{- '{"state": ' + (ns.state | tojson) + ', "question": ' + (ns.question | tojson) + ', "options": [' + ns.options + ']}' -}}
{{- "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n" -}}
{#- Aurelis's prompt for llama.cpp's /v1/systemone (decision type pplx-decider), from Ollama 0.40.5 on: the json.dumps of
{state, question, options} that decidetrain.py trains on (tev1_prompt), one question per prompt, answered by the option's
label letter. As in training, the state and the question are text: an object sent as state is written as compact JSON. -#}
{%- set ns = namespace(question=instructions, state=state, description="", options="") -%}
{%- if ns.question is none or (ns.question is string and ns.question | trim == "") -%}
{%- set ns.question = id -%}
{%- elif ns.question is not string -%}
{%- set ns.question = ns.question | tojson(separators=[",", ":"]) -%}
{%- endif -%}
{%- if ns.state is none or (ns.state is string and ns.state | trim == "") -%}
{%- set ns.state = "(no state)" -%}
{%- elif ns.state is not string -%}
{%- set ns.state = ns.state | tojson(separators=[",", ":"]) -%}
{%- endif -%}
{%- for option in options -%}
{%- set ns.description = option.description -%}
{%- if ns.description is none or (ns.description is string and ns.description | trim == "") -%}
{%- if type == "noul" -%}
{%- set ns.description = "Yes" if option.key == "true" else "No" -%}
{%- else -%}
{%- set ns.description = option.key -%}
{%- endif -%}
{%- elif ns.description is not string -%}
{%- set ns.description = ns.description | tojson(separators=[",", ":"]) -%}
{%- endif -%}
{%- if not loop.first -%}
{%- set ns.options = ns.options + ", " -%}
{%- endif -%}
{%- set ns.options = ns.options + '{"label": ' + (option.label | tojson) + ', "key": ' + (option.key | tojson) + ', "description": ' + (ns.description | tojson) + '}' -%}
{%- endfor -%}
{{- "<|im_start|>user\n" -}}
{{- '{"state": ' + (ns.state | tojson) + ', "question": ' + (ns.question | tojson) + ', "options": [' + ns.options + ']}' -}}
{{- "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n" -}}