修复bug

This commit is contained in:
dekun
2026-05-19 02:16:43 +08:00
parent 809a7cc38f
commit b454cf134f
4 changed files with 27 additions and 13 deletions
+5 -1
View File
@@ -54,7 +54,7 @@ apt install -y python3 python3-venv python3-pip git curl
| 组件 | 版本建议 | 用途 |
|------|----------|------|
| Python | 3.10+`python3 -V` 确认) | 运行网关 |
| Python | **3.8+**(推荐 3.10+`python3 -V` 确认) | 运行网关 |
| Node.js | LTS | 安装 PM2 |
| PM2 | 最新 | 进程守护 |
| 宝塔 | 7.x+ | Nginx 反代、SSL |
@@ -98,6 +98,8 @@ cd /opt/openai_node
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt -U
# 若曾装过新版 bcrypt 导致 passlib 报错,可强制重装:
# pip install 'bcrypt>=4.0.0,<4.1.0' -U --force-reinstall
```
### 3.3 配置文件
@@ -364,6 +366,8 @@ Web 保存节点配置会写入 `nodes.json` 并热加载;仅改 `ecosystem.co
| 统计 IP 不对 | 宝塔是否传递 `X-Forwarded-For`(§5.2 |
| Token 为 0 | 上游 `usage`;流式 `include_usage` |
| PM2 找不到模块 | 确认使用 `/opt/openai_node/venv` 内 Python |
| `asyncio` 无 `to_thread` | Python 3.8:拉最新代码(已用 `run_in_thread` 兼容) |
| bcrypt `__about__` 报错 | `pip install 'bcrypt>=4.0.0,<4.1.0' -U --force-reinstall` 后重启 PM2 |
---