2026-05-04 17:58:10 +08:00
|
|
|
#!/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__":
|
2026-05-04 18:59:15 +08:00
|
|
|
#from rag_indexer.cli import main
|
2026-05-04 17:58:10 +08:00
|
|
|
#from tools.test.test_rag_indexer_result import main
|
|
|
|
|
#from tools.test.test_rag_pipeline import main
|
2026-05-04 18:59:15 +08:00
|
|
|
from tools.test.test_fast_rag_fix import main
|
|
|
|
|
#from tools.test.test_graph_branches import main
|
2026-05-04 17:58:10 +08:00
|
|
|
import asyncio
|
2026-05-04 18:59:15 +08:00
|
|
|
asyncio.run(main())
|