Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

fix:build docreader timeout; update ocr config;support pdf tables parsing

Liwx101488b467caf091
diff --git a/services/docreader/src/parser/pdf_parser.py b/services/docreader/src/parser/pdf_parser.py
index 26145a74e..10dd411a0 100644
--- a/services/docreader/src/parser/pdf_parser.py
+++ b/services/docreader/src/parser/pdf_parser.py
@@ -82,3 +82,10 @@ class PDFParser(BaseParser):
except Exception as e:
logger.error(f"Failed to parse PDF document: {str(e)}")
return ""
+ finally:
+ if os.path.exists(temp_pdf_path):
+ try:
+ os.remove(temp_pdf_path)
+ logger.info(f"Temporary file cleaned up: {temp_pdf_path}")
+ except OSError as e:
+ logger.error(f"Error removing temporary file {temp_pdf_path}: {e}")