乐于分享
好东西不私藏

第11章-OpenClaw高阶配置

第11章-OpenClaw高阶配置

第11章 高阶配置指南:多模型集成、成本控制与性能调优

💡 学习目标:掌握 OpenClaw 的高级配置能力,包括 Antigravity Manager 集成、多模型动态切换、成本优化策略和系统性能调优。


📖 本章内容概览

  • • 11.1 Antigravity Manager 完全配置指南
  • • 11.2 多模型切换策略
  • • 11.3 记忆搜索配置(Memory Search)
  • • 11.4 成本优化方案
  • • 11.5 性能调优技巧
  • • 11.6 模型提供商配置详解
  • • 11.7 工具系统详解
  • • 11.8 CLI 命令完整参考

11.1 Antigravity Manager 全面配置手册

11.1.1 什么是 Antigravity Manager?

Antigravity Manager 是一个本地 AI API 代理工具,它通过一个本地服务统一管理多个 AI 模型(如 Claude、Gemini、GPT 等),集中处理 API 密钥和请求路由。

项目地址:https://github.com/lbjlaq/Antigravity-Manager

结合 OpenClaw 使用的优势

  • • ✅ 本地化部署:所有数据保留在本地,隐私安全
  • • ✅ 统一管理:一个工具管控所有 AI 模型
  • • ✅ 成本可控:使用自有 API 密钥,无中间商加价
  • • ✅ 灵活切换:无需修改代码即可切换模型
  • • ✅ 技能扩展:通过 ClawHub 安装各类实用技能
Antigravity Manager架构图 - 统一管理多个AI服务

11.1.2 系统要求与前置准备

系统要求

  • • macOS 10.15+、Windows 10+ 或 Linux
  • • 内存 ≥4GB
  • • 稳定网络连接

准备清单

  1. 1. Antigravity Manager 安装包
  2. 2. 各 AI 模型的 API Key(或独享账号)
  3. 3. 基本命令行操作能力

11.1.3 安装 Antigravity Manager

macOS 用户

  1. 1. 访问 Antigravity Manager Releases
  2. 2. 下载最新 .dmg 文件
  3. 3. 拖入 Applications 文件夹
  4. 4. 首次打开需在「系统偏好设置 → 安全性与隐私」中允许

Windows 用户

  1. 1. 下载最新 .exe 安装包
  2. 2. 运行安装程序并完成安装
  3. 3. 启动 Antigravity Manager

Linux 用户

  1. 1. 下载最新 .AppImage 或 .deb 文件
  2. 2. 给予执行权限并运行:
    chmod +x Antigravity-Manager-*.AppImage./Antigravity-Manager-*.AppImage

验证安装

启动后,本地 API 服务默认运行在 http://127.0.0.1:8045,浏览器访问该地址看到管理界面即表示成功。

11.1.4 配置 AI 模型账号

Antigravity Manager 需要为每个 AI 模型配置 API 密钥。

方式一:使用官方 API

Claude API

  1. 1. 访问 Anthropic Console
  2. 2. 注册并绑定信用卡
  3. 3. 创建并复制 API Key

Gemini API

  1. 1. 访问 Google AI Studio
  2. 2. 登录 Google 账号
  3. 3. 创建并复制 API Key

OpenAI API

  1. 1. 访问 OpenAI Platform
  2. 2. 注册并绑定信用卡
  3. 3. 创建并复制 API Key

方式二:购买独享账号(推荐)

如果你不想自行申请 API,可购买独享账号(如学生账号 Gemini 3 Pro 独享12个月),支持 Antigravity Manager,即买即用,性价比高。

在 Antigravity Manager 中添加 API Key

  1. 1. 打开管理界面
  2. 2. 点击「API Keys」
  3. 3. 选择提供商(Claude、Gemini、OpenAI)
  4. 4. 输入 API Key 并保存

11.1.5 生成 User Token

