Commit Graph

520 Commits (9066abd09a4d638bbc4a64c7f83eaa426571297e)

Author SHA1 Message Date
HYY 2d59114ce1 feat: 客户端在线统计 2025-03-14 18:08:57 +08:00
Bakadax aee5fa7603
Update message.py 2025-03-14 17:58:14 +08:00
Oct_Autumn 5078245f1d
Merge branch 'main-fix' into main-fix-poke 2025-03-14 17:54:47 +08:00
SengokuCola 08499f747d
Merge pull request #383 from SengokuCola/refactor
Refactor
2025-03-14 17:49:27 +08:00
meng_xi_pan a3927507dc 关系系统大致完善 2025-03-14 17:47:33 +08:00
UnCLAS-Prommer e00b3ae09c 优雅的新logger! 2025-03-14 17:25:59 +08:00
MuWinds 339cbe3f8f Fix:当bot要处理一个空格消息,获取embedding向量会发生报错 2025-03-14 17:25:44 +08:00
meng_xi_pan 414340588d 迁移2 2025-03-14 16:47:31 +08:00
meng_xi_pan 6a5316bcf8 关系计算函数迁移 2025-03-14 16:38:52 +08:00
tcmofashi b4fa12f3a1 fix: 更正了部分新增的messageCQ的初始化 2025-03-14 15:56:03 +08:00
tcmofashi f2b8ec4b13 fix: 找回embedding 2025-03-14 15:52:19 +08:00
tcmofashi 374b64165f Merge remote-tracking branch 'upstream/main-fix' into main-fix 2025-03-14 15:41:25 +08:00
tcmofashi d3fe02e467 fix: 增大了默认的maxtoken防止溢出,messagecq改异步get_image防止阻塞 2025-03-14 15:38:33 +08:00
Oct-autumn 5be793a054
refactor: 重构“戳一戳”与需要考虑回复的消息的处理逻辑
- 将handle_message函数中的消息实例处理部分提取出来,形成message_process函数(提高代码复用率)
  - 将“戳一戳”的通知处理为一条通用消息实例,交由message_process函数处理
  - 同时,由于使用了通用消息实例,“戳一戳”的处理逻辑将与其他消息处理统一经过群组权限鉴别
