瀏覽代碼

Fix: adapt to old configurations. (#6321)

### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.18.0
Kevin Hu 7 月之前
父節點
當前提交
95497b4aab
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      rag/app/naive.py

+ 2
- 0
rag/app/naive.py 查看文件

@@ -263,6 +263,8 @@ def chunk(filename, binary=None, from_page=0, to_page=100000,

elif re.search(r"\.pdf$", filename, re.IGNORECASE):
layout_recognizer = parser_config.get("layout_recognize", "DeepDOC")
if isinstance(layout_recognizer, bool):
layout_recognizer = "DeepDOC" if layout_recognizer else "Plain Text"
callback(0.1, "Start to parse.")

if layout_recognizer == "DeepDOC":

Loading…
取消
儲存