feat: enhance FileDownloadTool to confirm file removal and successful download

This commit is contained in:
Soulter
2026-02-01 18:13:23 +08:00
parent 313a6d8a24
commit bf587765de
+2
View File
@@ -187,6 +187,8 @@ class FileDownloadTool(FunctionTool):
os.remove(local_path)
except Exception as e:
logger.error(f"Error removing temp file {local_path}: {e}")
return f"File downloaded successfully to {local_path} and sent to user. The file has been removed from local storage."
return f"File downloaded successfully to {local_path}"
except Exception as e: