j2prompt-lint/jinja2-prompt-template-corpus huggingface dataset:
{%- for message in messages -%}
{{- '
' + message['role'] + '
' -}}
{%- if message['content'] is string -%}
{{- message['content'] -}}
{%- else -%}
{%- for part in message['content'] -%}
{%- if part['type'] == 'text' -%}
{{- part['text'] -}}
{%- elif part['type'] == 'image' -%}
{{- '<image>' -}}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{{- '

' -}}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{- '
assistant' -}}
{%- if controls -%}{{- ' ' + controls | tojson() -}}{%- endif -%}
{{- '
' -}}
{%- endif -%}