Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
build(docker): add chat template for chatglm (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
orionji authored Apr 20, 2023
1 parent b12e907 commit aad86ad
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions deployments/bundle/chatglm.chat.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% if messages|length >= 3 -%}
{% for message in messages -%}
{% if message.role == "system" -%}
{{ message.content }}
{% elif message.role == "user" -%}
[Round {{ loop.index0 // 2 }}]
问:{{ message.content }}
{% elif message.role == "assistant" -%}
答:{{ message.content }}
{% endif -%}
{% endfor -%}
答:
{%- else -%}
{% for message in messages -%}
{{ message.content }}
{%- endfor -%}
{% endif %}

0 comments on commit aad86ad

Please sign in to comment.