🔄 卡若AI 同步 2026-02-25 16:11 | 更新:运营中枢、运营中枢参考资料、运营中枢工作台 | 排除 >20MB: 13 个

This commit is contained in:
2026-02-25 16:11:04 +08:00
parent 13bec9f8c4
commit cb3ba5d85f
4 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euo pipefail
DIR="/Users/karuo/Documents/个人/卡若AI/运营中枢/scripts/karuo_ai_gateway"
PORT="${1:-18080}"
cd "$DIR"
if [ ! -f ".env" ] && [ -f ".env.api_keys.local" ]; then
cp .env.api_keys.local .env
fi
if [ -f ".env" ]; then
set -a
# shellcheck source=/dev/null
source .env
set +a
fi
if [ ! -x ".venv/bin/python" ]; then
python3 -m venv .venv
fi
.venv/bin/pip install -r requirements.txt >/tmp/karuo_local_pip.log 2>&1
PIDS=$(lsof -iTCP:"$PORT" -sTCP:LISTEN -t 2>/dev/null || true)
if [ -n "$PIDS" ]; then
kill $PIDS || true
fi
nohup .venv/bin/python -m uvicorn main:app --host 127.0.0.1 --port "$PORT" >/tmp/karuo_gateway_local.log 2>&1 &
echo "local_gateway_started port=$PORT"

View File

@@ -72,3 +72,38 @@ export SMTP_PASS="你的QQ邮箱授权码"
2. 同时让全部接口不可用,确认收到 `zhiqun@qq.com` 告警。
3. 查看网关响应:不应出现空白回复或长时间卡死。
---
## 6. 本机全量模式(不走 NAS / 不走服务器)
### 6.1 域名映射到本机
在本机 `/etc/hosts` 增加一行(默认用本机回环地址):
```text
127.0.0.1 kr-ai.quwanzhi.com
```
> 如你要改成其他本机网卡地址(例如你说的 `121.0.0.1`),把 `127.0.0.1` 替换成对应地址即可。
### 6.2 启动本机网关
```bash
cd /Users/karuo/Documents/个人/卡若AI/运营中枢/scripts/karuo_ai_gateway
cp .env.api_keys.local .env
set -a; source .env; set +a
.venv/bin/python -m uvicorn main:app --host 127.0.0.1 --port 18080
```
### 6.3 本机调用地址
- 健康检查:`http://127.0.0.1:18080/v1/health`
- 对话接口:`http://127.0.0.1:18080/v1/chat/completions`
- 域名模式:`http://kr-ai.quwanzhi.com:18080/v1/chat/completions`
### 6.4 Cursor 配置
- Override OpenAI Base URL`http://kr-ai.quwanzhi.com:18080`
- OpenAI API Key`karuo-stable-20260225`
- Model`karuo-ai`

View File

@@ -153,3 +153,4 @@
| 2026-02-25 14:32:41 | 🔄 卡若AI 同步 2026-02-25 14:32 | 更新:水桥平台对接、总索引与入口、运营中枢、运营中枢工作台 | 排除 >20MB: 13 个 |
| 2026-02-25 14:33:54 | 🔄 卡若AI 同步 2026-02-25 14:33 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 13 个 |
| 2026-02-25 14:36:13 | 🔄 卡若AI 同步 2026-02-25 14:36 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 13 个 |
| 2026-02-25 14:37:24 | 🔄 卡若AI 同步 2026-02-25 14:37 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 13 个 |

View File

@@ -156,3 +156,4 @@
| 2026-02-25 14:32:41 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-25 14:32 | 更新:水桥平台对接、总索引与入口、运营中枢、运营中枢工作台 | 排除 >20MB: 13 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |
| 2026-02-25 14:33:54 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-25 14:33 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 13 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |
| 2026-02-25 14:36:13 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-25 14:36 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 13 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |
| 2026-02-25 14:37:24 | 成功 | 成功 | 🔄 卡若AI 同步 2026-02-25 14:37 | 更新:水桥平台对接、运营中枢工作台 | 排除 >20MB: 13 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |