Commit Graph

352 Commits (c86614bd2946d38e7c7bd7fc6405dde2edca143c)

Author SHA1 Message Date
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 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 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
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
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 ef8691cd9e fix: 修改message继承逻辑,修复回复消息无法识别 2025-03-11 19:30:20 +08:00
八分橘子 e1019ade3c fix: 修复变量拼写错误并优化代码可读性 2025-03-11 18:52:32 +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
tcmofashi b6edbea96c fix: 图片保存路径不正确 2025-03-11 18:17:29 +08:00
tcmofashi cb79d09ee4 Merge remote-tracking branch 'rikki/tc_merge' into refractor 2025-03-11 17:00:29 +08:00
tcmofashi 01a6fa80ae fix: 删除神秘test 2025-03-11 16:59:19 +08:00
SengokuCola af962c2e84 修复了情绪管理器没有正确导入导致发布出消息
1
2025-03-11 16:50:40 +08:00
tcmofashi 14fbbc593a Merge remote-tracking branch 'upstream/debug' into refractor 2025-03-11 16:45:41 +08:00
tcmofashi 5760412382 fix: 小修 2025-03-11 16:32:35 +08:00
tcmofashi 1c9b0ccbe3 fix: 修复部分cq码解析错误,merge 2025-03-11 16:16:00 +08:00
春河晴 b6867b904d
fix: 统一使用os.getenv获取数据库连接信息,避免从config对象获取不存在的值时出现KeyError 2025-03-11 17:07:37 +09:00
晴猫 3765c79e3a
Merge branch 'debug' into debug 2025-03-11 13:47:43 +09:00
SengokuCola 450f378791
Merge pull request #186 from Naptie/contrib
refactor: 使用 Base64 编码的表情包 CQ 码
2025-03-11 11:47:08 +08:00
SengokuCola e46214bd1c
Merge pull request #176 from BBleae/patch-5
fix: 更新情感判断模型配置(使配置文件里的 llm_emotion_judge 生效)
2025-03-11 11:26:40 +08:00
Naptie 52c93ba080
refactor: use Base64 for emoji CQ codes 2025-03-11 10:16:04 +08:00
Rikki 67f6d7cd42 fix: 保证能运行的小修改 2025-03-11 06:54:04 +08:00
Rikki 0cf4ff0a4d Merge remote-tracking branch 'upstream/debug' into tc_refractor 2025-03-11 06:01:54 +08:00
Rikki c32c4fb1e2 refactor: 修改配置文件的版本号 2025-03-11 05:06:58 +08:00
Rikki a54ca8ce18 Merge remote-tracking branch 'upstream/debug' into feat_regix 2025-03-11 05:05:07 +08:00
tcmofashi 8cbf9bb048 feat: 史上最好的消息流重构和图片管理 2025-03-11 04:42:24 +08:00
晴猫 a63ce969c7
fix: 更新情感判断模型配置(使配置文件里的 llm_emotion_judge 生效) 2025-03-11 02:38:23 +09:00
SengokuCola 7b35ddd07f ruff 哥又有新点子 2025-03-11 01:19:56 +08:00
tcmofashi 7899e67cb2 feat: 重构完成开始测试debug 2025-03-11 01:15:32 +08:00
SengokuCola 354d6d0deb 记忆系统优化
优化了记忆的连接建立
重启了遗忘功能
2025-03-11 01:13:17 +08:00
ChangingSelf 84495f8329 fix 2025-03-11 00:20:55 +08:00
ChangingSelf 204744cd71 修改配置名与修改过滤对象为raw_message 2025-03-11 00:12:19 +08:00
HYY 3750ebd15b
Merge branch 'debug' into debug 2025-03-10 23:11:36 +08:00
ChangingSelf 1b611ecce5 resolve SengokuCola/MaiMBot#167 根据正则表达式过滤消息 2025-03-10 22:52:14 +08:00
tcmofashi 20b8778e2b Merge branch 'refractor' of https://github.com/tcmofashi/MaiMBot into refractor 2025-03-10 21:01:06 +08:00
tcmofashi 6e2ea8261b refractor: 几乎写完了,进入测试阶段 2025-03-10 20:59:41 +08:00
Naptie e68040515a
fix: typo 'discription' 2025-03-10 20:43:17 +08:00
Rikki 0959b89630
Merge branch 'SengokuCola:debug' into debug 2025-03-10 20:16:28 +08:00
春河晴 4baa6c6f0a
feat: 实现MongoDB URI方式连接,并统一数据库连接代码。 2025-03-10 14:48:43 +09:00
AL76 8a32d18460 feat: 优化willing_manager逻辑,增加回复保底概率 2025-03-10 13:09:01 +08:00
AL76 a43f9495ea fix: remove duplicate message(CR comments) 2025-03-10 11:46:59 +08:00
Rikki fddb64151e fix: 修复错误的空值检测逻辑 2025-03-10 04:56:40 +08:00
AL76 2f2be5b3ad
Merge branch 'debug' into fix/20250310-logger-optimize 2025-03-10 02:29:34 +08:00
AL76 052e67b576 refactor: 日志打印优化(终于改完了,爽了 2025-03-10 02:25:03 +08:00
SengokuCola 5c7881133e
Merge pull request #153 from BBleae/patch-3
fix: 更新情感判断模型配置(使配置文件里的 llm_emotion_judge 生效)
2025-03-10 01:43:04 +08:00
SengokuCola a7f9d05c01 修复记忆整理传入格式问题 2025-03-10 01:40:06 +08:00
晴猫 536bb1d923
fix: 更新情感判断模型配置 2025-03-10 02:26:13 +09:00
AL76 8d99592b32 fix: logger初始化顺序 2025-03-10 01:15:31 +08:00
AL76 052802c851 refactor: logger promotion 2025-03-10 00:52:04 +08:00
AL76 5746afaa2a refactor: logger in src\plugins\chat\bot.py 2025-03-10 00:33:13 +08:00
AL76 288dbb68b5 refactor: logger in src\plugins\chat\__init__.py 2025-03-10 00:27:42 +08:00
AL76 ea29c4aa85
Merge branch 'debug' into fix/20250309-logger-optimize 2025-03-09 23:12:00 +08:00
SengokuCola 6a71ea4f2e 修复了记忆时间bug,config添加了记忆屏蔽关键词 2025-03-09 22:45:32 +08:00
AL76 1b5344f32f fix: 优化bot初始化的日志&格式 2025-03-09 22:42:04 +08:00
AL76 41aa974d2e fix: 优化chat/config.py的日志&格式 2025-03-09 22:41:27 +08:00
tcmofashi 5566f178d0 refractor: 几乎写完了,进入测试阶段 2025-03-09 22:12:10 +08:00
AL76 f327f45aa3 fix: 优化src/plugins/chat/__init__.py的import 2025-03-09 20:29:33 +08:00
ChangingSelf 48c899b7bf Merge branch 'debug' of github.com:ChangingSelf/MaiMBot into debug 2025-03-09 11:35:47 +08:00
ChangingSelf 39bb99cef3 将错别字生成提取到配置,一句一个错别字太烦了! 2025-03-09 11:07:20 +08:00
tcmofashi fe3684736a feat: 超大型重构 2025-03-09 11:02:01 +08:00
Rikki 65e519dd5a Merge remote-tracking branch 'upstream/debug' into debug 2025-03-09 05:28:11 +08:00
Rikki 25f705255c fix: 修复兼容性选项和目前第一个版本之间的版本间隙 0.0.0 版,并将所有的直接退出修改为抛出异常 2025-03-09 04:14:16 +08:00
Rikki 2306ebf3f6 feat: 因为判断临界版本范围比较麻烦,增加 notice 字段,删除原本的判断逻辑(存在故障) 2025-03-09 03:15:37 +08:00
Rikki dd09576720 fix: 修复 TypeError: BotConfig.convert_to_specifierset() takes 1 positional argument but 2 were given 2025-03-09 02:58:43 +08:00
Rikki 18f839b7d6 fix: 修复 missing 1 required positional argument: 'INNER_VERSION' 2025-03-09 02:57:14 +08:00
Rikki edc07acd6f feat: 重构配置加载器,增加配置文件版本控制和程序兼容能力 2025-03-09 02:40:39 +08:00
SengokuCola 583c276c91 improve 新款表情包系统 2025-03-09 00:36:58 +08:00
ChangingSelf 909441ea65 提取哈气代码到配置文件中,改为关键词反应规则功能 2025-03-08 22:18:18 +08:00
SengokuCola 7c73e2f319 fix 思考者修复,回复意愿提供自定义
参考新的template文件
2025-03-08 16:46:28 +08:00
SengokuCola 140bc1ab91 ruff说他有好点子 2025-03-08 16:10:55 +08:00
瑾星Mcc 56e9891c4d
Add files via upload 2025-03-08 13:09:35 +08:00
jiajiu123 ebb633770a feat: toml 文件格式出错时提醒用户修改 2025-03-08 04:24:43 +08:00
Rikki c75bce6164 fix: 检查是否 <没有找到> emoji ,修复 0 emoji 时报错问题 2025-03-08 03:48:02 +08:00
SengokuCola e2d8f68066 Merge branch 'debug' of https://github.com/SengokuCola/MaiMBot into debug 2025-03-08 01:02:26 +08:00
SengokuCola f65099e8ee v0.5.11 添加了情绪管理器 2025-03-08 01:02:20 +08:00
Rikki 88093502a9
Merge pull request #85 from sky2002/feature/支持流式传输
支持流式输出
2025-03-08 00:11:20 +08:00
gyc123456-1 1d40ca9059
Merge branch 'debug' into patch-1 2025-03-07 22:39:30 +08:00
gyc123456-1 2ec261c544
表情CQ码映射 2025-03-07 22:26:40 +08:00
gyc123456-1 ceb52621d1
解析face类型CQ码 2025-03-07 22:24:58 +08:00
sky2002 cdb44d70b4 使用generate_response_async 2025-03-07 13:39:14 +00:00
sky2002 232348fe7a 使用generate_response_async 2025-03-07 13:37:44 +00:00
SengokuCola f249f50994 v0.5.10 在根目录生成统计信息 2025-03-07 20:41:12 +08:00
SengokuCola d2f348ae2c Merge branch 'debug' of https://github.com/SengokuCola/MaiMBot into debug 2025-03-07 19:29:17 +08:00
SengokuCola 0e72c7444b 降低了回复表情包的可能
1
2025-03-07 19:22:24 +08:00
tcmofashi a527e5ce76 fix: 修复获取的消息没有time字段 2025-03-07 19:17:11 +08:00
SengokuCola 34907fdbf5 修改了模型命名 2025-03-07 18:41:41 +08:00
SengokuCola 68b696b8aa fix config
12
2025-03-07 18:16:06 +08:00
SengokuCola 4a27446430 修复没移除干净
1
2025-03-07 13:30:50 +08:00
SengokuCola c11dd85790 移除所有雪Nlp 2025-03-07 10:25:58 +08:00
tcmofashi e48d93b7cb feat: 对自己发出的表情包提供描述 2025-03-07 09:24:25 +08:00
tcmofashi 5bf94d34a1 fix: 修改message_sending中cq码被翻译的问题 2025-03-07 08:46:36 +08:00
tcmofashi 9bb9fc1b28 fix: 修复bot消息未调用异步显式初始化导致的空消息bug 2025-03-07 07:03:05 +08:00
tcmofashi bb35faa363 fix: 修复表情查询为空 2025-03-07 04:07:26 +08:00
tcmofashi d0047e82bf fix: 去除emoji_manager中的图片压缩 2025-03-07 04:01:09 +08:00
tcmofashi 0ced4939ec fix: 修改embedding 2025-03-07 03:40:14 +08:00
tcmofashi a3b8a545af fix: 紧急为check功能加入开关 2025-03-07 03:12:35 +08:00
tcmofashi ead9b8cfe4 Merge remote-tracking branch 'upstream/debug' into debug 2025-03-07 02:56:03 +08:00
tcmofashi 00aadf0fc8
Merge pull request #72 from SaigyoujiYusora/refactor/unified_request
Refactor/unified request
2025-03-07 02:53:18 +08:00
tcmofashi 94fd4f5ddd fix: 对2MB以下的图片予以放行 2025-03-07 02:47:52 +08:00
tcmofashi b77d73ddc7 feat: 现在可以设置是否自动保存表情包了 2025-03-07 01:49:42 +08:00
KawaiiYusora 1becc5d2d9 Merge branch 'debug' of https://github.com/SengokuCola/MaiMBot into refactor/unified_request
# Conflicts:
#	src/plugins/chat/utils.py
2025-03-07 01:32:15 +08:00
KawaiiYusora e0e3ee4177 fix: update CQCode and Message classes for async initialization and processing 2025-03-07 01:31:03 +08:00
tcmofashi 0ebd241077 fix: 增加设置模板,优化emotion,优化压缩 2025-03-07 01:06:36 +08:00
SengokuCola 8ef00ee571 v0.5.9
修复了记忆刷屏 加入了又新又好错别字生成器 增加了记忆过滤
2025-03-07 00:09:36 +08:00
KawaiiYusora 26f99664ee fix: cq_code async 2025-03-07 00:04:36 +08:00
KawaiiYusora 6ffa38c6ad Merge branch 'debug' of https://github.com/SengokuCola/MaiMBot into refactor/unified_request
# Conflicts:
#	src/plugins/models/utils_model.py
2025-03-06 23:52:39 +08:00
KawaiiYusora 11807fda38 refactor(models):统一请求处理并优化响应处理 (refactor/unified_request)
对 `utils_model.py` 中的请求处理逻辑进行重构,创建统一的请求执行方法 `_execute_request`。该方法集中处理请求构建、重试逻辑和响应处理,替代了 `generate_response`、`generate_response_for_image` 和 `generate_response_async` 中的冗余代码。

关键变更:
- 引入 `_execute_request` 作为 API 请求的单一入口
- 新增支持自定义重试策略和响应处理器
- 通过 `_build_payload` 简化图像和文本载荷构建
- 改进错误处理和日志记录
- 移除已弃用的同步方法
- 加入了`max_response_length`以兼容koboldcpp硬编码的默认值500

此次重构在保持现有功能的同时提高了代码可维护性,减少了重复代码
2025-03-06 23:50:14 +08:00
tcmofashi e3c7fae61d fix: 增加设置项 2025-03-06 21:18:35 +08:00
tcmofashi 325fc21d89 Merge branch 'debug' into feature 2025-03-06 20:46:07 +08:00
SengokuCola ee414eeaaf v0.5.8 修复 回复重复输出的bug 2025-03-06 19:56:57 +08:00
tcmofashi 35ae480faa Merge branch 'debug' into feature 2025-03-06 15:07:12 +08:00
SengokuCola eaa711ada7 v0.5.7
记忆系统接入关键词,重新启动自主发言功能
2025-03-06 14:27:22 +08:00
tcmofashi a612519d56 feat: 新增表情包过滤,奶龙再见 2025-03-06 07:22:36 +08:00
tcmofashi 77076a505f Merge branch 'debug' into feature 2025-03-06 06:45:32 +08:00
tcmofashi 3897c9787a fix: 后置emotion生成,大幅提高响应速度 2025-03-06 06:45:20 +08:00
tcmofashi fea3285d20 feat: emoji选择逻辑优化 2025-03-06 06:30:27 +08:00