refactor: 重构RAG核心组件,简化代码结构和测试文件
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m53s
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m53s
This commit is contained in:
18
tools/run.py
Normal file
18
tools/run.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
"""统一入口:设置路径后运行 RAG 索引构建 CLI"""
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# 路径设置
|
||||
project_root = Path(__file__).resolve().parent.parent
|
||||
sys.path.insert(0, str(project_root))
|
||||
sys.path.insert(0, str(project_root / "backend"))
|
||||
load_dotenv(project_root / ".env")
|
||||
|
||||
if __name__ == "__main__":
|
||||
from rag_indexer.cli import main
|
||||
#from tools.test.test_rag_indexer_result import main
|
||||
#from tools.test.test_rag_pipeline import main
|
||||
import asyncio
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user