ZHANGYUXUAN-zR commited on
Commit
fe9b63b
·
verified ·
1 Parent(s): e7c4515

Add files using upload-large-folder tool

Browse files
Files changed (1) hide show
  1. chat_template.jinja +7 -0
chat_template.jinja CHANGED
@@ -42,6 +42,9 @@ For each function call, output the function name and arguments within the follow
42
  {{- item.text }}
43
  {%- elif item is string -%}
44
  {{- item }}
 
 
 
45
  {%- endif -%}
46
  {%- endfor -%}
47
  {%- else -%}
@@ -100,6 +103,10 @@ For each function call, output the function name and arguments within the follow
100
  {%- endfor -%}
101
  {%- endfor -%}
102
  {{- '</tools></tool_response>' -}}
 
 
 
 
103
  {%- else -%}
104
  {{- '<tool_response>' + visible_text(m.content) + '</tool_response>' -}}
105
  {% endif -%}
 
42
  {{- item.text }}
43
  {%- elif item is string -%}
44
  {{- item }}
45
+ {%- elif item is mapping and item.type in ['image', 'image_url', 'video', 'video_url', 'audio', 'audio_url', 'input_audio'] -%}
46
+ {%- set media_type = item.type | replace('_url', '') | replace('input_', '') -%}
47
+ {{- "<reminder>You are unable to process this " ~ media_type ~ " because you don't have multi-modal input ability. Try different methods.</reminder>" }}
48
  {%- endif -%}
49
  {%- endfor -%}
50
  {%- else -%}
 
103
  {%- endfor -%}
104
  {%- endfor -%}
105
  {{- '</tools></tool_response>' -}}
106
+ {%- elif m.content is iterable and m.content is not mapping and m.content and m.content.0 is mapping and m.content.0.output is defined -%}
107
+ {%- for tr in m.content -%}
108
+ {{- '<tool_response>' + tr.output + '</tool_response>' -}}
109
+ {%- endfor -%}
110
  {%- else -%}
111
  {{- '<tool_response>' + visible_text(m.content) + '</tool_response>' -}}
112
  {% endif -%}
Free AI Image Generator No sign-up. Instant results. Open Now