Wechat快速实现智能对话机器人
0.效果展示打滚卖萌求star求fork!视频效果如下,前往B站观看效果更佳:Wechaty快速实现智能对话机器人!:github开源repo:wechaty-puppet-padlocal-demo-master1. 申请token首先需要申请一个PadLocal token,具体可以参考:How to Apply Token2. 安装node环境Install Node, 12/14 LTS
·
0.效果展示
打滚卖萌求star求fork!
- 视频效果如下,前往B站观看效果更佳:Wechaty快速实现智能对话机器人!:
- github开源repo:wechaty-puppet-padlocal-demo-master
1. 申请token
首先需要申请一个PadLocal token
,具体可以参考:How to Apply Token
2. 安装node环境
Install Node, 12/14 LTS version is recommended.
$ node --version // >= v12.0.0
3. Clone我的github仓库.
- github开源repo:wechaty-puppet-padlocal-demo-master
$ git clone https://github.com/oukohou/wechaty-puppet-padlocal-demo-master.git
- 安装依赖:
$ cd wechaty-puppet-padlocal-demo
$ npm install
4. 将第一步申请的token填进去:main.ts
const puppet = new PuppetPadlocal({
token: "YOUR_PADLOCAL_TOKEN"
})
- 然后就是最核心、最神秘的一行核心代码快速实现人工智能!
var reply = uname.replace("吗", ' ').replace(
"?", " ").replace("我", " ").replace("你", "我").replace("我不", " ").replace("?", "").replace(
"@璇珠官人", "").replace("是不是", "不是").replace("哦", " ~o(〃'▽'〃)o").replace("@璇珠官人", "");
- 然后就可以运行啦
$ npm run demo
微信扫码,然后尽情地玩耍吧!
这样就大功告成啦~~~
你可以在此基础上:
- 更换你自己的人工智能代码
- 更换其他触发条件
打滚卖萌求star、fork!
- 视频效果如下,前往B站观看效果更佳:Wechaty快速实现智能对话机器人!:
- github开源repo:wechaty-puppet-padlocal-demo-master
5.个人简介
我是璇珠官人,一名求知路上的小学生~
其他趣味项目:
更多推荐
已为社区贡献1438条内容
所有评论(0)