mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-24 17:06:53 +01:00
14 lines
512 B
YAML
14 lines
512 B
YAML
|
instruction_template: |-
|
||
|
{%- set ns = namespace(found=false) -%}
|
||
|
{%- for message in messages -%}
|
||
|
{%- if message['role'] == 'system' -%}
|
||
|
{%- set ns.found = true -%}
|
||
|
{%- endif -%}
|
||
|
{%- endfor -%}
|
||
|
{%- for message in messages -%}
|
||
|
{{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n' + message['content'].rstrip() + '<|eot_id|>' -}}
|
||
|
{%- endfor -%}
|
||
|
{%- if add_generation_prompt -%}
|
||
|
{{-'<|start_header_id|>assistant<|end_header_id|>\n\n'-}}
|
||
|
{%- endif -%}
|