2025-03-14 15:32:10 +08:00
SengokuCola c23f60f518
Merge pull request #376 from SengokuCola/refactor
Refactor
2025-03-14 15:06:30 +08:00
tcmofashi e2c5d42634 add self 2025-03-14 14:17:09 +08:00
tcmofashi 3e05f03ddf fix: fix reply 2025-03-14 14:05:28 +08:00
Oct-autumn 33df5981b4
fix: 构建记忆时重复读取同一段消息,导致token消耗暴增 2025-03-14 13:37:23 +08:00
春河晴 e17f3276a4
fix: 修复utils_model.py潜在问题
- 将重复的模型列表提取为类变量
- 修复流式处理中变量未初始化的错误
- 改进错误响应处理的安全性
- 修复类型标注
- 优化重复的条件判断
- 将_init_database改为静态方法

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-14 14:28:56 +09:00
春河晴 be7997e1b7
refactor: 改进错误处理和代码格式化
- 增强API错误响应解析,添加详细错误日志
- 优化HTTP客户端响应错误处理逻辑
- 规范代码格式,调整函数参数和字典格式

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-14 14:08:09 +09:00
HYY e58f9c646c
feat:尝试增加不回答已撤回消息的功能,并每小时删除一次存留超过1小时的撤回消息
feat:尝试增加不回答已撤回消息的功能,并每小时删除一次存留超过1小时的撤回消息
2025-03-14 09:34:22 +08:00
晴猫 2fbfbc4486 fix; 修复解析日程文本时未处理匹配结果的错误 2025-03-14 10:17:41 +09:00
晴猫 e060e66788 fix; 防止解析日程时遇到多余的内容影响解析(比如markdown代码块标记) 2025-03-14 10:09:53 +09:00
SengokuCola c2b31b4f1c
Merge pull request #356 from SaigyoujiYusora/debug-fix-log
fix: 优化发送错误时图片大喷射
2025-03-14 08:35:12 +08:00
tcmofashi de94c754f5
Merge pull request #340 from RBAmeto/patch-1
修复回复消息没有正常发送的问题
2025-03-14 01:53:29 +08:00
RBAmeto 93fb541601
set_reply bug 2025-03-14 01:31:22 +08:00
HYY1116 06724a3816 完成 2025-03-14 00:58:59 +08:00
HYY1116 bc13d6b2c9 fix:多写了一个self 2025-03-14 00:55:35 +08:00
HYY1116 8d823b5930 fix: 使能够正常删除超过一小时的撤回消息,单独创建定时任务 2025-03-14 00:51:45 +08:00
HYY1116 54e82d1e3c feat: 撤回的消息不再进行回复 2025-03-14 00:44:10 +08:00
KawaiiYusora 50ce8cf521
fix: 优化发送错误时图片大喷射 2025-03-14 00:09:07 +08:00
HYY1116 13c3b07085 修改几处错误 2025-03-13 21:13:13 +08:00
HYY1116 41b6cdba86 feat:尝试增加不回答已撤回消息的功能(但似乎目前不起作用) 2025-03-13 20:44:32 +08:00
HYY1116 75f9498843 Merge branch 'debug' of https://github.com/HYY1116/MaiMBot into debug 2025-03-13 20:43:06 +08:00
HYY1116 4489952777 fix&feat:修复回应所有戳一戳的问题;尝试增加不回答已撤回消息的功能(但似乎目前不起作用) 2025-03-13 20:33:39 +08:00
ChangingSelf 5a2d133fe5 Merge branch 'debug' of github.com:ChangingSelf/MaiMBot into debug 2025-03-13 20:00:05 +08:00
ChangingSelf a718598fb6 读取戳一戳的自定义文案,并解除bot被戳时误以为用户是拿刀戳自己的误会 2025-03-13 19:58:56 +08:00
SengokuCola 31b29cb3dd Merge branch 'debug' of https://github.com/SengokuCola/MaiMBot into debug 2025-03-13 19:22:20 +08:00
SengokuCola 0b8124d883 尝试建立新的日志系统
1
2025-03-13 19:22:17 +08:00
RBAmeto fb3f27d022
fix 2025-03-13 19:03:22 +08:00
RBAmeto 99d3e06af8
修复回复消息没有正常发送的问题
set_reply不存在返回值,导致回复消息发送为空
单独set_reply后发送msg本体即可
2025-03-13 18:58:12 +08:00
ChangingSelf 831ed2b263 Merge remote-tracking branch 'upstream/debug' into debug 2025-03-13 18:55:42 +08:00
UnCLAS-Prommer a7284cfa8b Fix Minor bug 2025-03-13 16:02:38 +08:00
UnCLAS-Prommer 2b55d6d28e Merge branch 'debug' of https://github.com/UnCLAS-Prommer/MaiMBot into debug 2025-03-13 16:01:16 +08:00
UnCLAS-Prommer 024bd1e649 自动日程生成 2025-03-13 15:51:39 +08:00
晴猫 8a992addeb
Merge pull request #274 from Pocketfans/willing_cycles
让回复意愿更加拟人,增加高低回复意愿周期,且增加了一个简单的追问回复功能
2025-03-13 16:02:11 +09:00
tcmofashi fc98d23fb5
Merge pull request #324 from tcmofashi/debug
fix: 修复图像重复hash问题
2025-03-13 14:54:37 +08:00
tcmofashi c6738cd5b8 fix: 撤销at all的修复 2025-03-13 14:48:35 +08:00
Klu5ure 0266f3c568
Merge branch 'SengokuCola:debug' into debug 2025-03-13 14:07:42 +08:00
Klu5ure 3e6290ad8c 使用os.path.join代替硬编码路径分隔符 2025-03-13 13:48:41 +08:00
ChangingSelf 056d1537cb 修复回复非自己的戳一戳,以及识别拍一拍等文案 2025-03-13 13:10:35 +08:00
SengokuCola 4baa95a125
Merge pull request #321 from HYY1116/debug
fix:修复无法接收At全体消息问题
2025-03-13 13:07:12 +08:00
tcmofashi 9ede0d1c1e Merge remote-tracking branch 'upstream/debug' into debug 2025-03-13 12:57:20 +08:00
tcmofashi 2e562b0971 fix: 修复相同图片不同类型的重复hash问题,修复@全体 2025-03-13 12:56:53 +08:00
HYY 48b1953e7e fix:修复无法接收At全体消息问题 2025-03-13 12:00:34 +08:00
MuWinds 554380415b Fix:推理gui报ImportError 2025-03-13 10:55:44 +08:00
Cindy-Master f1e38e8b13 fix: ban_user_id在回复的情况下可能被绕过 2025-03-13 09:32:33 +08:00
ChangingSelf 4782e1a1bd Merge branch 'debug' of github.com:ChangingSelf/MaiMBot into debug 2025-03-13 06:44:05 +08:00
AL76 11e8b2fa5f chore: ruff的修改 2025-03-13 03:18:49 +08:00
AL76 91fceb0d85 Merge remote-tracking branch 'origin/debug' into chore/nonebot-log-addtion 2025-03-13 02:54:57 +08:00
AL76 fe7ef7d731 chore: 用户体验优化(报错信息&log)+ ruff的修改 2025-03-13 02:51:53 +08:00
ChangingSelf 29f0afecfa Merge branch 'debug' of github.com:ChangingSelf/MaiMBot into debug 2025-03-13 01:40:29 +08:00
ChangingSelf 4ffffb3b60 close SengokuCola/MaiMBot#246 添加戳一戳回应功能 2025-03-13 01:38:53 +08:00
tcmofashi 2d7da8cd70 fix: 修复表情包重复保存 2025-03-13 00:46:50 +08:00
Pliosauroidea d6860bbc1d Merge remote-tracking branch 'upstream/debug' into debug 2025-03-12 23:26:52 +08:00
Pliosauroidea eafc3dea71 修正了message变动导致的私聊error 2025-03-12 23:16:29 +08:00
HYY e56796be81
Merge branch 'debug' into debug 2025-03-12 23:11:48 +08:00
HYY 24a3cf3b66 fix:修复了一个hash unset可能导致异常的点 2025-03-12 23:09:53 +08:00
KawaiiYusora acb59e5d8d
fix: 修复缺失hash字段的记录 抛出File not found 2025-03-12 23:07:28 +08:00
HYY 62810c7bc7 chore:logger替换print 2025-03-12 22:01:35 +08:00
HYY 8ee53fb312 fix:修复一处小bug,并且把print改为logger,减少review血压 2025-03-12 22:01:05 +08:00
tcmofashi 3b1fc70e26 fix: 路径完整性检查 2025-03-12 21:51:16 +08:00
tcmofashi 8b3011e15c Merge remote-tracking branch 'upstream/debug' into debug 2025-03-12 21:47:53 +08:00
晴猫 ce12ba655d typo 2025-03-12 22:39:18 +09:00
tcmofashi 588aecd0f3 fix: 为没有hash的表情包添加hash,修复set reply 2025-03-12 21:30:38 +08:00
晴猫 8be087dcad 重构数据库访问,替换为统一的数据库实例引用 2025-03-12 22:27:59 +09:00
晴猫 49082267bb 重构数据库模块实现延迟初始化
- 使用Global Object Pattern设计模式
- 实现数据库连接的延迟初始化
- 添加类型注解支持IDE类型推导
- 确保环境变量在bot.py加载后再连接数据库

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-12 22:27:05 +09:00
tcmofashi 3857642203 Merge remote-tracking branch 'upstream/debug' into debug 2025-03-12 20:26:06 +08:00
Pocketfans e50c73932b 降低之前回复的速度 2025-03-12 18:27:04 +08:00
Pocketfans 144475d2f4 让回复意愿更加拟人,增加高低回复意愿周期,且增加了一个简单的追问回复功能 2025-03-12 17:57:50 +08:00
UnCLAS-Prommer ae0481ff29
Merge pull request #267 from UnCLAS-Prommer/debug
修正bot.py line 138 变量名错误问题
2025-03-12 17:26:02 +08:00
SengokuCola 38e38cf4a9 Revert "尝试减少不同群内的同义词混淆 以及允许用户设置指定群组记忆私有"
This reverts commit 50c468e519.
2025-03-12 17:25:23 +08:00
UnCLAS-Prommer 6c5f56b23d 修正我修typo产生的typo 2025-03-12 17:18:39 +08:00
tcmofashi 5e60975b2b Merge remote-tracking branch 'upstream/debug' into debug 2025-03-12 17:14:49 +08:00
UnCLAS-Prommer 76574bf06b
Merge branch 'SengokuCola:debug' into debug 2025-03-12 17:14:13 +08:00
UnCLAS-Prommer 72754a0f2f No More Typo Please 2025-03-12 17:13:37 +08:00
HYY d4ed38368b
Merge pull request #251 from HYY1116/debug
fix: 尝试修复所有图片都被保存为jpg的问题,并以正确的格式请求识图api
2025-03-12 17:05:43 +08:00
Cindy-Master 50c468e519 尝试减少不同群内的同义词混淆 以及允许用户设置指定群组记忆私有
用户设置指定群组记忆私有会导致记忆的语料严重减少  未设置群组记忆私有的记忆会开放对于所有群聊
因此要不就修改其他记忆配置  增强学习/记忆能力  或者增加单一群组的信息流数量  或者增加公开记忆的信息流数量

