瀏覽代碼

feat(document_extractor): support tool file in document extractor (#10217)

tags/0.11.0
-LAN- 1 年之前
父節點
當前提交
2c4d8dbe9b
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 1 行新增3 行删除
  1. 1
    3
      api/core/workflow/nodes/document_extractor/node.py

+ 1
- 3
api/core/workflow/nodes/document_extractor/node.py 查看文件

@@ -198,10 +198,8 @@ def _download_file_content(file: File) -> bytes:
response = ssrf_proxy.get(file.remote_url)
response.raise_for_status()
return response.content
elif file.transfer_method == FileTransferMethod.LOCAL_FILE:
return file_manager.download(file)
else:
raise ValueError(f"Unsupported transfer method: {file.transfer_method}")
return file_manager.download(file)
except Exception as e:
raise FileDownloadError(f"Error downloading file: {str(e)}") from e


Loading…
取消
儲存