Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix(tcadp): add timeout to HTTP GET request for document download (#18336)

Ricardo-M-L7ef144279bbb
diff --git a/deepdoc/parser/tcadp_parser.py b/deepdoc/parser/tcadp_parser.py
index 37839eb87a..9815db941d 100644
--- a/deepdoc/parser/tcadp_parser.py
+++ b/deepdoc/parser/tcadp_parser.py
@@ -178,7 +178,7 @@ class TencentCloudAPIClient:
filename = f"tcadp_result_{timestamp}.zip"
file_path = os.path.join(output_dir, filename)
- with requests.get(download_url, stream=True) as response:
+ with requests.get(download_url, stream=True, timeout=300) as response:
response.raise_for_status()
with open(file_path, "wb") as f:
response.raw.decode_content = True