zecanard commited on
Commit
b1f65cb
·
verified ·
1 Parent(s): a0261c3

Adding Tools support.

Browse files
Files changed (1) hide show
  1. chat_template.jinja +15 -1
chat_template.jinja CHANGED
@@ -4,7 +4,7 @@
4
  {%- if strftime_now is defined %}
5
  {%- set currentDate = strftime_now('%Y-%m-%d %G:%i:%s') %}
6
  {%- elif not currentDate is defined %}
7
- {%- set currentDate = '2026-04-20' %}
8
  {%- endif %}
9
  {{- 'The current date is: ' + currentDate + ".\n\n" }}
10
  {#- Template customizations by @zecanard. #}
@@ -155,6 +155,20 @@
155
  {{- argument -}}
156
  {%- endif -%}
157
  {%- endmacro -%}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  {%- macro strip_thinking(text) -%}
159
  {%- set ns = namespace(result='') -%}
160
  {%- for part in text.split('<channel|>') -%}
 
4
  {%- if strftime_now is defined %}
5
  {%- set currentDate = strftime_now('%Y-%m-%d %G:%i:%s') %}
6
  {%- elif not currentDate is defined %}
7
+ {%- set currentDate = '2026-05-22' %}
8
  {%- endif %}
9
  {{- 'The current date is: ' + currentDate + ".\n\n" }}
10
  {#- Template customizations by @zecanard. #}
 
155
  {{- argument -}}
156
  {%- endif -%}
157
  {%- endmacro -%}
158
+ {%- macro format_type_argument(type_value) -%}
159
+ {%- if type_value is string -%}
160
+ {{- type_value | lower -}}
161
+ {%- elif type_value is iterable -%}
162
+ {{- '[' -}}
163
+ {%- for t in type_value -%}
164
+ {{- t | lower -}}
165
+ {%- if not loop.last %},{% endif -%}
166
+ {%- endfor -%}
167
+ {{- ']' -}}
168
+ {%- else -%}
169
+ {{- type_value -}}
170
+ {%- endif -%}
171
+ {%- endmacro -%}
172
  {%- macro strip_thinking(text) -%}
173
  {%- set ns = namespace(result='') -%}
174
  {%- for part in text.split('<channel|>') -%}