本文介绍如何在 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
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"
# 配置企业微信回调
openclaw webhook add \
--name "wecom" \
--type wechat-work \
--corp-id "your-corp-id" \
--corp-secret "your-secret" \
--agent-id "your-agent-id"
# 配置飞书机器人
openclaw webhook add \
--name "feishu" \
--type feishu \
--app-id "your-app-id" \
--app-secret "your-app-secret"
# 配置钉钉机器人
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