User Token 是 OpenClaw 访问 Antigravity Manager 的凭证。

  1. 1. 在 Antigravity Manager 界面右上角点击「User Tokens」
  2. 2. 点击「创建新Token」
  3. 3. 复制生成的 Token(如 sk-82bc103b51f24af888af525a7835e87c
  4. 4. ⚠️ 重要:此 Token 只显示一次,请妥善保存

11.1.6 配置 OpenClaw 连接

配置 Claude Sonnet 4.5(默认模型)

# 添加 local-anthropic providercat ~/.openclaw/openclaw.json | jq '.models.providers["local-anthropic"] = {  "baseUrl": "http://127.0.0.1:8045",  "apiKey": "你的User_Token",  "auth": "api-key",  "api": "anthropic-messages",  "models": [    {      "id": "claude-sonnet-4-5-20250929",      "name": "Local Claude Sonnet 4.5",      "reasoning": false,      "input": ["text"],      "cost": {        "input": 0,        "output": 0,        "cacheRead": 0,        "cacheWrite": 0      },      "contextWindow": 200000,      "maxTokens": 8192    }  ]}' > /tmp/openclaw-temp.json && mv /tmp/openclaw-temp.json ~/.openclaw/openclaw.json# 设置为默认模型openclaw config set agents.defaults.model.primary "local-anthropic/claude-sonnet-4-5-20250929"

将 你的User_Token 替换为实际 Token。

配置 Claude Opus 4.5 Thinking(推理模型)

cat ~/.openclaw/openclaw.json | jq '.models.providers["local-anthropic-opus"] = {  "baseUrl": "http://127.0.0.1:8045",  "apiKey": "你的User_Token",  "auth": "api-key",  "api": "anthropic-messages",  "models": [    {      "id": "claude-opus-4-5-thinking",      "name": "Local Claude Opus 4.5 Thinking",      "reasoning": true,      "input": ["text"],      "cost": {        "input": 0,        "output": 0,        "cacheRead": 0,        "cacheWrite": 0      },      "contextWindow": 200000,      "maxTokens": 8192    }  ]}' > /tmp/openclaw-temp.json && mv /tmp/openclaw-temp.json ~/.openclaw/openclaw.json

配置 Gemini 3 Pro Image(多模态模型)

cat ~/.openclaw/openclaw.json | jq '.models.providers["local-google"] = {  "baseUrl": "http://127.0.0.1:8045/v1beta",  "apiKey": "你的User_Token",  "auth": "api-key",  "api": "google-generative-ai",  "models": [    {      "id": "gemini-3-pro-image",      "name": "Local Gemini 3 Pro Image",      "reasoning": false,      "input": ["text", "image"],      "cost": {        "input": 0,        "output": 0,        "cacheRead": 0,        "cacheWrite": 0      },      "contextWindow": 2000000,      "maxTokens": 8192    }  ]}' > /tmp/openclaw-temp.json && mv /tmp/openclaw-temp.json ~/.openclaw/openclaw.json

11.1.7 验证配置

查看模型列表

openclaw models list

输出应包含类似:

Model                                      Input      Ctx      Local Auth  Tagslocal-anthropic/claude-sonnet-4-5-20250929 text       195k     yes   yes   defaultlocal-anthropic-opus/claude-opus-4-5-thinking text    195k     yes   yes   configuredlocal-google/gemini-3-pro-image            text,image 1953k    yes   yes   configured

重启 Gateway

openclaw gateway restart

测试连接

openclaw message send "你好,介绍一下你自己"

如正常返回,说明配置成功。

11.1.8 使用方法

使用默认模型(Claude Sonnet 4.5)

openclaw message send "写一个Python脚本,打印Hello World"

切换到 Opus Thinking 模型

openclaw config set agents.defaults.model.primary "local-anthropic-opus/claude-opus-4-5-thinking"openclaw gateway restart

切换到 Gemini Image 模型

openclaw config set agents.defaults.model.primary "local-google/gemini-3-pro-image"openclaw gateway restart

临时指定模型(不修改默认配置)

# 使用 Opus Thinkingopenclaw agent --model "local-anthropic-opus/claude-opus-4-5-thinking" --message "解释量子计算的原理"# 使用 Gemini Imageopenclaw agent --model "local-google/gemini-3-pro-image" --message "分析这张图片" --image ./photo.jpg

11.1.9 模型选择指南

模型
最佳场景
核心优势
上下文窗口
Claude Sonnet 4.5
日常对话、代码生成、文档编写
速度快、质量高、成本低
200k tokens
Claude Opus 4.5 Thinking
复杂推理、数学问题、算法优化
推理能力强、思考过程可见
200k tokens
Gemini 3 Pro Image
图片识别、多模态任务、文档分析
支持图像、超大上下文
2000k tokens

11.1.10 高级配置技巧

添加模型别名

openclaw config set agents.defaults.models."local-anthropic/claude-sonnet-4-5-20250929".alias"我的Claude"

配置多个 API Key

cat ~/.openclaw/openclaw.json | jq '.models.providers["local-anthropic-2"] = {  "baseUrl": "http://127.0.0.1:8045",  "apiKey": "另一个User_Token",  "auth": "api-key",  "api": "anthropic-messages",  "models": [...]}' > /tmp/openclaw-temp.json && mv /tmp/openclaw-temp.json ~/.openclaw/openclaw.json

设置成本追踪(虚拟成本)

{"cost":{"input":0.003,"output":0.015,"cacheRead":0.0003,"cacheWrite":0.00375}}

备份与恢复配置

# 备份cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.backup# 恢复cp ~/.openclaw/openclaw.json.backup ~/.openclaw/openclaw.jsonopenclaw gateway restart

11.1.11 常用命令速查

# 查看模型列表openclaw models list# 查看默认模型openclaw config get agents.defaults.model.primary# 切换默认模型openclaw config set agents.defaults.model.primary "模型ID"# 重启 Gatewayopenclaw gateway restart# 查看配置文件cat ~/.openclaw/openclaw.json | jq '.models.providers'# 发送消息openclaw message send "你的消息"# 临时使用指定模型openclaw agent --model "模型ID" --message "你的消息"

11.1.12 模型 ID 速查

local-anthropic/claude-sonnet-4-5-20250929local-anthropic-opus/claude-opus-4-5-thinkinglocal-google/gemini-3-pro-image

11.1.13 常见问题排查

问题:模型列表为空

原因:配置文件格式错误或路径不对解决

cat ~/.openclaw/openclaw.json | jq '.models.providers'# 检查cp ~/.openclaw/openclaw.json.backup ~/.openclaw/openclaw.json  # 恢复备份

问题:API 连接失败

原因:Antigravity Manager 未启动或端口被占用解决

curl http://127.0.0.1:8045/v1/models  # 测试 APIlsof -i :8045  # 检查端口占用(macOS/Linux)# 重启 Antigravity Manager

问题:配置后模型不生效

原因:未重启 Gateway解决openclaw gateway restart

问题:User Token 无效

原因:Token 过期或输入错误解决:在 Antigravity Manager 中重新生成 Token,更新配置文件中的 apiKey,重启 Gateway


11.2 多模型切换策略

11.2.1 模型特点对比

模型
优势
劣势
适用场景
Claude Sonnet
平衡性好
价格中等
日常对话
Claude Opus
能力最强
价格最贵
复杂任务
GPT-5.2
功能丰富
响应较慢
创意工作
Gemini 3 Pro
免费额度大
能力一般
简单任务
DeepSeek-V3
性价比高
中文优化
编程任务

11.2.2 场景化选择策略

日常对话 → Claude Sonnet 4.5理由:响应快、质量稳、价格适中

复杂推理 → Claude Opus 4.6理由:推理能力最强、准确率最高

图片识别 → Gemini 3 Pro理由:多模态能力强、免费额度大

编程任务 → DeepSeek-V3理由:代码能力强、价格便宜、中文友好

11.2.3 模型容灾机制(Fallback)

当主模型(primary)遇到 API 调用失败、超时、速率限制或服务不可用时,系统会自动切换到备用模型(fallbacks)。

基础容灾配置

配置文件~/.openclaw/openclaw.json

{"agents":{"defaults":{"model":{"primary":"anthropic/claude-opus-4-6","fallbacks":["openai-codex/gpt-5.3-codex","google-antigravity/claude-opus-4-6-thinking"]}},"list":[{"id":"main","default":true,"model":{"primary":"anthropic/claude-opus-4-6","fallbacks":["openai-codex/gpt-5.3-codex","google-antigravity/claude-opus-4-6-thinking"]}}]}}

工作流程

  1. 1. 尝试主模型 → 失败
  2. 2. 切换到备用模型1 → 失败
  3. 3. 切换到备用模型2 → 失败
  4. 4. 返回错误

实战案例1:成本优化型容灾

{"agents":{"defaults":{"model":{"primary":"deepseek/deepseek-chat","fallbacks":["anthropic/claude-sonnet-4-5","anthropic/claude-opus-4-6"]}}}}

优势:日常使用极低成本的 DeepSeek,限流时自动切换至 Claude Sonnet,重要任务用 Opus 兜底,节省成本 80%+。

实战案例2:性能优先型容灾

{"agents":{"defaults":{"model":{"primary":"anthropic/claude-opus-4-6","fallbacks":["anthropic/claude-sonnet-4-5","deepseek/deepseek-chat"]}}}}

优势:保证最佳质量,高峰期自动降级,服务不中断。

实战案例3:多提供商容灾

{"agents":{"defaults":{"model":{"primary":"anthropic/claude-sonnet-4-5","fallbacks":["openai/gpt-4o","google/gemini-2.0-flash-exp","deepseek/deepseek-chat"]}}}}

优势:跨提供商容灾,避免单点故障,最大化可用性。

配置命令行方式

# 设置主模型openclaw config set agents.defaults.model.primary "anthropic/claude-opus-4-6"# 设置备用模型(需编辑 JSON 或使用 jq)cat ~/.openclaw/openclaw.json | jq '.agents.defaults.model.fallbacks = [  "openai-codex/gpt-5.3-codex",  "google-antigravity/claude-opus-4-6-thinking"]' > /tmp/openclaw-temp.json && mv /tmp/openclaw-temp.json ~/.openclaw/openclaw.json# 重启 Gatewayopenclaw gateway restart

验证容灾配置

openclaw config get agents.defaults.model# 输出示例:{"primary""anthropic/claude-opus-4-6","fallbacks": ["openai-codex/gpt-5.3-codex","google-antigravity/claude-opus-4-6-thinking"  ]}

容灾最佳实践

  • • 选择不同提供商:Anthropic → OpenAI → Google(避免同提供商单点故障)
  • • 按能力梯度配置:高能力 → 中能力 → 低能力
  • • 考虑成本因素:便宜 → 中等 → 昂贵(成本优化)或昂贵 → 中等 → 便宜(质量优先)
  • • 限制备用数量:2-3 个备用模型即可

11.2.4 多认证 Profile + Token 轮换

认证 Profile 允许为同一提供商配置多个账号,系统按顺序轮换使用,避免单账号限流。

基础配置

{"auth":{"profiles":{"openai-codex:default":{"provider":"openai-codex","mode":"oauth"},"anthropic:default":{"provider":"anthropic","mode":"token"},"anthropic:manual":{"provider":"anthropic","mode":"token"},"google-antigravity:mail1@gmail.com":{"provider":"google-antigravity","mode":"oauth","email":"mail1@gmail.com"},"google-antigravity:mail2@gmail.com":{"provider":"google-antigravity","mode":"oauth"}},"order":{"anthropic":["anthropic:default","anthropic:manual"],"google-antigravity":["google-antigravity:mail1@gmail.com","google-antigravity:mail2@gmail.com"]}}}

实战案例1:Anthropic 双账号轮换

{"auth":{"profiles":{"anthropic:account1":{"provider":"anthropic","mode":"token"},"anthropic:account2":{"provider":"anthropic","mode":"token"}},"order":{"anthropic":["anthropic:account1","anthropic:account2"]}}}

工作流程:使用 account1 → 限流后自动切换到 account2 → 循环。

实战案例2:Google 多邮箱轮换

{"auth":{"profiles":{"google-antigravity:work@gmail.com":{"provider":"google-antigravity","mode":"oauth","email":"work@gmail.com"},"google-antigravity:personal@gmail.com":{"provider":"google-antigravity","mode":"oauth","email":"personal@gmail.com"},"google-antigravity:backup@gmail.com":{"provider":"google-antigravity","mode":"oauth","email":"backup@gmail.com"}},"order":{"google-antigravity":["google-antigravity:work@gmail.com","google-antigravity:personal@gmail.com","google-antigravity:backup@gmail.com"]}}}

优势:3个账号轮换,限流概率降低66%,免费额度叠加。

实战案例3:混合认证模式

{"auth":{"profiles":{"anthropic:oauth-account":{"provider":"anthropic","mode":"oauth"},"anthropic:token-account":{"provider":"anthropic","mode":"token"}},"order":{"anthropic":["anthropic:oauth-account","anthropic:token-account"]}}}

配置最佳实践

  • • 账号数量:推荐 2-3 个
  • • 认证方式:OAuth(安全)适合个人,Token(稳定)适合 API 密钥
  • • 轮换策略:按使用频率或账号等级排序
  • • 监控维护
    openclaw config get auth.profilesopenclaw test api

11.2.5 自动切换配置

基于任务类型切换

{"rules":[{"condition":"task.type === 'code'","model":"deepseek-v3"},{"condition":"task.type === 'image'","model":"gemini-3-pro"},{"condition":"task.complexity === 'high'","model":"claude-opus-4.6"},{"condition":"default","model":"claude-sonnet-4.5"}]}

基于成本切换

{"rules":[{"condition":"cost.daily < 10","model":"claude-opus-4.6"},{"condition":"cost.daily >= 10","model":"claude-sonnet-4.5"}]}

11.3 记忆搜索配置(Memory Search)

记忆搜索让 OpenClaw 记住历史对话,提供智能上下文感知。

11.3.1 基础配置

{"agents":{"defaults":{"memorySearch":{"sources":["memory","sessions"],"experimental":{"sessionMemory":true},"provider":"gemini","remote":{"apiKey":"AIzaSy**************************"},"fallback":"gemini","model":"gemini-embedding-001","query":{"hybrid":{"enabled":true,"vectorWeight":0.7,"textWeight":0.3}}}}}}

11.3.2 配置项详解

参数
说明
可选值
sources
数据源
memory
(长期记忆)、sessions(会话记忆)
experimental.sessionMemory
是否启用会话记忆
true
 / false
provider
嵌入模型提供商
gemini
openailocal
remote.apiKey
远程 API 密钥
Gemini/OpenAI 的 API Key
fallback
备用提供商
同上
model
嵌入模型名称
gemini-embedding-001
text-embedding-3-large 等
query.hybrid
混合检索开关及权重
权重和为1

推荐配置

  • • 免费用户:provider: "gemini"model: "gemini-embedding-001"
  • • 高精度:provider: "openai"model: "text-embedding-3-large"
  • • 隐私优先:provider: "local"model: "all-MiniLM-L6-v2"

11.3.3 实战案例

案例1:免费 Gemini 配置

{"memorySearch":{"sources":["memory","sessions"],"experimental":{"sessionMemory":true},"provider":"gemini","remote":{"apiKey":"你的Gemini_API_Key"},"model":"gemini-embedding-001","query":{"hybrid":{"enabled":true,"vectorWeight":0.7,"textWeight":0.3}}}}

案例2:高精度 OpenAI 配置

{"memorySearch":{"sources":["memory","sessions"],"provider":"openai","remote":{"apiKey":"sk-your-openai-api-key"},"fallback":"gemini","model":"text-embedding-3-large","query":{"hybrid":{"enabled":true,"vectorWeight":0.8,"textWeight":0.2}}}}

成本:text-embedding-3-small 约 0.02/百万tokenslarge0.02/百万 tokens,large 约0.02/百万tokenslarge0.13/百万 tokens。

案例3:本地隐私配置

{"memorySearch":{"sources":["memory","sessions"],"provider":"local","model":"all-MiniLM-L6-v2","query":{"hybrid":{"enabled":true,"vectorWeight":0.6,"textWeight":0.4}}}}

11.3.4 命令行配置与验证

# 启用会话记忆openclaw config set agents.defaults.memorySearch.experimental.sessionMemory true# 设置提供商openclaw config set agents.defaults.memorySearch.provider "gemini"# 设置 API Key(需手动编辑 JSON 或使用 jq)cat ~/.openclaw/openclaw.json | jq '.agents.defaults.memorySearch.remote.apiKey = "你的API_Key"' > /tmp/openclaw-temp.json && mv /tmp/openclaw-temp.json ~/.openclaw/openclaw.json# 重启 Gatewayopenclaw gateway restart# 测试记忆openclaw message send "记住:我喜欢喝咖啡"openclaw message send "我喜欢喝什么?"# 预期返回:根据我的记忆,你喜欢喝咖啡。

11.3.5 使用场景与最佳实践

场景示例

  • • 个人助手:记住生日、偏好等
  • • 项目管理:记录截止日期
  • • 知识积累:保存重要信息

最佳实践

  • • 选择合适提供商:免费用 Gemini,高精度用 OpenAI,隐私用 Local
  • • 调整混合检索权重:语义为主 vectorWeight 0.7-0.8,关键词为主 textWeight 0.6-0.7
  • • 定期清理记忆:openclaw memory clean --older-than 30d
  • • 备份重要记忆:openclaw memory export --output memory-backup.json

11.3.6 故障排查

问题
原因
解决
记忆搜索不工作
API Key 无效或未配置
检查配置,测试 API Key
搜索结果不准确
混合检索权重不合适
调整权重,提高语义或关键词比重
记忆占用空间过大
长期积累未清理
openclaw memory clean --older-than 60d
openclaw memory compact

11.4 成本优化方案

11.4.1 Token 消耗分析

# 查看今日统计openclaw stats today# 输出示例:今日Token消耗:- Claude Sonnet:150K tokens ($0.75)- Gemini Pro:50K tokens ($0.00)- 总计:200K tokens ($0.75)

优化建议

  • • 高消耗任务(如文件搜索)可优化搜索范围
  • • 使用缓存
  • • 减少上下文
  • • 优化提示词

11.4.2 缓存策略

# 启用缓存openclaw config set cache.enabled true# 设置缓存时间(小时)openclaw config set cache.ttl 24# 设置缓存大小(MB)openclaw config set cache.maxSize 1000

缓存效果:相同问题直接返回缓存,Token 消耗为 0,成本节省 100%。

11.4.3 模型降级方案

简单任务 → 便宜模型复杂任务 → 贵模型失败后 → 降级重试

配置示例:

{"fallback": ["claude-opus-4.6",    // 首选"claude-sonnet-4.5",  // 降级1"gemini-3-pro"// 降级2  ]}

11.4.4 成本控制实战

案例1:降低50%成本

  • • 原方案:全部使用 Claude Opus,日均 $20
  • • 优化方案:简单任务用 Sonnet,复杂任务用 Opus,启用缓存
  • • 优化后:日均 $10,节省 50%

案例2:免费额度最大化

  • • 策略:优先使用 Gemini(免费额度大),超额后切 DeepSeek(便宜),重要任务用 Claude
  • • 效果:月成本 $5,节省 90%

11.5 性能调优技巧

11.5.1 响应速度优化

优化前
优化方案
优化后
平均响应时间 5秒
启用缓存、减少上下文、流式输出、并行处理
平均响应时间 2秒,提升 60%

11.5.2 并行处理优化

# 设置最大并行数openclaw config set concurrency.max 5# 设置队列大小openclaw config set concurrency.queueSize 100

11.5.3 内存管理

# 查看内存使用openclaw stats memory# 输出示例:内存使用情况:- 当前:512MB- 峰值:800MB- 平均:600MB

优化建议:内存占用高时,清理缓存、减少并行、重启服务。


11.6 模型提供商配置详解

11.6.0 快速配置:使用命令行向导(推荐新手)

openclaw onboard

交互式向导会引导你:

  1. 1. 选择初始化模式
  2. 2. 选择模型提供商(OpenAI、Anthropic、Google、DeepSeek 等)
  3. 3. 输入 API Key(实时验证)
  4. 4. 选择默认模型
  5. 5. 自动保存配置并重启 Gateway

优势:逐步引导、实时验证、自动配置、错误提示明确。

验证配置:

openclaw models listopenclaw message send "你好,测试一下"

11.6.1 支持的模型提供商

国际模型

  • • OpenAI:GPT-4o, GPT-4o-mini
  • • Anthropic:Claude 3.5 Sonnet, Claude 3 Opus
  • • Google:Gemini 2.0 Flash, Gemini 1.5 Pro
  • • xAI:Grok 2
  • • Mistral:Mistral Large, Mistral Small
  • • Cohere:Command R+, Command R

国产模型

  • • DeepSeek:DeepSeek-V3, DeepSeek-Chat(性价比之王)
  • • 月之暗面:Kimi k2.5(超长上下文)
  • • 智谱AI:GLM-4, GLM-4V
  • • 百川智能:Baichuan-4
  • • MiniMax:abab6.5
  • • 阿里云:Qwen-Max, Qwen-Plus
  • • 百度:ERNIE 4.0

本地模型

  • • Ollama:Llama 3.1, Qwen2.5(完全免费)
  • • LM Studio:各种开源模型

11.6.2 配置示例

OpenAI

{"models":{"providers":{"openai":{"baseUrl":"https://api.openai.com/v1","apiKey":"sk-your-api-key","auth":"api-key","api":"openai-chat","models":[{"id":"gpt-4o","name":"GPT-4o","contextWindow":128000,"maxTokens":16384},{"id":"gpt-4o-mini","name":"GPT-4o Mini","contextWindow":128000,"maxTokens":16384}]}}}}

Anthropic (Claude)

{"models":{"providers":{"anthropic":{"baseUrl":"https://api.anthropic.com","apiKey":"sk-ant-your-api-key","auth":"api-key","api":"anthropic","models":[{"id":"claude-3-5-sonnet-20241022","name":"Claude 3.5 Sonnet","contextWindow":200000,"maxTokens":8192},{"id":"claude-3-opus-20240229","name":"Claude 3 Opus","contextWindow":200000,"maxTokens":4096}]}}}}

Google Gemini

{"models":{"providers":{"google":{"baseUrl":"https://generativelanguage.googleapis.com/v1beta","apiKey":"your-google-api-key","auth":"api-key","api":"google-ai","models":[{"id":"gemini-2.0-flash-exp","name":"Gemini 2.0 Flash","contextWindow":1000000,"maxTokens":8192},{"id":"gemini-1.5-pro","name":"Gemini 1.5 Pro","contextWindow":2000000,"maxTokens":8192}]}}}}

DeepSeek(推荐)

{"models":{"providers":{"deepseek":{"baseUrl":"https://api.deepseek.com","apiKey":"sk-your-api-key","auth":"api-key","api":"openai-chat","models":[{"id":"deepseek-chat","name":"DeepSeek Chat","contextWindow":64000,"maxTokens":4096},{"id":"deepseek-coder","name":"DeepSeek Coder","contextWindow":64000,"maxTokens":4096}]}}}}

Kimi(月之暗面)

{"models":{"providers":{"moonshot":{"baseUrl":"https://api.moonshot.cn/v1","apiKey":"sk-your-api-key","auth":"api-key","api":"openai-chat","models":[{"id":"moonshot-v1-8k","name":"Kimi k2.5 8K","contextWindow":8000,"maxTokens":4096},{"id":"moonshot-v1-32k","name":"Kimi k2.5 32K","contextWindow":32000,"maxTokens":4096},{"id":"moonshot-v1-128k","name":"Kimi k2.5 128K","contextWindow":128000,"maxTokens":4096}]}}}}

Ollama(本地模型)

{"models":{"providers":{"ollama":{"baseUrl":"http://localhost:11434","auth":"none","api":"ollama","models":[{"id":"llama3.1:8b","name":"Llama 3.1 8B","contextWindow":128000,"maxTokens":4096},{"id":"qwen2.5:7b","name":"Qwen 2.5 7B","contextWindow":32000,"maxTokens":4096}]}}}}

11.6.3 多提供商配置示例

{"models":{"providers":{"deepseek":{ ... },"anthropic":{ ... },"ollama":{ ... }}},"agents":{"defaults":{"model":{"primary":"deepseek/deepseek-chat","fallback":["anthropic/claude-3-5-sonnet-20241022","ollama/llama3.1:8b"]}}}}

11.6.4 模型选择策略

任务类型
推荐模型
编程任务
deepseek/deepseek-coder
长文档处理
moonshot/moonshot-v1-128k
复杂推理
anthropic/claude-3-opus-20240229
日常对话
deepseek/deepseek-chat
多模态(图片)
google/gemini-2.0-flash-exp
本地隐私
ollama/llama3.1:8b
成本层级
模型示例
价格(约)
极低成本
DeepSeek
$0.001/千tokens
低成本
Kimi, GLM-4
$0.01/千tokens
中等成本
Gemini, Mistral
$0.05/千tokens
高成本
Claude, GPT-4
$0.15/千tokens
免费
Ollama(本地)
0

11.7 工具系统详解

11.7.1 内置工具列表

类别
工具
功能
文件系统
read_file
读取文件内容
write_file
写入文件
list_directory
列出目录
search_files
搜索文件
move_file
移动文件
delete_file
删除文件
Shell
execute_command
执行命令
run_script
运行脚本
网络
web_search
网页搜索
fetch_url
获取网页
api_call
API 调用
数据处理
parse_json
解析 JSON
parse_csv
解析 CSV
extract_text
提取文本

11.7.2 启用和禁用工具

# 查看可用工具openclaw tools list# 启用工具openclaw tools enable read_file write_file# 禁用工具openclaw tools disable execute_command

配置文件方式:

{"tools":{"enabled":["read_file","write_file","list_directory","web_search"],"disabled":["execute_command","delete_file"]}}

11.7.3 工具权限控制

{"tools":{"permissions":{"read_file":{"allowedPaths":["~/Documents","~/Downloads"],"deniedPaths":["~/.ssh","~/.openclaw"]},"execute_command":{"allowedCommands":["ls","cat","grep"],"deniedCommands":["rm","sudo"]}}}}

11.7.4 自定义工具开发

创建 ~/.openclaw/tools/my-tool.js

exportdefault {name"my_custom_tool",description"我的自定义工具",parameters: {type"object",properties: {input: { type"string"description"输入参数" }    },required: ["input"]  },asyncexecute({ input }) {return { successtrueresult`处理结果: ${input}` };  }};

注册工具:

openclaw tools register ~/.openclaw/tools/my-tool.js

11.7.5 工具使用示例

文件搜索search_files(pattern="*.pdf", content="发票") → 返回匹配文件列表

网页搜索web_search(query="Claude 3.5 Sonnet pricing") → 获取价格信息

数据处理read_file("sales.csv") → parse_csv → 分析数据

11.7.6 工具链(Tool Chaining)

OpenClaw 可自动组合多个工具完成复杂任务,如:fetch_url → extract_text → convert_to_markdown → write_file

11.7.7 工具安全最佳实践

  • • 最小权限原则:只启用必要的工具
  • • 路径限制:限制文件访问范围
  • • 命令白名单:只允许安全命令

11.8 CLI 命令完整参考

11.8.1 核心命令

# 版本和帮助openclaw --versionopenclaw --help# 初始化配置openclaw onboardopenclaw setup# 配置管理openclaw config listopenclaw config get models.providersopenclaw config set gateway.port 18790openclaw config delete models.providers.test

11.8.2 Gateway 管理

openclaw gateway installopenclaw gateway statusopenclaw gateway stopopenclaw gateway restartopenclaw logsopenclaw logs --followopenclaw logs clear

11.8.3 渠道管理

openclaw channels listopenclaw channels statusopenclaw channels addopenclaw channels remove feishuopenclaw channels test feishu

11.8.4 配对管理

openclaw pairing listopenclaw pairing approve feishu <CODE>openclaw pairing reject feishu <CODE>openclaw pairing cleanup

11.8.5 插件管理

openclaw plugins listopenclaw plugins search feishuopenclaw plugins install @openclaw/feishuopenclaw plugins uninstall @openclaw/feishuopenclaw plugins update --all

11.8.6 工具管理

openclaw tools listopenclaw tools enable read_file write_fileopenclaw tools disable execute_commandopenclaw tools register ~/my-tool.jsopenclaw tools test read_file

11.8.7 Agent 管理

openclaw agents listopenclaw agents create my-agentopenclaw agents delete my-agentopenclaw agents switch my-agentopenclaw agents config my-agent

11.8.8 会话管理

openclaw sessions listopenclaw sessions show <session-id>openclaw sessions delete <session-id>openclaw sessions clearopenclaw sessions export <session-id> --output session.jsonopenclaw sessions import session.json

11.8.9 统计和监控

openclaw statsopenclaw stats todayopenclaw stats weekopenclaw stats apiopenclaw stats memoryopenclaw stats performance

11.8.10 测试和诊断

openclaw test apiopenclaw test channel feishuopenclaw test tool read_fileopenclaw diagnoseopenclaw validate configopenclaw health check

11.8.11 数据管理

openclaw backup createopenclaw backup listopenclaw backup restore <backup-id>openclaw cache clearopenclaw cleanup tempopenclaw export --output data.jsonopenclaw import data.json

11.8.12 更新和维护

openclaw update checkopenclaw updateopenclaw update --version 2026.3.2openclaw rollbackopenclaw uninstall

11.8.13 开发和调试

openclaw devopenclaw --debugopenclaw --verboseopenclaw testopenclaw buildopenclaw clean

11.8.14 常用命令组合

# 快速重启openclaw gateway stop && openclaw gateway install# 查看实时错误日志openclaw logs --follow | grep ERROR# 备份并更新openclaw backup create && openclaw update# 清理并重启openclaw cache clear && openclaw gateway restart# 完整诊断openclaw diagnose && openclaw health check && openclaw test api

11.8.15 环境变量

export OPENCLAW_LOG_LEVEL=debugexport OPENCLAW_HOME=~/.openclawexport OPENCLAW_PORT=18789export DEEPSEEK_API_KEY=sk-xxxexport MOONSHOT_API_KEY=sk-xxx

11.8.16 配置文件位置

~/.openclaw/openclaw.json      # 主配置文件~/.openclaw/logs/gateway.log   # 日志文件~/.openclaw/cache/             # 缓存目录~/.openclaw/data/              # 数据目录~/.openclaw/plugins/           # 插件目录~/.openclaw/tools/             # 工具目录

📝 本章小结

通过本章学习,你已掌握 OpenClaw 的高级配置:

核心内容回顾

  • • Antigravity Manager 配置:统一管理 API,实现本地多模型服务
  • • 多模型切换策略:场景化选择 + 模型容灾机制 + 认证 Profile 轮换
  • • 记忆搜索配置:智能上下文感知,支持混合检索
  • • 成本优化方案:通过缓存、降级、免费额度最大化降低成本 50%+
  • • 性能调优技巧:并行处理、缓存、内存管理提升响应速度 60%
  • • 模型提供商配置:支持 20+ 主流模型,包括国际、国产、本地模型
  • • 工具系统详解:内置工具、权限控制、自定义开发
  • • CLI 命令完整参考:100+ 命令详解

推荐配置组合

使用场景
推荐模型
容灾方案
记忆搜索
日常使用
DeepSeek
DeepSeek → Claude Sonnet → Claude Opus
Gemini Embedding
长文档处理
Kimi
Kimi → Claude Sonnet
OpenAI Embedding
复杂任务
Claude 3.5 Sonnet
Claude → GPT-4o → Gemini
Gemini Embedding
本地隐私
Ollama
Ollama 仅本地
Local Embedding

11.9 Talk 模式配置(2026.3.8+)

Talk 模式支持语音输入输出,新增 talk.silenceTimeoutMs 配置项,设置自动发送前的静默等待时间(毫秒)。

{"talk":{"silenceTimeoutMs":2000// 默认2秒无声后自动发送}}

推荐值

  • • 快速响应:1000-1500ms
  • • 平衡模式:2000-2500ms(默认)
  • • 宽松模式:3000-4000ms

11.10 Brave Web Search:LLM Context 模式(2026.3.8+,可选)

新增可选配置 tools.web.search.brave.mode: "llm-context",调用 Brave 的 LLM Context 端点,返回更适合大模型使用的 grounding snippets(带来源元数据)。

tools:web:search:brave:mode:"llm-context"

该模式为 opt-in,不配置则保持原有行为。


下章预告:第12章 5类人群的效率提升实战

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-02 00:32:25 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/487954.html
  2. 运行时间 : 0.098391s [ 吞吐率:10.16req/s ] 内存消耗:5,479.53kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=34fea6fbb97e8115980cf0437cec4b64
  1. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_static.php ( 6.05 KB )
  7. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/ralouphie/getallheaders/src/getallheaders.php ( 1.60 KB )
  10. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  11. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  12. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  13. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  14. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  15. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  16. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  17. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  18. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  19. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions_include.php ( 0.16 KB )
  21. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions.php ( 5.54 KB )
  22. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  23. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  24. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  25. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/provider.php ( 0.19 KB )
  26. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  27. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  28. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  29. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/common.php ( 0.03 KB )
  30. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  32. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/alipay.php ( 3.59 KB )
  33. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  34. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/app.php ( 0.95 KB )
  35. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cache.php ( 0.78 KB )
  36. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/console.php ( 0.23 KB )
  37. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cookie.php ( 0.56 KB )
  38. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/database.php ( 2.48 KB )
  39. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/filesystem.php ( 0.61 KB )
  40. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/lang.php ( 0.91 KB )
  41. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/log.php ( 1.35 KB )
  42. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/middleware.php ( 0.19 KB )
  43. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/route.php ( 1.89 KB )
  44. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/session.php ( 0.57 KB )
  45. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/trace.php ( 0.34 KB )
  46. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/view.php ( 0.82 KB )
  47. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/event.php ( 0.25 KB )
  48. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  49. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/service.php ( 0.13 KB )
  50. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/AppService.php ( 0.26 KB )
  51. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  52. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  53. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  54. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  55. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  56. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/services.php ( 0.14 KB )
  57. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  58. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  59. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  60. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  61. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  62. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  63. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  64. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  65. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  66. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  67. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  68. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  69. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  70. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  71. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  72. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  73. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  74. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  75. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  76. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  77. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  78. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  79. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  80. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  81. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  82. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  83. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  84. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  85. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  86. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  87. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/Request.php ( 0.09 KB )
  88. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  89. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/middleware.php ( 0.25 KB )
  90. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  91. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  92. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  93. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  94. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  95. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  96. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  97. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  98. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  99. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  100. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  101. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  102. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  103. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/route/app.php ( 3.94 KB )
  104. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  105. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  106. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Index.php ( 9.87 KB )
  108. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/BaseController.php ( 2.05 KB )
  109. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  110. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  111. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  112. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  113. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  114. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  115. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  116. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  117. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  118. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  119. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  120. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  121. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  122. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  123. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  124. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  125. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  126. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  127. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  128. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  129. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  130. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  131. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  132. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  133. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  134. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  135. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Es.php ( 3.30 KB )
  136. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  137. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  138. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  139. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  140. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  141. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  142. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  143. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  144. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/runtime/temp/c935550e3e8a3a4c27dd94e439343fdf.php ( 31.80 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000561s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000654s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000304s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000292s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000541s ]
  6. SELECT * FROM `set` [ RunTime:0.000250s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000584s ]
  8. SELECT * FROM `article` WHERE `id` = 487954 LIMIT 1 [ RunTime:0.000624s ]
  9. UPDATE `article` SET `lasttime` = 1775061145 WHERE `id` = 487954 [ RunTime:0.006404s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000272s ]
  11. SELECT * FROM `article` WHERE `id` < 487954 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000631s ]
  12. SELECT * FROM `article` WHERE `id` > 487954 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000462s ]
  13. SELECT * FROM `article` WHERE `id` < 487954 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002118s ]
  14. SELECT * FROM `article` WHERE `id` < 487954 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000911s ]
  15. SELECT * FROM `article` WHERE `id` < 487954 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.003813s ]
0.100187s