GLM-Image-Backup / processor /chat_template.jinja
siyarajput's picture
Upload processor/chat_template.jinja with huggingface_hub
f3a3d60 verified
Raw History Blame Contribute Delete
435 Bytes
{%- for m in messages -%}
{%- if m.content is string -%}
{{ m.content }}
{%- else -%}
{%- for item in m.content -%}
{%- if item.type == 'image' or item.get('image') is not none -%}
<|dit_token_16384|><|image|><|dit_token_16385|>
{%- elif item.type == 'text' -%}
{{ item.text }}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endfor -%}