clawstu

国内主流渠道配置指南

本文介绍如何在 OpenClaw 中配置国内主流 AI 服务渠道,包括 QQ、微信、企业微信、飞书等接入方式。

一、百度文心一言

openclaw channel add \
  --name "baidu-ernie" \
  --type baidu \
  --api-key "your-api-key" \
  --secret-key "your-secret-key" \
  --region "beijing"

支持的模型:ERNIE-Bot、ERNIE-Bot-4、ERNIE-Bot-turbo

二、阿里通义千问

openclaw channel add \
  --name "aliyun-qwen" \
  --type aliyun \
  --api-key "your-api-key" \
  --base-url "https://dashscope.aliyuncs.com/api/v1"

支持的模型:qwen-turbo、qwen-plus、qwen-max

三、智谱 AI (GLM)

openclaw channel add \
  --name "zhipu-glm" \
  --type zhipu \
  --api-key "your-api-key"

支持的模型:chatglm_turbo、chatglm_pro、chatglm_std

四、讯飞星火

openclaw channel add \
  --name "xunfei-spark" \
  --type xunfei \
  --app-id "your-app-id" \
  --api-key "your-api-key" \
  --api-secret "your-api-secret"

五、腾讯混元

openclaw channel add \
  --name "tencent-hunyuan" \
  --type tencent \
  --secret-id "your-secret-id" \
  --secret-key "your-secret-key"

六、消息平台接入

6.1 企业微信

# 配置企业微信回调
openclaw webhook add \
  --name "wecom" \
  --type wechat-work \
  --corp-id "your-corp-id" \
  --corp-secret "your-secret" \
  --agent-id "your-agent-id"

6.2 飞书

# 配置飞书机器人
openclaw webhook add \
  --name "feishu" \
  --type feishu \
  --app-id "your-app-id" \
  --app-secret "your-app-secret"

6.3 钉钉

# 配置钉钉机器人
openclaw webhook add \
  --name "dingtalk" \
  --type dingtalk \
  --webhook-token "your-token" \
  --webhook-secret "your-secret"

七、渠道负载均衡

配置多个同类型渠道实现负载均衡:

# 创建渠道组
openclaw channel-group create --name "cn-llm-group"

# 添加渠道到组
openclaw channel-group add --group "cn-llm-group" --channel "baidu-ernie"
openclaw channel-group add --group "cn-llm-group" --channel "aliyun-qwen"
openclaw channel-group add --group "cn-llm-group" --channel "zhipu-glm"

# 配置负载均衡策略
openclaw channel-group set --name "cn-llm-group" --strategy round-robin