Skip to content

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

chore(rag/app): remove stray debug print() calls (#17943)

S99110c2df0d4
diff --git a/rag/app/naive.py b/rag/app/naive.py
index 99ab99713a..44462da3d4 100644
--- a/rag/app/naive.py
+++ b/rag/app/naive.py
@@ -1133,9 +1133,7 @@ def chunk(filename, binary=None, from_page=0, to_page=MAXIMUM_PAGE_NUMBER, lang=
callback(0.1, "Start to parse.")
sections = TxtParser()(filename, binary, parser_config.get("chunk_token_num", 128), parser_config.get("delimiter", "\n!?;。;!?"))
sections = _normalize_section_text_for_rtl_presentation_forms(sections)
- print("\n", "-" * 150, "\n")
- print(sections)
- print("\n", "-" * 150, "\n")
+ logging.info("TxtParser produced %d sections for %s", len(sections), filename)
callback(0.8, "Finish parsing.")
elif re.search(r"\.(md|markdown|mdx)$", filename, re.IGNORECASE):
diff --git a/rag/app/presentation.py b/rag/app/presentation.py
index 3a254d82b8..ef2c77fe75 100644
--- a/rag/app/presentation.py
+++ b/rag/app/presentation.py
@@ -87,7 +87,7 @@ class Pdf(PdfParser):
# pn_index in tbls is absolute page number
current_page_num = int(pn_index) + 1
except Exception as e:
- print(f"Error parsing position: {e}")
+ logging.warning(f"Error parsing position in {filename}: {e}")
continue
if not (from_page < current_page_num <= to_page + from_page):