Qwen 大模型-对话模板中system与user的区别解析

原始 chat_template: {%- if tools %} { {- ‘<|im_start|>systemn’ }} {%- if messages[0][‘role’] == ‘system’ %} { {- me

原始 chat_template:
{%- if tools %}
{ {- ‘<|im_start|>system\n’ }}
{%- if messages[0][‘role’] == ‘system’ %}
{ {- messages[0][‘content’] }}
{%- else %}
{ {- ‘You are Qwen, created by Alibaba Cloud. You are a helpful assistant.’ }}
{%- endif %}
{ {- “\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n” }}
{%- for tool in tools %}
{ {- “\n” }}
{ {- tool | tojson }}
{%- endfor %}
{ {- “\n\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{“name”: , “arguments”: }\n</tool_call&

发布者:admin,转转请注明出处:http://www.yc00.com/web/1754770047a5200036.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信