Commit Graph

279 Commits (master)

Author SHA1 Message Date
lanvent 8205d2552c fix(Dockerfile): add extra-index-url to pip install command 2023-04-23 15:01:10 +08:00
lanvent a52f54d988 docs(wechatmp): Update README.md 2023-04-22 12:15:56 +08:00
lanvent 618c94edb8 formatting: run precommit on all files 2023-04-22 12:01:29 +08:00
lanvent 4af2c7f3d7 fix: escape regex pattern 2023-04-22 11:39:59 +08:00
lanvent 361f599df0 fix: escape regex patterns when matching name 2023-04-22 11:29:41 +08:00
lanvent 7c85c6f742 feat(wechatmp): add support for message encryption
- Add support for message encryption in WeChat MP channel.
- Add `wechatmp_aes_key` configuration item to `config.json`.
2023-04-22 02:33:51 +08:00
lanvent b5df6faadf feat: verify server when receive message in wechatmp 2023-04-22 01:30:21 +08:00
lanvent 7cefe2d825 fix: split long text messages into multiple parts in wechatmp_service 2023-04-21 21:03:38 +08:00
lanvent 350633b69b Merge Purll Request #920 into wechatmp 2023-04-21 20:46:16 +08:00
JS00000 3a08b002a0 Merge remote-tracking branch 'origin/wechatmp' into wechatmp 2023-04-21 16:20:57 +08:00
lanvent 665001732b feat: add image compression
Add image compression feature to WechatComAppChannel to compress images larger than 10MB before uploading to WeChat server. The compression is done using the `compress_imgfile` function in `utils.py`. The `fsize` function is also added to `utils.py` to calculate the size of a file or buffer.
2023-04-21 15:29:59 +08:00
lanvent cca49da730 fix: fix subscribe_msg 2023-04-21 13:49:51 +08:00
lanvent f6d370ad29 fix: check if event is subscribe 2023-04-21 13:43:01 +08:00
lanvent c9131b333b feat: add clear_quota_v2 method to clear API quota when it's used up 2023-04-21 13:41:21 +08:00
lanvent e44161bf42 fix: voice_reply_voice not work 2023-04-21 03:28:31 +08:00
lanvent a26189fb25 chore: remove passive_reply_message.py 2023-04-21 03:04:50 +08:00
lanvent 89dd8a1db6 refactor(wechatmp): use wechatpy to handle wechatmp messages
feat(wechatmp): add support for image and voice replies
2023-04-21 02:47:33 +08:00
JS00000 650e0b4ad4 wechatmp: adjust log 2023-04-21 02:16:13 +08:00
lanvent b58feb5d8e Merge Pull Request #904 into master 2023-04-20 23:06:17 +08:00
JS00000 71c8043699 update README 2023-04-20 12:35:54 +08:00
JS00000 40264bc9cb fix: delete permanent media 2023-04-20 12:03:48 +08:00
JS00000 a7772316f9 feat: wechatmp channel support voice/image reply 2023-04-20 10:26:58 +08:00
lanvent 3e9e8d442a docs: add README.md for wechatcomapp channel 2023-04-20 08:43:17 +08:00
lanvent d2bf90c6c7 refactor: rename WechatComChannel to WechatComAppChannel 2023-04-20 08:31:42 +08:00
JS00000 1e58c1ad2b fix: wechatmp channel now do not need client 2023-04-20 04:35:06 +08:00
JS00000 8cea022ec5 Merge branch 'master' into wechatmp 2023-04-20 03:41:37 +08:00
JS00000 f32f8aa08e Update readme, and make the structure more clear 2023-04-20 03:18:21 +08:00
lanvent 3ea8781381 feat(wechatcom): add support for sending image 2023-04-20 02:14:52 +08:00
lanvent ab83dacb76 feat(wechatcom): add support for sending voice messages 2023-04-20 01:46:23 +08:00
lanvent 4cbf46fd4d feat: add support for wechatcom channel 2023-04-20 01:03:04 +08:00
JS00000 df4c1f0401 wechatmp: logic simplification 2023-04-19 01:56:25 +08:00
JS00000 9a86a67984 update readme 2023-04-19 01:54:20 +08:00
lanvent de33911460 feat: add support for PATPAT context 2023-04-18 23:34:08 +08:00
JS00000 68361cddd2 wechatmp_service: image and voice reply supported 2023-04-18 03:08:18 +08:00
lanvent 6404332adc feat: itchat support joingroup message 2023-04-18 02:21:41 +08:00
lanvent 65f20ff2c1 Merge Pull Request #860 into master 2023-04-17 01:24:39 +08:00
lanvent 8f72e8c3e6 formatting code 2023-04-17 01:01:02 +08:00
李超 29fbf69945 feat: Add configuration items to support custom data directories and facilitate the storage of itchat.pkl 2023-04-16 22:31:53 +08:00
lanvent 720de9d73f chore: strip content 2023-04-16 00:47:32 +08:00
lanvent 9cef559a05 feat: support receive_message event 2023-04-13 10:50:18 +08:00
JS00000 88f4a45cae
微信公众号语音输入支持 (#808) 2023-04-12 15:10:51 +08:00
lanvent fcfafb05f1 fix: wechatmp's deadloop when reply is None from @JS00000 #789 2023-04-09 20:01:03 +08:00
lanvent 6bd1242d43 chore: update requirements and config-template 2023-04-09 16:16:54 +08:00
lanvent 8779eab36b feat: itchat support picture msg 2023-04-09 00:45:42 +08:00
lanvent 3174b1158c chore: merge itchat msg 2023-04-08 23:32:37 +08:00
lanvent 8c7d1d4010 Merge Pull Request #774 into master 2023-04-08 01:23:54 +08:00
lanvent 3a3affd3ec fix: wechatmp event and query timeout 2023-04-07 20:53:21 +08:00
JS00000 45d72b8b9b Update README 2023-04-07 20:46:00 +08:00
JS00000 03b908c079 Merge branch 'master' into wechatmp 2023-04-07 20:28:08 +08:00
JS00000 d35d01f980 Add wechatmp_service channel 2023-04-07 19:47:50 +08:00
lanvent bea4416f12 fix: wechatmp subscribe event 2023-04-07 18:23:52 +08:00
lanvent 2ea8b4ef73 fix: chat when single_chat_prefix is None 2023-04-07 16:30:38 +08:00
lanvent e6946ef989 modify default value of concurrency_in_session 2023-04-07 16:03:59 +08:00
lanvent d687f9329e fix: add maxsplit=1 in wechatmp 2023-04-07 12:28:01 +08:00
lanvent 3207258fd9 fix: check duplicate in wechatmp 2023-04-07 12:22:24 +08:00
lanvent d8b75206fe feat: maxmize message length 2023-04-07 12:15:29 +08:00
lanvent 88e8dd5162 chroe: specify necessary property in chatmessage 2023-04-07 01:22:30 +08:00
lanvent 484de6237b feat: terminal support plugins 2023-04-06 23:55:25 +08:00
lanvent 8b73a74609 fix: bug when reinstall plugin 2023-04-06 21:54:38 +08:00
lanvent 938e3b5cf2 role: add tags for role 2023-04-06 14:02:41 +08:00
lanvent 1dff630257 fix: avoid channel to generate not support reply 2023-04-06 02:05:36 +08:00
lanvent 9d8ae80548 feat: support set wechatmp_port 2023-04-06 00:48:49 +08:00
lanvent 7e7484a27d Merge Pull Ruquest #757 into master 2023-04-05 23:37:02 +08:00
JS00000 0adf8d6e5d Merge branch 'master' into wechatmp 2023-04-05 20:55:56 +08:00
JS00000 1a981ea970 Refactor: inherit ChatChannel 2023-04-05 20:55:24 +08:00
lanvent 5bd9f50818 feat: disable plugin when init failed 2023-04-05 18:05:28 +08:00
JS00000 fdf6b0dc6b fix: web server port 2023-04-05 14:29:18 +08:00
lanvent cc881adda6 Merge Pull Request #686 into master 2023-04-05 04:18:06 +08:00
lanvent 28eb67bc24 feat: reset will cancel unprocessed messages 2023-04-04 14:57:38 +08:00
lanvent 6c7e4aaf37 feat: prioritize handling commands 2023-04-04 14:29:03 +08:00
lanvent 371e38cfa6 add concurrency_in_session,request_timeout options 2023-04-04 13:33:01 +08:00
lanvent 5a221848e9 feat: avoid disorder by producer-consumer model 2023-04-04 05:18:09 +08:00
lanvent 7458a6298f feat: add trigger_by_self option 2023-04-03 23:58:19 +08:00
lanvent b0f54bb8b7 fix: dirty message including at and prefix 2023-04-03 23:53:58 +08:00
lanvent 388058467c fix: delete same file twice 2023-04-02 14:55:45 +08:00
lanvent cf25bd7869 feat: itchat show qrcode using viewer 2023-04-02 14:45:38 +08:00
lanvent 02a95345aa fix: add more qrcode api 2023-04-02 14:13:38 +08:00
lanvent 6076e2ed0a fix: voice longer than 60s cannot be sent 2023-04-02 12:29:10 +08:00
lanvent cec674cb47 update qrcode 2023-04-02 04:44:08 +08:00
lanvent e71c600d10 feat: new itchat qrcode generator 2023-04-02 03:46:09 +08:00
lanvent d7f1f7182c feat: add always_reply_voice option 2023-04-01 22:27:11 +08:00
lanvent dfb2e460b4 fix: voice length bug in wechaty 2023-04-01 21:58:55 +08:00
lanvent 18aa5ce75c fix: get correct audio format in pytts 2023-04-01 20:58:06 +08:00
lanvent cda9d5873d plugins: support wechaty channel 2023-04-01 04:26:34 +08:00
lanvent 02cd553990 refactor: using one processing logic in chat channel 2023-04-01 04:24:00 +08:00
lanvent 87df588c80 refactor: stripp processing unrelated to channel 2023-03-31 22:31:10 +08:00
lanvent 50a03e7c15 refactor: wrap wechaty message 2023-03-31 05:36:53 +08:00
lanvent 4f3d12129c refactor: wrap wechat msg to make logic general 2023-03-31 05:36:52 +08:00
lanvent 37a95980d4 feat: support at everywhere 2023-03-31 05:27:19 +08:00
lanvent d9ef5a6612 fix: 无前缀触发bug 2023-03-30 18:26:44 +08:00
lanvent 66a81cd47c fix: 修复群语音触发bug 2023-03-30 16:26:01 +08:00
lanvent 7a94745b8a fix: group chat bug 2023-03-30 16:06:57 +08:00
lanvent 83136e3142 feat: refactor handle function 2023-03-30 14:44:45 +08:00
lanvent 62df27eaa1 fix: retry when send failed 2023-03-30 00:23:57 +08:00
lanvent 349115b948 fix: use mp3 file when mp3_to_wav failed 2023-03-29 17:05:32 +08:00
lanvent 4fd7e4be67 fix: ignore remove file failed 2023-03-29 16:46:55 +08:00
lanvent 432b39a9c4 fix: single voice to text bug 2023-03-29 11:32:30 +08:00
zhanws 26540bfb63
补充语音单聊前缀判断过滤 (#661) 2023-03-29 01:41:36 +08:00
lanvent 72994bc9ef fix: voice to text bug 2023-03-28 18:56:36 +08:00
zhayujie f644682be7 fix: add voice dependency compatibility #641 2023-03-28 10:15:21 +08:00
lanvent e78886fb35 feat: new voice class pytts 2023-03-28 03:14:26 +08:00
lanvent 80bf6a0c7a Merge branch 'master' of github.com:zwssunny/chatgpt-on-wechat into zwssunny-master 2023-03-28 01:29:21 +08:00
lanvent dcb9d7fc2a fix: empty content issue 2023-03-28 01:16:29 +08:00
zwssunny b3c8a7d8de check_prefix函数跑到外面了 2023-03-27 19:58:29 +08:00
zwssunny 1baf1a79e5 合并冲突 2023-03-27 19:38:19 +08:00
zhanws a12f2d8fbd
Merge branch 'master' into master 2023-03-27 19:27:46 +08:00
lanvent 74f383a7d4 Merge pull request #629 from Chiaki-Chan/master
ItChat-uos方案下添加对群组语音消息的响应
2023-03-27 18:56:40 +08:00
zhanws 820fbeed18
Merge branch 'zhayujie:master' into master 2023-03-27 18:29:05 +08:00
zwssunny f76e8d9a77 根据参数创建频道 2023-03-27 18:25:54 +08:00
zwssunny 24de670c2c 解决语音的识别和转换兼容性 2023-03-27 16:53:59 +08:00
Chiaki 9b4ef85174 Merge branch 'master' of github.com:Chiaki-Chan/chatgpt-on-wechat 2023-03-27 16:47:00 +08:00
Chiaki 9b389ffc33 1.itchat添加群组语音回复文本功能;2.itchat添加群组语音回复语音功能;3.更新redeme 2023-03-27 16:46:53 +08:00
zwssunny b3cb81aa52 wx频道增加群语音聊天功能 2023-03-27 16:13:58 +08:00
lanvent b50ebc05a0 fix: username not in itchat msg 2023-03-27 13:46:48 +08:00
Chiaki 7c4037147c 1.wechaty添加群组语音回复文本功能;2.wechaty添加群组语音回复语音功能;3.更新config.py和readme; 2023-03-27 01:34:41 +08:00
Chiaki 6701d8c5e6 1.wechaty添加群组语音回复文本功能;2.wechaty添加群组语音回复语音功能;3.更新config.py和readme; 2023-03-27 01:25:54 +08:00
lanvent 709468d281 fix: wechaty voice_to_text 2023-03-26 14:58:20 +08:00
lanvent 92caeed7ab feat: intergrate itchat to lib 2023-03-26 13:35:46 +08:00
zhayujie f805b29a8c
Merge pull request #587 from lanvent/dev2
fix: request qrscan when hotreload failed
2023-03-25 14:10:21 +08:00
lanvent 3f78e43bbf fix: increase timeout for itchat 2023-03-25 13:29:09 +08:00
lanvent ab6670b3af fix: request qrscan when hotreload failed 2023-03-25 13:10:51 +08:00
zhayujie 797a160856
Merge pull request #583 from lanvent/dev2
enhance: improve writing for README
2023-03-25 12:23:09 +08:00
lanvent 63701c182a enhance: improve writing for README 2023-03-25 03:06:35 +08:00
zhayujie efd12dac35 fix: single reply in no prefix 2023-03-25 02:54:46 +08:00
zhayujie 3f0b80d48e
Merge branch 'master' into master 2023-03-24 23:00:44 +08:00
lanvent 2f78c072d7 fix: merge plugins to dev 2023-03-24 12:17:23 +08:00
lanvent 52abe0893a fix: merge plugins to dev 2023-03-24 11:40:45 +08:00
zhayujie 42f3f4403c Merge branch 'plugins' into dev 2023-03-24 01:40:13 +08:00
zhayujie c1d1e923cd feat: add plugins config 2023-03-24 00:22:09 +08:00
a5225662 9fe59f2949 加入时间管理模块,使用md5验证实现热加载config.json变化 2023-03-23 22:47:26 +08:00
zhayujie 475d2f7911
Merge pull request #520 from B1gM8c/master
支持Wechaty的自定义前缀+关键词生成AI图片的功能
2023-03-21 22:52:39 +08:00
lichengzhe 3d264207a8 如启用hot_reload,不处理1分钟前的历史消息避免重复提交 2023-03-21 22:12:06 +08:00
B1gM8c 852adb72a2 支持Wechaty的自定义前缀+关键词生成AI图片的功能
Wechaty判断is_at为True,返回的内容是过滤掉@之后的内容;而is_at为False,则会返回完整的内容

故判断如果匹配到自定义前缀,则返回过滤掉前缀+空格后的内容,用于实现类似自定义+前缀触发生成AI图片的功能
2023-03-20 01:17:29 +08:00
lichengzhe 3ef7855384 itchat增加hot_reload特性开关,默认关闭。配置文档增加可选参数说明。 2023-03-19 08:29:25 +08:00
zhayujie 3c04325aae feat: add config for model selection #471 2023-03-15 23:27:51 +08:00
Chiaki f9b0ad7697 1.新增wechaty方案的语音识别、语音回复功能;2.更新README; 2023-03-15 13:56:23 +08:00
lanvent ad6ae0b32a refactor: use enum to specify type 2023-03-13 19:44:24 +08:00
lanvent 8d2e81815c compatible for voice 2023-03-13 00:12:34 +08:00
lanvent 475ada22e7 catch thread exception 2023-03-12 22:49:07 +08:00
lanvent 0fcf0824dc feat: support plugins 2023-03-12 11:53:06 +08:00
lanvent 9e07703eb1 formatting code 2023-03-12 01:25:28 +08:00
lanvent 9ae7b7773e simple compatibility for wechaty 2023-03-12 01:10:18 +08:00
lanvent d6037422ac decouple message processing process 2023-03-12 00:58:49 +08:00
zhayujie e014b0406c
Merge pull request #382 from Bachery/master
support group chat in one seesion
2023-03-09 00:41:02 +08:00
ubuntu 48e258dd67 fix: remove prefix match in voice msg 2023-03-09 00:31:36 +08:00
Bachery 574f05cc6f
Merge branch 'zhayujie:master' into master 2023-03-08 17:28:27 +01:00
Bachery c2e4d88842 fix compatibility 2023-03-08 17:27:32 +01:00
Bachery 32cff41df5 add option: group_chat_in_one_session 2023-03-08 13:11:37 +01:00
wanggang 3db452ef71 [voice] using baidu service to gen reply voice 2023-03-08 15:22:46 +08:00
wanggang d7a8854fa1 [voice] add support for whisper-1 model 2023-03-08 11:32:27 +08:00