diff --git a/rag/app/naive.py b/rag/app/naive.py index ef84fa69cb..22606c3b32 100644 --- a/rag/app/naive.py +++ b/rag/app/naive.py @@ -881,7 +881,8 @@ def chunk(filename, binary=None, from_page=0, to_page=100000, lang="Chinese", ca tables = append_context2table_image4pdf(sections, tables, image_context_size) if name in ["tcadp", "docling", "mineru", "paddleocr"]: - parser_config["chunk_token_num"] = 0 + if int(parser_config.get("chunk_token_num", 0)) <= 0: + parser_config["chunk_token_num"] = 0 res = tokenize_table(tables, doc, is_english) callback(0.8, "Finish parsing.")