update
This commit is contained in:
BIN
images/0991238483f286d0dc26405f8492e2aa3a04cbbc.jpg
Normal file
BIN
images/0991238483f286d0dc26405f8492e2aa3a04cbbc.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
BIN
images/0cf962707bfae10571f226272148223da88817d4.png
Normal file
BIN
images/0cf962707bfae10571f226272148223da88817d4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 384 KiB |
BIN
images/45687f26ae7c2f64bb5df0624114eea8d0393b28.png
Normal file
BIN
images/45687f26ae7c2f64bb5df0624114eea8d0393b28.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 982 KiB |
BIN
images/93223f8e225fdc5c4fb33e3346bba3000e5d6ffc.png
Normal file
BIN
images/93223f8e225fdc5c4fb33e3346bba3000e5d6ffc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 312 KiB |
BIN
images/9ee4375eda254dea475ea18d6d13e9f08be689c7.png
Normal file
BIN
images/9ee4375eda254dea475ea18d6d13e9f08be689c7.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
BIN
images/e4584381a6a9dead336f22763ce63e2f68cfa23c.png
Normal file
BIN
images/e4584381a6a9dead336f22763ce63e2f68cfa23c.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 107 KiB |
95
公众号/微信机器人.md
Normal file
95
公众号/微信机器人.md
Normal file
@@ -0,0 +1,95 @@
|
||||
## 微信机器人
|
||||
|
||||

