This commit is contained in:
2026-02-27 16:03:04 +08:00
commit 5aedf1665d
137 changed files with 17604 additions and 0 deletions

25
run.py Normal file
View File

@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
"""
项目入口 - 启动 WebSocket 客服客户端
用法:
python run.py # 正常启动(含 AI Agent
python run.py --no-agent # 仅基础回复,不启用 AI
"""
import sys
from pathlib import Path
# 确保项目根目录在 sys.path 首位
_root = Path(__file__).resolve().parent
if str(_root) not in sys.path:
sys.path.insert(0, str(_root))
if __name__ == "__main__":
from core.websocket_client import QingjianAPIClient
import asyncio
enable_agent = "--no-agent" not in sys.argv
client = QingjianAPIClient(enable_agent=enable_agent)
try:
asyncio.run(client.run())
except KeyboardInterrupt:
print("\n已停止")