danielhanchen commited on
Commit
c0aa004
·
verified ·
1 Parent(s): 1924da5

Update chat_template.jinja

Browse files
Files changed (1) hide show
  1. chat_template.jinja +2 -2
chat_template.jinja CHANGED
@@ -49,8 +49,8 @@
49
  {%- set hist_msgs = messages[:ns.last_non_tool_call_assistant_msg+1] -%}
50
  {%- set suffix_msgs = messages[ns.last_non_tool_call_assistant_msg+1:] -%}
51
 
52
- {%- if tools -%}
53
- <|im_system|>tool_declare<|im_middle|>{{ tools | tojson | replace(", ", ",") | replace(": ", ":") }}<|im_end|>
54
  {%- endif -%}
55
 
56
  {%- if messages and messages|length > 0 -%}
 
49
  {%- set hist_msgs = messages[:ns.last_non_tool_call_assistant_msg+1] -%}
50
  {%- set suffix_msgs = messages[ns.last_non_tool_call_assistant_msg+1:] -%}
51
 
52
+ {%- if tools -%}{%- set tools_json = tools | tojson -%}{%- set tools_json =tools_json.replace(", ", ",") -%}
53
+ <|im_system|>tool_declare<|im_middle|>{{ tools_json }}<|im_end|>
54
  {%- endif -%}
55
 
56
  {%- if messages and messages|length > 0 -%}