18 lines
562 B
Python
18 lines
562 B
Python
|
|
#!/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())
|