How to build tools call system prompt?
#32
by
zhaocc1106
- opened
How to build tools call system prompt for function call? Like qwen2.5 tokenizer_config.json:
{%- if tools %}\n
{{- '<|im_start|>system\\n' }}\n
{%- if messages[0]['role'] == 'system' %}\n
{{- messages[0]['content'] }}\n
{%- else %}\n
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n
{%- endif %}\n
{{- \"\\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 <tools></tools> XML tags:\\n<tools>\" }}\n
{%- for tool in tools %}\n
{{- \"\\n\" }}\n
{{- tool | tojson }}\n
{%- endfor %}\n
{{- \"\\n</tools>\\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\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n
I have not found tools parsing in DeepSeek-R1-Distill-Qwen-32B tokenizer_config.json