File size: 552 Bytes
83a550d
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{{- "<|plamo:op|>dataset\ntranslation\n" -}}
{% for message in messages %}
    {%- if message['role'] == 'user' %}
        {{- '<|plamo:op|>input lang=Japanese|English\n' + message['content'] + '\n' }}
    {%- elif message['role'] == 'assistant' %}
        {{- '<|plamo:op|>output\n' + message['content']}}
        {%- if not loop.last %}
            {{- '\n'}}
        {%- endif %}
    {%- endif %}
    {% if loop.last and message['role'] != 'assistant' and add_generation_prompt %}
        {{- '<|plamo:op|>output\n' -}}
    {% endif %}
{% endfor %}