记忆检索时会按以下优先级返回记忆:
当前群组的记忆(如果群聊属于某个群组)
当前群聊的记忆(如果不属于任何群组)
公共记忆(无群组/群聊标识的记忆)
其他非私有群组的记忆
5. 跨群记忆连接
同一群组内的主题使用较强连接(相似度×10)
跨群组的相似主题使用较弱连接(相似度×5)
相同群组/群聊的相似主题会获得20%的相似度加成
2025-03-12 16:56:12 +08:00
tcmofashi 567a7a86fc Merge remote-tracking branch 'upstream/debug' into debug 2025-03-12 16:55:37 +08:00
SengokuCola 23c9211d93 Update utils_image.py 2025-03-12 15:45:24 +08:00
SengokuCola 3a61450642 修复了数据库无法读取记忆和知识的问题,以及图片保存问题 2025-03-12 15:32:25 +08:00
HYY 94c63e456b
Merge branch 'SengokuCola:debug' into debug 2025-03-12 11:40:54 +08:00
HYY 26ed7f54d3 遵循s指导 2025-03-12 10:59:34 +08:00
HYY 25ecfcecc0 修补 2025-03-12 10:42:48 +08:00
HYY1116 d106260d93 小修补 2025-03-12 09:58:10 +08:00
HYY1116 1840599156 fix: 尝试修复所有图片都被保存为jpg的问题,并以正确的格式请求识图api 2025-03-12 09:53:01 +08:00
Pliosauroidea e9f3ec89d5 给cq_code加个import os 2025-03-12 08:28:00 +08:00
Pliosauroidea 27be42b8f0 修正willing_manager内因为代码合并导致的冗余,去除几个print 2025-03-12 08:25:55 +08:00
tcmofashi fd40c05bf4 Merge remote-tracking branch 'upstream/debug' into debug 2025-03-12 08:25:42 +08:00
Pliosauroidea 0c26d9b412 Merge branch 'debug' of https://github.com/Pliosauroidea/MaiMBot into debug 2025-03-12 08:14:15 +08:00
tcmofashi b934d473ab
Merge pull request #192 from Naptie/contrib
refactor: 截断过长的在日志中展示的消息
2025-03-12 08:01:22 +08:00
Pliosauroidea 126c9af70e 修复火山部分流式输出没有finish_reason导致的报错 2025-03-12 07:58:27 +08:00
Pliosauroidea 90d169f740 将价格print改为对应的logger输出 2025-03-12 07:44:57 +08:00
AL76 732485147c
Merge pull request #237 from Rikki-Zero/debug
refactor: 修复database单例多次初始化的问题,改变instance默认返回实例的类型,缩短db相关函数调用时的object名
2025-03-12 02:48:00 +08:00
SengokuCola 7274573736 记忆和遗忘的可自定义 2025-03-12 01:32:20 +08:00
Naptie 0cc8087918
Merge branch 'debug' of github.com:SengokuCola/MaiMBot into contrib 2025-03-12 01:01:03 +08:00
Rikki 2ae756ee6e
Merge branch 'SengokuCola:debug' into debug 2025-03-12 00:58:29 +08:00
SengokuCola 443878b5c4 修复记忆库冒烟 2025-03-12 00:56:54 +08:00
Rikki bcb3f09c65 Merge remote-tracking branch 'upstream/debug' into debug 2025-03-12 00:54:49 +08:00
Rikki 39018440d7 refactor: 修复database单例多次初始化的问题,改变instance默认返回实例的类型,缩短db相关函数调用时的object名 2025-03-12 00:52:07 +08:00
SengokuCola d524409c18
Merge branch 'debug' into debug 2025-03-12 00:29:59 +08:00
Naptie 98b30e38a1
Merge branch 'debug' of github.com:SengokuCola/MaiMBot into contrib 2025-03-12 00:27:30 +08:00
SengokuCola 40f3055caf
Merge branch 'debug' into main 2025-03-12 00:20:54 +08:00
Naptie 4de04df0b7
Merge branch 'debug' of github.com:SengokuCola/MaiMBot into contrib 2025-03-11 23:50:27 +08:00
SengokuCola ed18f2e96d 新增了知识库一键启动漂亮脚本 2025-03-11 23:46:49 +08:00
Naptie 4f72b22462
Merge branch 'debug' of github.com:SengokuCola/MaiMBot into contrib 2025-03-11 23:45:56 +08:00
UnCLAS-Prommer c681a827f1 修复小名无效问题 2025-03-11 23:21:57 +08:00
Pliosauroidea 390b2d81d7
Merge branch 'SengokuCola:debug' into debug 2025-03-11 23:01:31 +08:00
ChangingSelf 8c346377cb 提高健壮性 2025-03-11 22:58:07 +08:00
Naptie 0a55ccb253
refactor: truncate messages for console logging 2025-03-11 22:57:29 +08:00
Naptie 28fd1c8a8e
refactor(message_sender): log format consistency 2025-03-11 22:53:47 +08:00
Naptie fd19b0d601
feat(utils): truncate_message 2025-03-11 22:51:49 +08:00
ChangingSelf 2688a96986 close SengokuCola/MaiMBot#225 让麦麦可以正确读取分享卡片 2025-03-11 22:47:23 +08:00
Pliosauroidea cd16e68223 修复表情包发送时的缺失参数 2025-03-11 22:47:20 +08:00
Pliosauroidea 3c8c8977e6 屏蔽一个臃肿的debug信息 2025-03-11 22:11:10 +08:00
Pliosauroidea 9d0152a2b2 修复了合并过程中造成的代码重复 2025-03-11 21:41:36 +08:00
Pliosauroidea 956135cad9 添加一些注释 2025-03-11 21:23:07 +08:00
Pliosauroidea a41274156b 将print变为logger.debug 2025-03-11 21:14:32 +08:00
Pliosauroidea 3180426727 修复了没有改掉的typo字段 2025-03-11 21:08:19 +08:00
Pliosauroidea aea3bffd99 添加私聊过滤开关,更新config,增加约束 2025-03-11 20:55:54 +08:00
Pliosauroidea 912432cf49 Merge branch 'debug' of https://github.com/Pliosauroidea/MaiMBot into debug 2025-03-11 20:50:03 +08:00
Ikko Eltociear Ashimine cda6281cc6
chore: update emoji_manager.py
discription -> description
2025-03-11 21:49:18 +09:00
Pliosauroidea baed8560fb 修正了私聊屏蔽词输出 2025-03-11 20:48:11 +08:00
Pliosauroidea 5aeafca756 Merge branch 'debug' of https://github.com/Pliosauroidea/MaiMBot into debug 2025-03-11 20:45:12 +08:00
tcmofashi 6b11b6ef29 fix: 一些from disct 2025-03-11 20:41:03 +08:00
Pliosauroidea 66a0f18e69 修复了私聊时产生reply消息的bug 2025-03-11 20:38:14 +08:00
HYY1116 3bf5cd6131 feat: 新增运行时重载配置文件;新增根据不同环境(dev;prod)显示不同级别的log 2025-03-11 20:11:17 +08:00
Pliosauroidea 33cd83b895 添加私聊功能 2025-03-11 20:01:38 +08:00
tcmofashi b19902919e Merge remote-tracking branch 'upstream/debug' into refractor 2025-03-11 19:51:03 +08:00
tcmofashi aa41f0d1d8 fix: 放反了 2025-03-11 19:47:09 +08:00
tcmofashi bd64e72f55
Merge pull request #213 from Pliosauroidea/debug
bugfix&feat: 添加logger.debug输出开关,调整env文件生成逻辑
2025-03-11 19:45:06 +08:00
tcmofashi 1e6f0062d2
Merge pull request #211 from pineoncellar/debug
fix: 流式输出模式增加结束判断与token用量记录(#199)
2025-03-11 19:43:23 +08:00
tcmofashi 2673d97cd3
Merge pull request #208 from EightOrange/debug
fix: 添加群信息获取的错误处理 (#173)
2025-03-11 19:41:27 +08:00
tcmofashi ef8691cd9e fix: 修改message继承逻辑,修复回复消息无法识别 2025-03-11 19:30:20 +08:00
HYY1116 7d017be9f7 fix:模型降级 2025-03-11 19:23:48 +08:00
八分橘子 e1019ade3c fix: 修复变量拼写错误并优化代码可读性 2025-03-11 18:52:32 +08:00
pine c24bb70291 fix: 流式输出模式增加结束判断与token用量记录 2025-03-11 18:51:28 +08:00
Pliosauroidea 60a93766c7 添加logger的debug输出开关,默认为不开启 2025-03-11 18:42:35 +08:00
八分橘子 bfa9a3c026 fix: 添加群信息获取的错误处理 (#173) 2025-03-11 18:40:03 +08:00
HYY1116 2e3411f103 Merge branch 'debug' of https://github.com/SengokuCola/MaiMBot into debug 2025-03-11 18:21:57 +08:00