File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 1- __version__ = '0.0.13 '
1+ __version__ = '0.0.14 '
22from .agent import Agent
33from .multi_agent_hub import MultiAgentHub
44
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ def format_as_multimodal_message(
328328 content .append (ContentItem (text = v ))
329329 if k in ('image' , 'audio' ):
330330 content .append (item )
331- if k in ( 'file' , 'image' ) :
331+ if k == 'file' :
332332 # Move 'file' out of 'content' since it's not natively supported by models
333333 files .append (v )
334334 if add_upload_info and files and (msg .role in (SYSTEM , USER )):
@@ -338,16 +338,10 @@ def format_as_multimodal_message(
338338 has_zh = (lang == 'zh' )
339339 upload = []
340340 for f in [get_basename_from_url (f ) for f in files ]:
341- if is_image (f ):
342- if has_zh :
343- upload .append (f'' )
344- else :
345- upload .append (f'' )
341+ if has_zh :
342+ upload .append (f'[文件]({ f } )' )
346343 else :
347- if has_zh :
348- upload .append (f'[文件]({ f } )' )
349- else :
350- upload .append (f'[file]({ f } )' )
344+ upload .append (f'[file]({ f } )' )
351345 upload = ' ' .join (upload )
352346 if has_zh :
353347 upload = f'(上传了 { upload } )\n \n '
You can’t perform that action at this time.
0 commit comments