|
||||
|
||||
> 搭建微信机器人有哪些方法?
|
||||
|
||||
- `itchat /wxpy`:web协议 [^2]
|
||||
|
||||
- 客户端hook:手机/pc电脑
|
||||
|
||||
- `wechaty:`ipad,mac等协议
|
||||
|
||||
最近`ChatGPT`特别火,以至于朋友圈挺多`送账号,手把手带你赚钱`的海报
|
||||
|
||||
AI最后的使用形式,是基于对话,也就是`聊天机器人`
|
||||
|
||||
而在国内,微信作为移动端IM的老大,就是最好的载体
|
||||
|
||||
那么,不会编程,也能接入微信机器人吗? 答案是:可以
|
||||
|
||||
---
|
||||
|
||||
## 聊天机器人
|
||||
|
||||
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202304021425683.png" title="" alt="" width="401">
|
||||
|
||||
> 首先,要了解风险
|
||||
|
||||
微信官方,是不允许个人客户端,使用外挂等其他手段,进行api形式的调用
|
||||
|
||||
否则,就容易引起风控识别,`导致封号,无法解禁`
|
||||
|
||||
如果要尝试,建议使用小号
|
||||
|
||||
另外,任何不开源的产品/代码,都是黑盒子,如果开发者加了料,有`信息泄漏``的风险
|
||||
|
||||
---
|
||||
|
||||
## 对话模式
|
||||
|
||||
> 基本的一问一答
|
||||
|
||||
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202304021425298.png" title="" alt="" width="183">
|
||||
|
||||
提问的关键词是固定的,而回答的`文本`也是固定
|
||||
|
||||
当然,除了文字答复,还可以是:
|
||||
|
||||
- 自动微信群邀请
|
||||
|
||||
- 订阅号文章
|
||||
|
||||
- 公众号名片 / 个人名片
|
||||
|
||||
- 微信小程序
|
||||
|
||||
自动接受好友请求,并根据关键词`加群`自动邀请,就避免了人工繁琐
|
||||
|
||||
> 语义化模型
|
||||
|
||||
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202304021426201.png" title="" alt="" width="470">
|
||||
|
||||
官方文档[^1]:调用 API 输入 “今天我身体不舒服,所以我”,模型大概率会返回“请假在家休息”。当然,您可以参照参数文档修改参数
|
||||
|
||||
> api接口调用
|
||||
|
||||
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202304021426928.png" title="" alt="" width="518">
|
||||
|
||||
API比起固定的文本,就更加强大灵活
|
||||
|
||||
可以识别用户发送的文字/链接,经过`服务器的程序处理`后返回需要的内容
|
||||
|
||||
比如
|
||||
|
||||
- 文本翻译
|
||||
|
||||
- 查询天气/快递
|
||||
|
||||
- 识别淘宝商品的链接,自动返回优惠券
|
||||
|
||||
- 识别小红书/抖音等媒体链接,自动下载无水印视频
|
||||
|
||||
---
|
||||
|
||||
## 体验机器人
|
||||
|
||||
> 长按识别二维码
|
||||
|
||||
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202304021427555.png" title="" alt="" width="219">
|
||||
|
||||
---
|
||||
|
||||
[^1]: welm:[功能介绍 - WeLM](https://welm.weixin.qq.com/docs/introduction/)
|
||||
|
||||
[^2]: itchat: https://github.com/littlecodersh/ItChat
|
||||
50
草稿/微信#协议.md
Normal file
50
草稿/微信#协议.md
Normal file
@@ -0,0 +1,50 @@
|
||||
通过文本 对话机器人
|
||||
可以获取对方的openid
|
||||
|
||||
返回#sceme协议文本 [微信对话平台].直接调器原生功能
|
||||
|
||||
研究 聊天机器人=> 开放平台=> 后端fastapi的过程 [抓包分析]
|
||||
|
||||
- 请求头/返回头
|
||||
|
||||
- 如何主动给用户发送微信消息 (clone [get]请求,重复触发一次)
|
||||
|
||||
把加密后的type存到数据库, 与用户昵称 对应起来
|
||||
|
||||
能解密openid最好,小程序无缝衔接
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
> 微信群
|
||||
|
||||
#chatroom 20876151169@chatroom
|
||||
|
||||
> 个人名片 [分享必须是好友关系]
|
||||
|
||||
#fc wxid_w2imh7ki5s4q12
|
||||
|
||||
> 昵称/备注
|
||||
|
||||
#N# 昵称
|
||||
|
||||
#N2# 备注
|
||||
|
||||
> 收藏,都是 hash+收藏编号
|
||||
|
||||
收藏-图片/语音/视频
|
||||
|
||||
`收藏-`文章链接
|
||||
|
||||
#fav 1675780537729
|
||||
|
||||
收藏-小程序
|
||||
|
||||
> 安卓手机内置存储
|
||||
|
||||
图片/视频/文件
|
||||
|
||||
网络 文本/图片/视频/文件
|
||||
25
草稿/微信外挂.md
Normal file
25
草稿/微信外挂.md
Normal file
@@ -0,0 +1,25 @@
|
||||
自动接受好友,并 自动回复
|
||||
|
||||
- 关键词提示 [目录]---#文字/图片/视频/文件 | 个人名片/公众号 | 群聊邀请 微信收藏[文章]
|
||||
|
||||
- 集成[聊天机器人] ChatGPT
|
||||
|
||||
- 微信 草稿 [永久链接]
|
||||
|
||||
|
||||
|
||||
自动刷新朋友圈,并自动点赞
|
||||
|
||||
- 特定好友通知
|
||||
|
||||
|
||||
|
||||
群聊管理,自动欢迎,自动踢人
|
||||
|
||||
- 使用群管理模板
|
||||
|
||||
- 设置副管理
|
||||
|
||||
- 公众号,赞赏后,回复群二维码
|
||||
|
||||
|
||||
46
草稿/微信机器人配置.md
Normal file
46
草稿/微信机器人配置.md
Normal file
@@ -0,0 +1,46 @@
|
||||
文档地址
|
||||
|
||||
[平台简介 | 微信开放文档](https://developers.weixin.qq.com/doc/aispeech/platform/INTRODUCTION.html)
|
||||
|
||||
|
||||
|
||||
第三方服务调用
|
||||
|
||||
[第三方服务接口调用 | 微信开放文档](https://developers.weixin.qq.com/doc/aispeech/platform/3rdparty_api.html)
|
||||
|
||||
|
||||
|
||||
指定的 URL 发起带有配置的参数的 GET 请求
|
||||
|
||||
返回格式
|
||||
|
||||
```
|
||||
{
|
||||
"err_code": 0, // 状态码,可在获得响应后区分下一步操作
|
||||
"data_list": [
|
||||
{ // 目前返回信息需要包裹在 `data_list` 中唯一对象内
|
||||
"param_a": "content_a", // 参数,可在获得响应后填充进对应语义槽
|
||||
"param_b": "content_b"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
注意:需要在接口返回的 reponse-header中 ,添加 `Content-Type: application/json` 响应信息,否则在对话过程中, 机器人将不能正确接受接口返回值
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
请求的header字段
|
||||
|
||||
| header字段 | 描述 |
|
||||
| --------- | ------------------------------------- |
|
||||
| appid | 应用ID(string) |
|
||||
| bid | 机器人唯一ID (int) |
|
||||
| requestid | 请求唯一标识 |
|
||||
| uid | 用户唯一标识,微信情景下,比如公众号、小程序则为对应应用的用户openid |
|
||||
|
||||
消息解密
|
||||
|
||||
[概述 | 微信开放文档](https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/Before_Develop/Message_encryption_and_decryption.html)
|
||||
Reference in New Issue
Block a user