chargoddard
commited on
Commit
•
bd4e17e
1
Parent(s):
4bcd215
Create webui-prompt-template.yml
Browse files- webui-prompt-template.yml +24 -0
webui-prompt-template.yml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
instruction_template: |-
|
2 |
+
{%- set ns = namespace(found=false) -%}
|
3 |
+
{%- for message in messages -%}
|
4 |
+
{%- if message['role'] == 'system' -%}
|
5 |
+
{%- set ns.found = true -%}
|
6 |
+
{%- endif -%}
|
7 |
+
{%- endfor -%}
|
8 |
+
{%- if not ns.found -%}
|
9 |
+
{{- '' + '' + '' -}}
|
10 |
+
{%- endif %}
|
11 |
+
{%- for message in messages %}
|
12 |
+
{%- if message['role'] == 'system' -%}
|
13 |
+
{{- ' ***System:' + message['content'] -}}
|
14 |
+
{%- else -%}
|
15 |
+
{%- if message['role'] == 'user' -%}
|
16 |
+
{{-' ***Query:' + message['content'] -}}
|
17 |
+
{%- else -%}
|
18 |
+
{{-' ***Response:' + message['content'] -}}
|
19 |
+
{%- endif -%}
|
20 |
+
{%- endif -%}
|
21 |
+
{%- endfor -%}
|
22 |
+
{%- if add_generation_prompt -%}
|
23 |
+
{{-' ***Response:'-}}
|
24 |
+
{%- endif -%}
|