feat: 重构知识库系统,移除Hermes集成,增强RAG和同步功能

主要变更:
- 移除Hermes智能体及相关回调服务
- 新增知识库RAG、同步、调度、规范化和索引任务服务
- 重构orchestrator服务,增强运行时聊天功能
- 更新前端聊天、政策制度、设置等页面样式和逻辑
- 更新expense_claims和document_intelligence服务
- 删除llm_wiki相关服务和测试文件
- 更新docker-compose配置和启动脚本
This commit is contained in:
caoxiaozhu
2026-05-17 08:38:41 +00:00
parent 212c935308
commit 68f663f2f4
308 changed files with 83729 additions and 13588 deletions

View File

@@ -198,6 +198,24 @@ probe_server_smoke() {
return 1
}
probe_server_port_open() {
_probe_python=""
_probe_host="$(server_probe_host)"
_probe_port="${SERVER_PORT:-8000}"
if _probe_python="$(server_probe_python)"; then
"$_probe_python" -c "import socket, sys; sock = socket.socket(); sock.settimeout(1.5); result = sock.connect_ex((sys.argv[1], int(sys.argv[2]))); sock.close(); raise SystemExit(0 if result == 0 else 1)" "$_probe_host" "$_probe_port" >/dev/null 2>&1
return $?
fi
if command -v ss >/dev/null 2>&1; then
ss -ltn | grep -q "[.:]${_probe_port}[[:space:]]"
return $?
fi
return 1
}
probe_server_ready() {
_health_url="${1:-$(server_probe_url)}"
_smoke_url="${2:-$(server_smoke_url)}"
@@ -271,6 +289,8 @@ start_all() {
fi
elif probe_server_health "$probe_url"; then
error "An existing backend process is responding at $probe_url, but the smoke check failed at $smoke_url. Stop the old FastAPI process and rerun ./start.sh."
elif probe_server_port_open; then
error "Port ${SERVER_PORT:-8000} is already occupied, but FastAPI health checks are not passing at $probe_url. Stop the stale backend process and rerun ./start.sh."
else
info "Starting FastAPI server..."
(