[modify] agent call tools strategy

This commit is contained in:
Mark
2026-02-02 20:21:16 +08:00
parent 3f389d685a
commit a6c5c44ed8
3 changed files with 139 additions and 28 deletions

View File

@@ -85,10 +85,11 @@ class MultimodalService:
file: 图片文件输入
Returns:
Dict: 通义千问格式
Dict: 通义千问格式 {"type": "image", "image": "url"}
"""
if file.transfer_method == TransferMethod.REMOTE_URL:
# 远程 URL使用通义千问格式
logger.debug(f"处理远程图片: {file.url}")
return {
"type": "image",
"image": file.url
@@ -96,6 +97,7 @@ class MultimodalService:
else:
# 本地文件,获取访问 URL
url = await self._get_file_url(file.upload_file_id)
logger.debug(f"处理本地图片: {url}")
return {
"type": "image",
"image": url