deepdata: core product code (backend, frontend, runtime, deepflow module)

This commit is contained in:
figmar
2026-08-30 19:23:38 +08:00
commit bd3db30be9
1405 changed files with 271727 additions and 0 deletions
@@ -0,0 +1,26 @@
"""
文档加载器
封装 UniversalDocLoader,提供统一的文档加载接口。
"""
import asyncio
from typing import List
from langchain_core.documents import Document
from app.module.shared.common.document_loaders import UniversalDocLoader
async def load_document(file_path: str) -> List[Document]:
"""加载文档(异步封装)
使用 UniversalDocLoader 加载文档,支持多种格式。
Args:
file_path: 文件绝对路径
Returns:
LangChain Document 列表
"""
loader = UniversalDocLoader(file_path)
return await asyncio.to_thread(loader.load)