注意事项
- 此方案不需要工作流。
- 此方案不需要开放外网。
具体方法
-
检查代码仓库 参考地址:https://github.com/DingTalk-Real-AI/dingtalk-moltbot-connector
-
修改 package.json 增加如下配置:
"moltbot": { "extensions": ["./plugin.ts"], "channels": ["dingtalk-connector"], "installDependencies": true } -
安装插件
moltbot plugins install dingtalk-moltbot-connector -
增加钉钉配置 编辑
~/.moltbot/moltbot.json;如果已有配置请进行修改:{ "channels": { "dingtalk-connector": { "enabled": true, "clientId": "dingxxxxxxxxx", // 钉钉 AppKey "clientSecret": "your_secret_here", // 钉钉 AppSecret "gatewayToken": "", // 可选:Gateway 认证 token, opencode.json 配置中 gateway.auth.token 的值 "gatewayPassword": "", // 可选:Gateway 认证 password(与 token 二选一) "sessionTimeout": 1800000 // 可选:会话超时 (ms),默认 30 分钟 } }, "gateway": { // gateway 通常是已有的节点,配置时注意把 http 部分追加到已有节点下 "http": { "endpoints": { "chatCompletions": { "enabled": true } } } } }

