feat(val-blog): add 2026-04-30 dream journey post

This commit is contained in:
Chen Gu
2026-08-13 17:00:22 +08:00
committed by Chen Gu
parent 691f96e8a6
commit 81978704fc
941 changed files with 195468 additions and 755 deletions
+68
View File
@@ -0,0 +1,68 @@
# 2026-03-29 本地 LLM 配置
## 完成事项
### 1. OpenClaw 配置修复
- 修复 JSON5 解析错误(从备份恢复)
- 禁用不可用的 ppchat providers(重命名加 `_` 前缀)
- 默认模型切换:`ppchat-openai/gpt-4o``lkeap/glm-5`
- Fallback 链:`lkeap/glm-5``lkeap/minimax-m2.5``lkeap/hunyuan-2.0-instruct``local/qwen3.5-4b`
### 2. 本地 LLM 服务搭建
- 安装 llama.cpp (v8500, build 342d6125b)
- 下载模型:`~/.llama/models/Qwen3.5-4B-Q4_K_M.gguf`(谷老板手动下载)
- 启动参数:`-c 8192 -t 4 --mlock --host 127.0.0.1 --port 8080`
- Server 端点:`http://127.0.0.1:8080/v1`
- API Key`local-llm-key`
### 3. OpenClaw 本地模型配置
- Provider ID`local`
- Model ID`qwen3.5-4b`
- 配置路径:`/Users/guchen/.openclaw/openclaw.json``models.providers.local`
## 发现的问题
### sessions_spawn model 参数对本地模型不生效
- 现象:指定 `model: "local/qwen3.5-4b"` 的 subagent 实际使用了 `lkeap/minimax-m2.5`
- sessions_spawn 返回 `modelApplied: true`,但实际模型被覆盖
- 可能原因:
1. Gateway 对本地模型有特殊路由逻辑
2. subagent 的 model 参数不支持本地 provider 格式
3. 存在隐式 fallback 机制
- 待验证:直接通过 exec 调用本地模型 API
### 本地模型适用场景分析
**适合:**
- 意图识别、工具选择、参数提取
- 简单翻译、日常对话
- 头脑风暴、摘要生成
- 快速任务
**不适合:**
- 复杂推理
- 长文本生成
- 数学密集型任务
- 大型编程项目
## 关键文件
| 文件 | 用途 |
|------|------|
| `/Users/guchen/.openclaw/openclaw.json` | OpenClaw 主配置 |
| `/Users/guchen/.openclaw/openclaw.json.bak` | 配置备份 |
| `~/.llama/models/Qwen3.5-4B-Q4_K_M.gguf` | 本地模型文件 |
## 进程信息
- llama-server 运行在 `127.0.0.1:8080`
- 验证命令:`curl -s http://127.0.0.1:8080/v1/models`
## 后续 TODO
- [x] ~~调查 sessions_spawn model 参数为何不生效~~
- [x] ~~通过 exec 直接调用本地模型 API 验证可用性~~
- [x] ~~考虑为本地模型配置独立的 agentId 或使用场景~~
## 结论
2026-03-29 22:02 谷老板决定:本地模型服务已关闭。本机性能不足以支撑本地 LLM 运行,暂时放弃本地模型方案。