소스 검색

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

tags/0.11.0
-LAN- 1 년 전
부모
커밋
2c4d8dbe9b
No account linked to committer's email address
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…
취소
저장