# HelloTax AI 服务汇总

## 应用服务 & 大模型服务

| 服务 | 域名访问 | IP 访问 | 端口 | 说明 | 使用示例 |
|------|----------|---------|------|------|----------|
| SaaS Portal 前端 | http://ai.leshuiyun.com | http://14.103.72.205:8888 | 8888 | Vue/Vite dev | 浏览器直接访问 |
| Base Platform API | http://ai.leshuiyun.com/api/ | http://14.103.72.205:8000 | 8000 | FastAPI | `curl http://ai.leshuiyun.com/api/docs` |
| 训练中心前端 | http://training.leshuiyun.com | http://14.103.72.205:8889 | 8889 | Vue/Vite dev | 浏览器直接访问 |
| 训练中心 API | http://training.leshuiyun.com/api/ | http://14.103.72.205:8001 | 8001 | FastAPI | `curl http://training.leshuiyun.com/api/docs` |
| 数据中心前端 | http://data.leshuiyun.com | http://14.103.72.205:8890 | 8890 | Vue/Vite dev | 浏览器直接访问 |
| 数据中心 API | http://data.leshuiyun.com/api/ | http://14.103.72.205:8002 | 8002 | FastAPI | `curl http://data.leshuiyun.com/api/docs` |
| vLLM 推理 | http://llm.leshuiyun.com | http://14.103.72.205:8100 | 8100 | Qwen3.5-27B-AWQ | `curl http://llm.leshuiyun.com/v1/chat/completions -H "Authorization: Bearer sk-local" -H "Content-Type: application/json" -d '{"model":"Qwen3.5-27B-AWQ","messages":[{"role":"user","content":"你好"}]}'` |
| Embedding | http://embedding.leshuiyun.com | http://14.103.72.205:8200 | 8200 | bge-m3 | `curl http://embedding.leshuiyun.com/v1/embeddings -H "Content-Type: application/json" -d '{"model":"bge-m3","input":"测试文本"}'` |
| Rerank | http://rerank.leshuiyun.com | http://14.103.72.205:8300 | 8300 | bge-reranker-v2-m3 | `curl http://rerank.leshuiyun.com/v1/rerank -H "Content-Type: application/json" -d '{"model":"bge-reranker-v2-m3","query":"增值税","documents":["增值税是流转税","企业所得税"]}'` |

## 基础设施（Docker）

| 容器 | IP 访问 | 端口 | 说明 | 使用示例 |
|------|---------|------|------|----------|
| base_platform_postgres | 14.103.72.205:5433 | 5433 | ai.leshuiyun.com 数据库 | `psql -h 14.103.72.205 -p 5433 -U user -d base_platform` |
| training_center_postgres | 14.103.72.205:5434 | 5434 | 训练中心数据库 | `psql -h 14.103.72.205 -p 5434 -U user -d training_center` |
| data_center_postgres | 14.103.72.205:5435 | 5435 | 数据中心数据库 | `psql -h 14.103.72.205 -p 5435 -U hellotax -d hellotax` |
| base_platform_redis | 14.103.72.205:6379 | 6379 | 消息队列，三服务共用 | `redis-cli -h 14.103.72.205 -p 6379` |
| base_platform_minio API | 14.103.72.205:9000 | 9000 | 对象存储 API | `mc alias set local http://14.103.72.205:9000 <user> <pass>` |
| base_platform_minio Console | 14.103.72.205:9001 | 9001 | MinIO 管理控制台 | 浏览器访问 http://14.103.72.205:9001 |
| base_platform_neo4j HTTP | 14.103.72.205:7474 | 7474 | 图数据库 Web UI | 浏览器访问 http://14.103.72.205:7474 |
| base_platform_neo4j Bolt | 14.103.72.205:7687 | 7687 | 图数据库 Bolt 协议 | `neo4j-client -a bolt://14.103.72.205:7687` |
| base_platform_milvus | 14.103.72.205:19530 | 19530 | 向量数据库 | `from pymilvus import connections; connections.connect(host='14.103.72.205', port=19530)` |
| base_platform_etcd | 14.103.72.205:2379 | 2379 | etcd 客户端 | `etcdctl --endpoints=http://14.103.72.205:2379 get /` |

## Nginx 配置

| 配置项 | 说明 |
|--------|------|
| 配置文件 | `/lsinfo/tools/nginx/conf/nginx.conf` |
| 主进程 | `/lsinfo/tools/nginx/sbin/nginx` (nginx/1.24.0) |
| 监听端口 | 80 (HTTP), 443 (HTTPS) |

### 域名映射

| 域名 | 协议 | 后端服务 | 说明 |
|------|------|----------|------|
| ai.leshuiyun.com | HTTPS | 前端 :8888, API :8000 | SaaS Portal，支持 WebSocket |
| training.leshuiyun.com | HTTPS | 前端 :8889, API :8001 | 训练中心，支持 WebSocket (/ws) |
| data.leshuiyun.com | HTTPS | 前端 :8890, API :8002 | 数据中心 |
| llm.leshuiyun.com | HTTP | :8100 | vLLM 推理服务 |
| embedding.leshuiyun.com | HTTP | :8200 | Embedding 服务 |
| rerank.leshuiyun.com | HTTP | :8300 | Rerank 服务 |

### SSL 证书

三个主要业务域名配置了 SSL 证书：
- `ai.leshuiyun.com` - `/lsinfo/tools/nginx/leshuiyun.com_https/ai.leshuiyun.com.{pem,key}`
- `training.leshuiyun.com` - `/lsinfo/tools/nginx/leshuiyun.com_https/training.leshuiyun.com.{pem,key}`
- `data.leshuiyun.com` - `/lsinfo/tools/nginx/leshuiyun.com_https/data.leshuiyun.com.{pem,key}`

大模型服务域名 (llm/embedding/rerank) 暂未配置 SSL，使用 HTTP 协议。
