mirror of
https://github.com/wanikua/danghuangshang.git
synced 2026-09-03 07:03:37 +08:00
refactor: remove all vendor-specific model names, API URLs, and provider recommendations
This commit is contained in:
50
README.md
50
README.md
@@ -10,7 +10,7 @@
|
||||
|
||||
## 为什么选这套方案?
|
||||
|
||||
| | ChatGPT / Claude 网页版 | AutoGPT / CrewAI / MetaGPT | **AI 朝廷(本方案)** |
|
||||
| | ChatGPT 等网页版 | AutoGPT / CrewAI / MetaGPT | **AI 朝廷(本方案)** |
|
||||
|---|---|---|---|
|
||||
| 多 Agent 协作 | ❌ 单个通才 | ✅ 需写 Python 编排 | ✅ 配置文件搞定,零代码 |
|
||||
| 独立记忆 | ⚠️ 单一通用记忆 | ⚠️ 需自己接向量库 | ✅ 每个 Agent 独立工作区 + memory 文件 |
|
||||
@@ -36,7 +36,7 @@ Clawdbot Gateway(Node.js 守护进程)
|
||||
↓
|
||||
┌─────────┐ ┌─────────┐ ┌─────────┐
|
||||
│ 兵部 │ │ 户部 │ │ 礼部 │ ... (可扩展)
|
||||
│ Opus │ │ Opus │ │ Sonnet │
|
||||
│ 强力模型 │ │ 强力模型 │ │ 快速模型 │
|
||||
│ 编码专家│ │ 财务专家│ │ 营销专家│
|
||||
└────┬────┘ └────┬────┘ └────┬────┘
|
||||
│ │ │
|
||||
@@ -49,7 +49,7 @@ Clawdbot Gateway(Node.js 守护进程)
|
||||
|
||||
每个 Agent 是一个独立的 Discord Bot,绑定独立的 AI 身份:
|
||||
- **独立记忆**:每个 Agent 有自己的 `memory/` 目录,越用越懂你
|
||||
- **独立模型**:重活用 Opus,轻活用 Sonnet,省钱又高效
|
||||
- **独立模型**:重活用 强力模型,轻活用 快速模型,省钱又高效
|
||||
- **独立沙箱**:Agent 代码执行互不干扰,安全隔离
|
||||
- **身份注入**:Clawdbot 自动将 SOUL.md + IDENTITY.md + 工作区文件组装为系统提示
|
||||
|
||||
@@ -59,14 +59,14 @@ Clawdbot Gateway(Node.js 守护进程)
|
||||
|
||||
### 第一步:一键部署(5 分钟)
|
||||
|
||||
领好 [Oracle Cloud 免费服务器](https://www.oracle.com/cloud/free/)(ARM 4核 24GB,永久免费),SSH 连上,跑这一行:
|
||||
领好 [云服务器](https://www.你的云服务商/)(ARM 4核 24GB,永久免费),SSH 连上,跑这一行:
|
||||
|
||||
```bash
|
||||
bash <(curl -fsSL https://raw.githubusercontent.com/wanikua/boluobobo-ai-court-tutorial/main/install.sh)
|
||||
```
|
||||
|
||||
脚本自动完成:
|
||||
- ✅ 系统更新 + Oracle 防火墙配置
|
||||
- ✅ 系统更新 + 云服务商防火墙配置
|
||||
- ✅ 4GB Swap(防 OOM)
|
||||
- ✅ Node.js 22 + GitHub CLI + Chromium
|
||||
- ✅ Clawdbot 全局安装
|
||||
@@ -79,7 +79,7 @@ bash <(curl -fsSL https://raw.githubusercontent.com/wanikua/boluobobo-ai-court-t
|
||||
|
||||
跑完脚本,你只需要填两样东西:
|
||||
|
||||
1. **Anthropic API Key** → [console.anthropic.com](https://console.anthropic.com)
|
||||
1. **LLM API Key** → [你的LLM服务商控制台](https://你的LLM服务商控制台)
|
||||
2. **Discord Bot Token**(每个部门一个)→ [discord.com/developers](https://discord.com/developers/applications)
|
||||
|
||||
```bash
|
||||
@@ -99,13 +99,13 @@ systemctl --user status clawdbot-gateway
|
||||
|
||||
```
|
||||
@兵部 帮我写个用户登录的 API
|
||||
→ 兵部(Opus):完整代码 + 架构建议,大任务自动开 Thread
|
||||
→ 兵部(强力模型):完整代码 + 架构建议,大任务自动开 Thread
|
||||
|
||||
@户部 这个月 API 花了多少钱
|
||||
→ 户部(Opus):费用明细 + 优化建议
|
||||
→ 户部(强力模型):费用明细 + 优化建议
|
||||
|
||||
@礼部 写条小红书文案,主题是 AI 工具推荐
|
||||
→ 礼部(Sonnet):文案 + 标签建议
|
||||
→ 礼部(快速模型):文案 + 标签建议
|
||||
|
||||
@everyone 明天下午开会,各部门准备周报
|
||||
→ 所有 Agent 各自回复确认
|
||||
@@ -134,15 +134,15 @@ clawdbot cron add \
|
||||
|
||||
| 部门 | 职责 | 推荐模型 | 典型场景 |
|
||||
|------|------|----------|----------|
|
||||
| **司礼监** | 总管调度 | Claude Sonnet | 日常对话、任务分配、自动汇报 |
|
||||
| **兵部** | 软件工程 | Claude Opus | 写代码、架构设计、代码审查、Bug 调试 |
|
||||
| **户部** | 财务运营 | Claude Opus | 成本分析、预算管控、电商运营 |
|
||||
| **礼部** | 品牌营销 | Claude Sonnet | 文案创作、社媒运营、内容策划 |
|
||||
| **工部** | 运维部署 | Claude Sonnet | DevOps、CI/CD、服务器管理 |
|
||||
| **吏部** | 项目管理 | Claude Sonnet | 创业孵化、任务追踪、团队协调 |
|
||||
| **刑部** | 法务合规 | Claude Sonnet | 合同审查、知识产权、合规检查 |
|
||||
| **司礼监** | 总管调度 | 快速模型 | 日常对话、任务分配、自动汇报 |
|
||||
| **兵部** | 软件工程 | 强力模型 | 写代码、架构设计、代码审查、Bug 调试 |
|
||||
| **户部** | 财务运营 | 强力模型 | 成本分析、预算管控、电商运营 |
|
||||
| **礼部** | 品牌营销 | 快速模型 | 文案创作、社媒运营、内容策划 |
|
||||
| **工部** | 运维部署 | 快速模型 | DevOps、CI/CD、服务器管理 |
|
||||
| **吏部** | 项目管理 | 快速模型 | 创业孵化、任务追踪、团队协调 |
|
||||
| **刑部** | 法务合规 | 快速模型 | 合同审查、知识产权、合规检查 |
|
||||
|
||||
> 💡 模型分层策略:重活(编码/分析)用 Opus,轻活(文案/管理)用 Sonnet,能省 5 倍成本。也可以接入 Qwen 等国产模型进一步降本。
|
||||
> 💡 模型分层策略:重活(编码/分析)用 强力模型,轻活(文案/管理)用 快速模型,能省 5 倍成本。也可以接入 经济模型 等国产模型进一步降本。
|
||||
|
||||
---
|
||||
|
||||
@@ -159,7 +159,7 @@ clawdbot cron add \
|
||||
|
||||
| 类别 | Skill |
|
||||
|------|-------|
|
||||
| 开发 | GitHub(Issue/PR/CI)、Coding Agent(Claude Code) |
|
||||
| 开发 | GitHub(Issue/PR/CI)、Coding Agent(Coding Agent) |
|
||||
| 文档 | Notion(数据库/页面/自动汇报) |
|
||||
| 信息 | 浏览器自动化、Web 搜索、Web 抓取 |
|
||||
| 自动化 | Cron 定时任务、心跳自检 |
|
||||
@@ -196,16 +196,16 @@ Agent 可以运行在 Docker 沙箱中,代码执行互不干扰。支持配置
|
||||
不需要。一键脚本搞定安装,配置文件填几个 Key 就行。所有交互都是在 Discord 里用自然语言。
|
||||
|
||||
**Q: 服务器真的免费吗?**
|
||||
Oracle Cloud Always Free 套餐,ARM 4核 24GB 内存 200GB 磁盘,永久免费。需要 Visa/MasterCard 注册(预授权 $1 后退回,不扣费)。
|
||||
云服务商的免费套餐(如有)。
|
||||
|
||||
**Q: 和直接用 ChatGPT 有什么区别?**
|
||||
ChatGPT 是一个通才,对话结束就失忆。这套系统是多个专家——每个 Agent 有自己的专业领域、持久记忆和工具权限。能自动写代码提交 GitHub、自动写文档到 Notion、定时执行任务。
|
||||
|
||||
**Q: 能用其他模型吗?**
|
||||
能。Clawdbot 支持 Anthropic、OpenAI、Google Gemini、通义千问(Qwen)等。在 `clawdbot.json` 里改 model 配置就行。不同部门可以用不同模型。
|
||||
能。Clawdbot 支持 LLM 服务商、OpenAI、Google Gemini、其他服务商(经济模型)等。在 `clawdbot.json` 里改 model 配置就行。不同部门可以用不同模型。
|
||||
|
||||
**Q: 每月 API 费用大概多少?**
|
||||
看使用强度。轻度使用 $10-15/月,中度 $20-30/月。省钱技巧:重活用 Opus,轻活用 Sonnet(便宜约 5 倍),简单任务可接入 Qwen 等国产模型进一步降本。
|
||||
看使用强度。轻度使用 $10-15/月,中度 $20-30/月。省钱技巧:重活用 强力模型,轻活用 快速模型(便宜约 5 倍),简单任务可接入 经济模型 等国产模型进一步降本。
|
||||
|
||||
### 技术问题
|
||||
|
||||
@@ -221,7 +221,7 @@ sandbox mode 设成 `all` 会把 Agent 跑在 Docker 容器里,默认只读文
|
||||
"workspaceAccess": "rw",
|
||||
"docker": {
|
||||
"network": "bridge",
|
||||
"env": { "ANTHROPIC_API_KEY": "sk-..." }
|
||||
"env": { "LLM_API_KEY": "你的LLM_API_KEY" }
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -261,8 +261,8 @@ clawdbot doctor
|
||||
|
||||
- [Clawdbot 官方文档](https://docs.clawd.bot)
|
||||
- [Clawdbot GitHub](https://github.com/clawdbot/clawdbot)
|
||||
- [Oracle Cloud 免费套餐](https://www.oracle.com/cloud/free/)
|
||||
- [Anthropic API](https://console.anthropic.com)
|
||||
- [云服务商 免费套餐](https://www.你的云服务商/)
|
||||
- [LLM API](https://你的LLM服务商控制台)
|
||||
|
||||
---
|
||||
|
||||
@@ -287,7 +287,7 @@ clawdbot doctor
|
||||
- 不要将包含密钥的配置文件提交到公开仓库 / Don't commit config files with keys to public repos
|
||||
|
||||
4. **服务器费用 / Server Costs**
|
||||
- 免费服务器(Oracle Cloud 等)有一定使用限额 / Free servers have usage limits
|
||||
- 免费服务器(云服务商 等)有一定使用限额 / Free servers have usage limits
|
||||
- 超出限额后可能产生费用,请留意账单 / Excess usage may incur charges
|
||||
|
||||
5. **数据备份 / Data Backup**
|
||||
|
||||
46
install.sh
46
install.sh
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ============================================
|
||||
# AI 朝廷一键部署脚本
|
||||
# 适用于 Oracle Cloud ARM / Ubuntu 24.04(22.04 也可用)
|
||||
# 适用于 云服务商 ARM / Ubuntu 24.04(22.04 也可用)
|
||||
# ============================================
|
||||
set -e
|
||||
|
||||
@@ -22,7 +22,7 @@ sudo apt-get update -qq
|
||||
|
||||
# ---- 2. 防火墙 ----
|
||||
echo -e "${YELLOW}[2/8] 配置防火墙...${NC}"
|
||||
# Oracle Cloud 默认 iptables 有一条 REJECT 规则会阻断非 SSH 流量,只删这条
|
||||
# 云服务商 默认 iptables 有一条 REJECT 规则会阻断非 SSH 流量,只删这条
|
||||
# 注意:不能 flush 整个链,否则在 DROP 策略下会丢失 SSH 连接
|
||||
sudo iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited 2>/dev/null || true
|
||||
sudo iptables -D FORWARD -j REJECT --reject-with icmp-host-prohibited 2>/dev/null || true
|
||||
@@ -123,9 +123,9 @@ cat > IDENTITY.md << 'ID_EOF'
|
||||
## 模型分层
|
||||
| 层级 | 模型 | 说明 |
|
||||
|---|---|---|
|
||||
| 调度层 | Claude Sonnet | 日常对话,快速响应 |
|
||||
| 执行层(重) | Claude Opus | 编码、深度分析 |
|
||||
| 执行层(轻) | Qwen Plus(可选) | 轻量任务,省钱 |
|
||||
| 调度层 | 快速模型 | 日常对话,快速响应 |
|
||||
| 执行层(重) | 强力模型 | 编码、深度分析 |
|
||||
| 执行层(轻) | 经济模型(可选) | 轻量任务,省钱 |
|
||||
|
||||
## 六部
|
||||
- 兵部:软件工程、系统架构
|
||||
@@ -156,21 +156,21 @@ cat > "$CONFIG_DIR/clawdbot.json" << CONFIG_EOF
|
||||
{
|
||||
"models": {
|
||||
"providers": {
|
||||
"anthropic": {
|
||||
"baseUrl": "https://api.anthropic.com",
|
||||
"apiKey": "YOUR_ANTHROPIC_API_KEY",
|
||||
"api": "anthropic-messages",
|
||||
"your-provider": {
|
||||
"baseUrl": "https://your-llm-provider-api-url",
|
||||
"apiKey": "YOUR_LLM_API_KEY",
|
||||
"api": "your-api-format",
|
||||
"models": [
|
||||
{
|
||||
"id": "claude-sonnet-4-5",
|
||||
"name": "Claude Sonnet 4.5",
|
||||
"id": "fast-model",
|
||||
"name": "快速模型",
|
||||
"input": ["text", "image"],
|
||||
"contextWindow": 200000,
|
||||
"maxTokens": 8192
|
||||
},
|
||||
{
|
||||
"id": "claude-opus-4-6",
|
||||
"name": "Claude Opus 4.6",
|
||||
"id": "strong-model",
|
||||
"name": "强力模型",
|
||||
"input": ["text", "image"],
|
||||
"contextWindow": 200000,
|
||||
"maxTokens": 8192
|
||||
@@ -182,55 +182,55 @@ cat > "$CONFIG_DIR/clawdbot.json" << CONFIG_EOF
|
||||
"agents": {
|
||||
"defaults": {
|
||||
"workspace": "$HOME/clawd",
|
||||
"model": { "primary": "anthropic/claude-sonnet-4-5" },
|
||||
"model": { "primary": "your-provider/fast-model" },
|
||||
"sandbox": { "mode": "non-main" }
|
||||
},
|
||||
"list": [
|
||||
{
|
||||
"id": "main",
|
||||
"name": "司礼监",
|
||||
"model": { "primary": "anthropic/claude-sonnet-4-5" },
|
||||
"model": { "primary": "your-provider/fast-model" },
|
||||
"sandbox": { "mode": "off" }
|
||||
},
|
||||
{
|
||||
"id": "bingbu",
|
||||
"name": "兵部",
|
||||
"model": { "primary": "anthropic/claude-opus-4-6" },
|
||||
"model": { "primary": "your-provider/strong-model" },
|
||||
"identity": { "theme": "你是兵部尚书,专精软件工程、系统架构、代码审查。回答用中文,直接给方案。" },
|
||||
"sandbox": { "mode": "all", "scope": "agent" }
|
||||
},
|
||||
{
|
||||
"id": "hubu",
|
||||
"name": "户部",
|
||||
"model": { "primary": "anthropic/claude-opus-4-6" },
|
||||
"model": { "primary": "your-provider/strong-model" },
|
||||
"identity": { "theme": "你是户部尚书,专精财务分析、成本管控、电商运营。回答用中文,数据驱动。" },
|
||||
"sandbox": { "mode": "all", "scope": "agent" }
|
||||
},
|
||||
{
|
||||
"id": "libu",
|
||||
"name": "礼部",
|
||||
"model": { "primary": "anthropic/claude-sonnet-4-5" },
|
||||
"model": { "primary": "your-provider/fast-model" },
|
||||
"identity": { "theme": "你是礼部尚书,专精品牌营销、社交媒体、内容创作。回答用中文,风格活泼。" },
|
||||
"sandbox": { "mode": "all", "scope": "agent" }
|
||||
},
|
||||
{
|
||||
"id": "gongbu",
|
||||
"name": "工部",
|
||||
"model": { "primary": "anthropic/claude-sonnet-4-5" },
|
||||
"model": { "primary": "your-provider/fast-model" },
|
||||
"identity": { "theme": "你是工部尚书,专精 DevOps、服务器运维、CI/CD、基础设施。回答用中文,注重实操。" },
|
||||
"sandbox": { "mode": "all", "scope": "agent" }
|
||||
},
|
||||
{
|
||||
"id": "libu2",
|
||||
"name": "吏部",
|
||||
"model": { "primary": "anthropic/claude-sonnet-4-5" },
|
||||
"model": { "primary": "your-provider/fast-model" },
|
||||
"identity": { "theme": "你是吏部尚书,专精项目管理、创业孵化、团队协调。回答用中文,条理清晰。" },
|
||||
"sandbox": { "mode": "all", "scope": "agent" }
|
||||
},
|
||||
{
|
||||
"id": "xingbu",
|
||||
"name": "刑部",
|
||||
"model": { "primary": "anthropic/claude-sonnet-4-5" },
|
||||
"model": { "primary": "your-provider/fast-model" },
|
||||
"identity": { "theme": "你是刑部尚书,专精法务合规、知识产权、合同审查。回答用中文,严谨专业。" },
|
||||
"sandbox": { "mode": "all", "scope": "agent" }
|
||||
}
|
||||
@@ -311,8 +311,8 @@ echo "接下来你需要完成以下配置:"
|
||||
echo ""
|
||||
echo -e " ${YELLOW}1. 设置 API Key${NC}"
|
||||
echo " 编辑 ~/.clawdbot/clawdbot.json"
|
||||
echo " 把 YOUR_ANTHROPIC_API_KEY 替换成你的 Anthropic API Key"
|
||||
echo " 获取地址:https://console.anthropic.com"
|
||||
echo " 把 YOUR_LLM_API_KEY 替换成你的 LLM API Key"
|
||||
echo " 获取地址:https://你的LLM服务商控制台"
|
||||
echo ""
|
||||
echo -e " ${YELLOW}2. 创建 Discord Bot(每个部门一个)${NC}"
|
||||
echo " a) 访问 https://discord.com/developers/applications"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
一、领免费服务器(10 分钟)
|
||||
|
||||
1.1 打开 Oracle Cloud 官网
|
||||
网址:https://signup.cloud.oracle.com
|
||||
1.1 打开 云服务商 官网
|
||||
网址:https://你的云服务商注册页
|
||||
|
||||
|
||||
1.2 填写基本信息
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
|
||||
1.3 验证邮箱
|
||||
1. 打开邮箱,找到 Oracle 发的验证邮件
|
||||
1. 打开邮箱,找到 云服务商发的验证邮件
|
||||
2. 复制 6 位验证码
|
||||
3. 粘贴回注册页面,点击 "Verify Code"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
- 至少 8 个字符
|
||||
- 至少 1 个大写字母 + 1 个小写字母 + 1 个数字 + 1 个特殊字符
|
||||
|
||||
💡 建议格式:MyOracle2026! 这种
|
||||
💡 建议格式:MyCloud2026! 这种
|
||||
|
||||
|
||||
1.5 选择主区域(⚠️ 最重要!)
|
||||
@@ -68,7 +68,7 @@
|
||||
❗ 易错点:+86 有时收不到短信,多试几次或换个时间段
|
||||
|
||||
1.7 添加信用卡
|
||||
🔒 不会扣费!只是身份验证,Oracle 会预授权$1(之后退回)
|
||||
🔒 不会扣费!只是身份验证,云服务商会预授权$1(之后退回)
|
||||
|
||||
支持的卡:
|
||||
✅ Visa 信用卡/借记卡
|
||||
@@ -85,12 +85,12 @@
|
||||
2. 点击 "Start my free trial"
|
||||
3. 等待激活(通常几分钟到几小时)
|
||||
|
||||
📍 成功标志:收到邮件"Your Oracle Cloud account is activated" ✅
|
||||
📍 成功标志:收到邮件"Your 云服务商 account is activated" ✅
|
||||
|
||||
1.9 登录控制台
|
||||
1. 访问:https://cloud.oracle.com
|
||||
1. 访问:https://你的云服务商控制台
|
||||
2. 输入 Cloud Account Name(注册时填的)
|
||||
3. 选择 "Oracle Cloud Infrastructure Direct Sign-In"
|
||||
3. 选择 "云服务商 Infrastructure Direct Sign-In"
|
||||
4. 输入邮箱和密码登录
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
配置实例(按顺序):
|
||||
|
||||
Name:clawdbot-server(随便起)
|
||||
Image:Ubuntu 24.04(一定要改!默认是 Oracle Linux)
|
||||
Image:Ubuntu 24.04(一定要改!默认是 默认系统)
|
||||
Shape:VM.Standard.A1.Flex(ARM 架构)
|
||||
OCPUs:4(免费最大 4 核)
|
||||
Memory:24(免费最大 24GB)
|
||||
@@ -220,13 +220,13 @@ npm install -g clawdbot --registry=https://registry.npmmirror.com
|
||||
|
||||
四、配置 API Key(5 分钟)
|
||||
|
||||
4.1 获取 Anthropic API Key
|
||||
1. 访问:https://console.anthropic.com
|
||||
4.1 获取 LLM API Key
|
||||
1. 访问:https://你的LLM服务商控制台
|
||||
2. 注册/登录账号
|
||||
3. 左侧点击 "API Keys"
|
||||
4. 点击 "Create Key"
|
||||
5. 起个名字(如 oracle-server)
|
||||
6. 复制 Key(格式:sk-ant-api03-xxxxx)
|
||||
5. 起个名字(如 my-server)
|
||||
6. 复制 Key(格式:LLM_API_KEY)
|
||||
|
||||
⏱️ 耗时:2 分钟
|
||||
🔴 超级重要:API Key 只显示一次!复制后妥善保存!
|
||||
@@ -234,7 +234,7 @@ npm install -g clawdbot --registry=https://registry.npmmirror.com
|
||||
|
||||
💡 费用说明:
|
||||
- 新账号通常有$5 免费额度
|
||||
- Claude Sonnet:约$3/百万 token
|
||||
- 快速模型:约$3/百万 token
|
||||
- 正常用每月$10-30 够了
|
||||
|
||||
4.2 保存好你的 API Key
|
||||
@@ -280,21 +280,21 @@ nano ~/.clawdbot/clawdbot.json
|
||||
{
|
||||
"models": {
|
||||
"providers": {
|
||||
"anthropic": {
|
||||
"baseUrl": "https://api.anthropic.com",
|
||||
"apiKey": "sk-ant-api03-你的密钥",
|
||||
"api": "anthropic-messages",
|
||||
"your-provider": {
|
||||
"baseUrl": "https://your-llm-provider-api-url",
|
||||
"apiKey": "你的LLM_API_KEY",
|
||||
"api": "your-api-format",
|
||||
"models": [
|
||||
{
|
||||
"id": "claude-sonnet-4-5",
|
||||
"name": "Claude Sonnet 4.5",
|
||||
"id": "fast-model",
|
||||
"name": "快速模型",
|
||||
"input": ["text", "image"],
|
||||
"contextWindow": 200000,
|
||||
"maxTokens": 8192
|
||||
},
|
||||
{
|
||||
"id": "claude-opus-4-6",
|
||||
"name": "Claude Opus 4.6",
|
||||
"id": "strong-model",
|
||||
"name": "强力模型",
|
||||
"input": ["text", "image"],
|
||||
"contextWindow": 200000,
|
||||
"maxTokens": 8192
|
||||
@@ -306,34 +306,34 @@ nano ~/.clawdbot/clawdbot.json
|
||||
"agents": {
|
||||
"defaults": {
|
||||
"workspace": "/home/ubuntu/clawd",
|
||||
"model": { "primary": "anthropic/claude-sonnet-4-5" },
|
||||
"model": { "primary": "your-provider/fast-model" },
|
||||
"sandbox": { "mode": "non-main" }
|
||||
},
|
||||
"list": [
|
||||
{
|
||||
"id": "main",
|
||||
"name": "司礼监",
|
||||
"model": { "primary": "anthropic/claude-sonnet-4-5" },
|
||||
"model": { "primary": "your-provider/fast-model" },
|
||||
"sandbox": { "mode": "off" }
|
||||
},
|
||||
{
|
||||
"id": "bingbu",
|
||||
"name": "兵部",
|
||||
"model": { "primary": "anthropic/claude-opus-4-6" },
|
||||
"model": { "primary": "your-provider/strong-model" },
|
||||
"identity": { "theme": "你是兵部尚书,专精软件工程、系统架构、代码审查。回答用中文,直接给方案。" },
|
||||
"sandbox": { "mode": "all", "scope": "agent" }
|
||||
},
|
||||
{
|
||||
"id": "hubu",
|
||||
"name": "户部",
|
||||
"model": { "primary": "anthropic/claude-opus-4-6" },
|
||||
"model": { "primary": "your-provider/strong-model" },
|
||||
"identity": { "theme": "你是户部尚书,专精财务分析、成本管控、电商运营。回答用中文,数据驱动。" },
|
||||
"sandbox": { "mode": "all", "scope": "agent" }
|
||||
},
|
||||
{
|
||||
"id": "libu",
|
||||
"name": "礼部",
|
||||
"model": { "primary": "anthropic/claude-sonnet-4-5" },
|
||||
"model": { "primary": "your-provider/fast-model" },
|
||||
"identity": { "theme": "你是礼部尚书,专精品牌营销、社交媒体、内容创作。回答用中文,风格活泼。" },
|
||||
"sandbox": { "mode": "all", "scope": "agent" }
|
||||
}
|
||||
@@ -375,20 +375,20 @@ nano ~/.clawdbot/clawdbot.json
|
||||
]
|
||||
}
|
||||
|
||||
💡 想省钱?礼部等轻量任务可以换成 Qwen 模型:
|
||||
1. 在 models.providers 中添加 dashscope provider:
|
||||
"dashscope": {
|
||||
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode",
|
||||
"apiKey": "sk-你的通义千问密钥",
|
||||
💡 想省钱?礼部等轻量任务可以换成 经济模型 模型:
|
||||
1. 在 models.providers 中添加 your-provider provider:
|
||||
"your-provider": {
|
||||
"baseUrl": "https://your-provider-api-url",
|
||||
"apiKey": "sk-你的其他服务商密钥",
|
||||
"api": "openai-chat",
|
||||
"models": [{ "id": "qwen-plus", "name": "Qwen Plus", "input": ["text"], "contextWindow": 131072, "maxTokens": 8192 }]
|
||||
"models": [{ "id": "budget-model", "name": "经济模型", "input": ["text"], "contextWindow": 131072, "maxTokens": 8192 }]
|
||||
}
|
||||
2. 把礼部的 model 改为 { "primary": "dashscope/qwen-plus" }
|
||||
3. 获取地址:https://dashscope.console.aliyun.com
|
||||
4. Qwen 比 Claude 便宜 50 倍,适合内容创作、日常对话等轻量任务
|
||||
2. 把礼部的 model 改为 { "primary": "your-provider/budget-model" }
|
||||
3. 获取地址:https://你的服务商控制台
|
||||
4. 经济模型 比 其他模型便宜 50 倍,适合内容创作、日常对话等轻量任务
|
||||
|
||||
⚠️ 重要!替换以下内容(获取方法见下面的详细步骤):
|
||||
- "sk-ant-api03-你的密钥" → 你的 Anthropic API Key
|
||||
- "你的LLM_API_KEY" → 你的 LLM API Key
|
||||
- "司礼监的Bot Token" 等 → 每个部门的 Discord Bot Token(下一步创建)
|
||||
|
||||
💡 注意 groupPolicy: "open" 这个配置很重要!
|
||||
@@ -518,7 +518,7 @@ systemctl --user stop clawdbot-gateway
|
||||
|
||||
七、常见问题 Q&A
|
||||
|
||||
Q1: Oracle 注册一直失败怎么办?
|
||||
Q1: 云服务商注册一直失败怎么办?
|
||||
|
||||
解决:
|
||||
- 检查是否用了国内 IP(换梯子节点)
|
||||
@@ -555,7 +555,7 @@ Q5: SSH 连接被拒绝?
|
||||
- 确认实例状态是"RUNNING"
|
||||
- 确认用户名是 ubuntu(不是 root)
|
||||
- 确认使用了正确的私钥文件
|
||||
- 检查 Oracle 安全组是否开放 22 端口
|
||||
- 检查 云服务商安全组是否开放 22 端口
|
||||
|
||||
Q6: clawdbot 命令找不到?
|
||||
|
||||
@@ -584,9 +584,9 @@ clawdbot doctor
|
||||
Q8: 如何降低成本?
|
||||
|
||||
建议:
|
||||
1. 日常对话用 Sonnet(便宜 10 倍)
|
||||
2. 简单任务用 Qwen(便宜 50 倍)
|
||||
3. 复杂任务才上 Opus
|
||||
1. 日常对话用 快速模型(便宜 10 倍)
|
||||
2. 简单任务用 经济模型(便宜 50 倍)
|
||||
3. 复杂任务才上 强力模型
|
||||
4. 每月$10-30 够用
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -594,19 +594,19 @@ Q8: 如何降低成本?
|
||||
八、15 张配图清单
|
||||
|
||||
编号 | 内容 | 截图位置 | 标注重点
|
||||
1 | Oracle 注册首页 | https://signup.cloud.oracle.com | 圈出"Sign Up"按钮
|
||||
1 | 云服务商注册首页 | https://你的云服务商注册页 | 圈出"Sign Up"按钮
|
||||
2 | 注册表单 | 邮箱输入区域 | 圈出邮箱框和验证按钮
|
||||
3 | 验证邮件 | 邮箱收件箱 | 圈出 6 位验证码
|
||||
4 | 密码设置 | 密码输入页面 | 标注密码要求
|
||||
5 | 区域选择 | Home Region 下拉框 | 圈出"ap-tokyo-1"
|
||||
6 | 信用卡填写 | 卡号输入页面 | 圈出 Visa/MasterCard 标识
|
||||
7 | Oracle 登录页 | https://cloud.oracle.com | 圈出登录入口
|
||||
7 | 云服务商登录页 | https://你的云服务商控制台 | 圈出登录入口
|
||||
8 | Instances 页面 | Compute → Instances | 圈出"Create Instance"
|
||||
9 | 实例配置页 | Shape 和 SSH 密钥区域 | 圈出 ARM 选择和下载按钮
|
||||
10 | 实例详情页 | 实例运行状态 | 圈出公网 IP 地址
|
||||
11 | MobaXterm 配置 | Session 设置窗口 | 圈出 IP、用户名、密钥选择
|
||||
12 | 安装完成截图 | 终端输出 | 圈出"部署完成!"
|
||||
13 | Anthropic API 页 | https://console.anthropic.com | 圈出"Create Key"
|
||||
13 | LLM API 页 | https://你的LLM服务商控制台 | 圈出"Create Key"
|
||||
14 | ~/clawd 目录 | ls -la 输出 | 圈出 SOUL.md、IDENTITY.md 等
|
||||
15 | 配置文件 | clawdbot.json 内容 | 圈出 agents.list 配置
|
||||
|
||||
|
||||
@@ -531,7 +531,7 @@ Token 通过环境变量配置,不写在 clawdbot.json 里。
|
||||
4️⃣ 财务数据记录(食货表)
|
||||
|
||||
# 记录 API 花费
|
||||
@司礼监 说"在 Notion 财务数据库添加记录:日期今天,类别'API 费用',金额 2.5 美元,备注'Claude 调用'"
|
||||
@司礼监 说"在 Notion 财务数据库添加记录:日期今天,类别'API 费用',金额 2.5 美元,备注'LLM 调用'"
|
||||
|
||||
# 月度汇总
|
||||
@司礼监 说"汇总本月所有 API 花费,按服务分类统计"
|
||||
|
||||
Reference in New Issue
Block a user