feat: 新增 .txt 纯文本文件支持
GraphRAG CI/CD / build-and-deploy (push) Successful in 5m4s

- 添加 txt 到允许上传格式,跳过 MinerU OCR
- 直接读取 UTF-8 文本,按 3000 字符/页分页后送入 LangExtract
- 适合有中文文本的规范文件,避免扫描件 OCR 乱码问题
This commit is contained in:
2026-06-18 17:00:40 +08:00
parent a46ceb94de
commit 71676dba9e
3 changed files with 84 additions and 49 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ from pathlib import Path
from storage import file_store as fs
ALLOWED_EXTENSIONS = {"pdf", "docx", "doc", "pptx", "ppt", "png", "jpg", "jpeg", "html"}
ALLOWED_EXTENSIONS = {"pdf", "docx", "doc", "pptx", "ppt", "png", "jpg", "jpeg", "html", "txt"}
MAX_FILE_SIZE_MB = 200