mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-31 11:28:28 +08:00
* feat:提交前端代码 * feat:提交logo样式切换 * feat:替换avatar、部分位置icon、chatchat相关说明、git链接、Wiki链接、关于、设置、反馈与建议等功能,关闭lobehub自检更新功能 * fix:移除多余代码 --------- Co-authored-by: liunux4odoo <41217877+liunux4odoo@users.noreply.github.com>
13 lines
483 B
Django/Jinja
13 lines
483 B
Django/Jinja
{%- if not add_generation_prompt is defined -%}
|
|
{%- set add_generation_prompt = false -%}
|
|
{%- endif -%}
|
|
{%- for message in messages -%}
|
|
{{ '<|im_start|>' + message['role'] + '\\n' + message['content']}}
|
|
{%- if (loop.last and add_generation_prompt) or not loop.last -%}
|
|
{{ '<|im_end|>' + '\\n' }}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
{%- if add_generation_prompt and messages[-1]['role'] != 'assistant' -%}
|
|
{{ '<|im_start|>' + 'assistant' + '\\n' }}
|
|
{%- endif -%}
|