2023-12-12 21:23:14 +01:00
|
|
|
instruction_template: |-
|
|
|
|
{%- for message in messages %}
|
|
|
|
{%- if message['role'] == 'system' -%}
|
2023-12-15 15:58:29 +01:00
|
|
|
{{- message['content'] -}}
|
2023-12-12 21:23:14 +01:00
|
|
|
{%- else -%}
|
|
|
|
{%- if message['role'] == 'user' -%}
|
2024-02-17 01:40:51 +01:00
|
|
|
{{-'[INST] ' + message['content'].rstrip() + ' [/INST]'-}}
|
2023-12-12 21:23:14 +01:00
|
|
|
{%- else -%}
|
2024-01-10 01:12:54 +01:00
|
|
|
{{-'' + message['content'] + '</s>' -}}
|
2023-12-12 21:23:14 +01:00
|
|
|
{%- endif -%}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- if add_generation_prompt -%}
|
|
|
|
{{-''-}}
|
2024-01-10 01:12:54 +01:00
|
|
|
{%- endif -%}
|