mirror of
https://www.modelscope.cn/ZhipuAI/GLM-4.1V-9B-Thinking.git
synced 2026-04-02 19:12:57 +08:00
init
This commit is contained in:
33
chat_template.jinja
Normal file
33
chat_template.jinja
Normal file
@ -0,0 +1,33 @@
|
||||
[gMASK]<sop>
|
||||
{%- for msg in messages %}
|
||||
{%- if msg.role == 'system' %}
|
||||
<|system|>
|
||||
{{ msg.content }}
|
||||
{%- elif msg.role == 'user' %}
|
||||
<|user|>{{ '\n' }}
|
||||
|
||||
{%- if msg.content is string %}
|
||||
{{ msg.content }}
|
||||
{%- else %}
|
||||
{%- for item in msg.content %}
|
||||
{%- if item.type == 'video' or 'video' in item %}
|
||||
<|begin_of_video|><|video|><|end_of_video|>
|
||||
{%- elif item.type == 'image' or 'image' in item %}
|
||||
<|begin_of_image|><|image|><|end_of_image|>
|
||||
{%- elif item.type == 'text' %}
|
||||
{{ item.text }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- elif msg.role == 'assistant' %}
|
||||
{%- if msg.metadata %}
|
||||
<|assistant|>{{ msg.metadata }}
|
||||
{{ msg.content }}
|
||||
{%- else %}
|
||||
<|assistant|>
|
||||
{{ msg.content }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{% if add_generation_prompt %}<|assistant|>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user