注意

  1. 这个不需要工作流
  2. 这个不需要开放外网

具体方法:

1.check代码https://github.com/DingTalk-Real-AI/dingtalk-moltbot-connector

2.package.json增加如下代码

"moltbot": {
     "extensions": ["./plugin.ts"],
	 "channels": ["dingtalk-connector"],
	 "installDependencies": true
}

3.安装插件

moltbot plugins install dingtalk-moltbot-connector

4.增加钉钉配置~/.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
				}
			  }
			}
		  }
		}

4.重启gateway

moltbot gateway restart

5.登录钉钉开发平台修改机器人配置

   切换成stream,关闭工作流

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