minecraft1024a
b8d31207cb
refactor(chat): 抽象化跨群聊上下文构建逻辑
...
将 `build_cross_context` 方法的实现委托给 `cross_context_api`。
这简化了 `prompt_utils` 中的代码,将复杂的上下文构建逻辑(包括获取其他群聊、根据模式获取和格式化消息)封装到专用的API中,提高了代码的模块化和可维护性。
2025-11-19 22:57:29 +08:00
Windpicker-owo
93fbc31662
fix(chat): 优化breaking模式下的兴趣值累积逻辑
...
重构heartFC_chat中的消息处理机制,使用累积兴趣值替代最近三次记录来判断是否进入breaking模式。主要变更包括:
- 将breaking模式判断基于累积兴趣值而非最近3次记录
- 在消息成功处理时重置累积兴趣值
- 调整阈值计算方式,使用聊天频率进行动态调整
- 修复send_api中的消息查找函数,提高回复消息匹配准确性
这些改动提高了对话节奏控制的稳定性,使breaking模式触发更加合理。
2025-11-19 22:57:25 +08:00
Windpicker-owo
51aad4f952
迁移:1f91967(remove:移除willing系统,移除reply2,移除能量值,移除reply_to改为message)
2025-11-19 22:57:24 +08:00
Windpicker-owo
fe472dff60
修复代码格式和文件名大小写问题
2025-11-19 22:55:55 +08:00
minecraft1024a
a645e766ca
refactor(cache): 重构工具缓存机制并优化LLM请求重试逻辑
...
将工具缓存的实现从`ToolExecutor`的装饰器模式重构为直接集成。缓存逻辑被移出`cache_manager.py`并整合进`ToolExecutor.execute_tool_call`方法中,简化了代码结构并使其更易于维护。
主要变更:
- 从`cache_manager.py`中移除了`wrap_tool_executor`函数。
- 在`tool_use.py`中,`execute_tool_call`现在包含完整的缓存检查和设置逻辑。
- 调整了`llm_models/utils_model.py`中的LLM请求逻辑,为模型生成的空回复或截断响应增加了内部重试机制,增强了稳定性。
- 清理了项目中未使用的导入和过时的文档文件,以保持代码库的整洁。
2025-11-19 22:49:46 +08:00
minecraft1024a
d4ba286855
refactor(core): remove tool history manager and integrate cache into tool executor
...
Removes the `ToolHistoryManager` and its associated functionalities, including history recording, querying, and prompt generation. This simplifies the architecture by decoupling tool execution history from the core logic.
The tool caching mechanism is now directly integrated into the `ToolExecutor` by wrapping the `execute_tool_call` method. This ensures that caching is applied consistently for all tool executions that have it enabled, improving performance and reducing redundant calls.
- Deletes `src/common/tool_history.py`.
- Removes tool history related functions from `prompt_builder.py` and `tool_api.py`.
- Adds a `wrap_tool_executor` function in `cache_manager.py` to apply caching logic directly to the `ToolExecutor`.
2025-11-19 22:49:38 +08:00
minecraft1024a
e7fa3d79ff
Reapply "【迁移】工具系统再完善:工具缓存、ttl支持、自动记录、长期保存、自动清理缓存、将记录与执行分离、api记录查询、时间聊天工具筛选查询..."
...
This reverts commit 3d93bc4079 .
2025-11-19 22:48:31 +08:00
Windpicker-owo
e068663ef9
Revert "【迁移】工具系统再完善:工具缓存、ttl支持、自动记录、长期保存、自动清理缓存、将记录与执行分离、api记录查询、时间聊天工具筛选查询..."
...
This reverts commit 80ab0c687c .
2025-11-19 22:48:24 +08:00
Windpicker-owo
adfacd883c
【迁移】工具系统再完善:工具缓存、ttl支持、自动记录、长期保存、自动清理缓存、将记录与执行分离、api记录查询、时间聊天工具筛选查询...
2025-11-19 22:48:23 +08:00
minecraft1024a
dd9aecea14
feat(maizone): 新增QQ空间互通组功能,根据聊天上下文生成说说
...
引入了全新的“QQ空间互通组”功能。用户可以配置多个群聊为一个互通组。
在通过指令发布说说时,系统会自动获取这些群聊的近期聊天记录作为上下文,从而生成与当前讨论话题更相关的说说内容。
- 在 `config.toml` 中新增了 `[maizone_intercom]` 配置项用于定义互通组。
- 重构并增强了动态(说说)的拉取逻辑,提高了对不同数据格式的兼容性和解析的稳定性。
- 对项目中的多个文件进行了代码清理,移除了未使用的导入,使代码更加整洁。
2025-11-19 22:48:02 +08:00
雅诺狐
34252ea4a0
refactor: 清理代码质量和移除未使用文件
...
- 移除未使用的导入语句和变量
- 修复代码风格问题(空格、格式化等)
- 删除备份文件和测试文件
- 改进异常处理链式调用
- 添加权限系统数据库模型和配置
- 更新版本号至6.4.4
- 优化SQL查询使用正确的布尔表达式
2025-11-19 22:46:18 +08:00
雅诺狐
875e02d42f
数据库重构
2025-11-19 22:40:23 +08:00
雅诺狐
169b07f9c0
Update send_api.py
2025-11-19 22:39:52 +08:00
雅诺狐
6f08596e7b
更新文档格式
2025-11-19 22:39:36 +08:00
minecraft1024a
a184f3690e
修复emoji_manager.py中的数据库持久化逻辑;更新Maizone插件的作者信息和项目链接。
2025-11-19 22:35:54 +08:00
minecraft1024a
ddd647a5ee
更新send_api.py中的文档,增加了参数说明和返回值格式,添加了异常抛出信息
2025-11-19 22:35:53 +08:00
雅诺狐
ce8e20b69d
platform现在可选了
2025-11-19 22:35:52 +08:00
雅诺狐
2e6ae2419b
优化项目结构,格式化代码
2025-11-19 22:35:40 +08:00
雅诺狐
b966a2f09c
小修复
2025-11-19 22:35:34 +08:00
雅诺狐
ec876d1518
Update send_api.py
2025-11-19 22:35:33 +08:00
雅诺狐
f53d9123c7
Update send_api.py
2025-11-19 22:35:32 +08:00
雅诺狐
a588a2a695
添加了一个发送api
2025-11-19 22:35:26 +08:00
雅诺狐
23ee3767ef
初始化
2025-11-19 22:34:56 +08:00
SengokuCola
4ffcc61f4b
feat:记录使用的表达方式
2025-08-12 21:44:35 +08:00
SengokuCola
04bd05c1fe
feat:麦麦回复时知道自己做了什么动作
2025-08-12 17:53:26 +08:00
UnCLAS-Prommer
e28e7e08e8
more typing fix和防炸
2025-08-12 17:08:35 +08:00
SengokuCola
ae254de494
better:重构personinfo,使用Person类和类属性
2025-08-12 14:33:13 +08:00
SengokuCola
bad2be2bdc
fix:全面移除reply_to,并且非必须
2025-08-11 20:25:13 +08:00
SengokuCola
6f49b3d99d
修复Action没有reply_to_message的问题
2025-08-11 14:55:23 +08:00
SengokuCola
9c0f56f6c7
fix:让麦麦可以回复自己的消息,replyer现在可以接受 原因
2025-08-11 14:07:57 +08:00
SengokuCola
1f91967d2d
remove:移除willing系统,移除reply2,移除能量值,移除reply_to改为message
2025-08-11 13:18:17 +08:00
UnCLAS-Prommer
41e8966ae7
更多events
2025-08-09 17:33:24 +08:00
UnCLAS-Prommer
cc3d910cf6
修正检测错误
2025-08-06 12:49:10 +08:00
UnCLAS-Prommer
18e23cacdd
防炸和ruff
2025-08-06 12:25:59 +08:00
Windpicker-owo
cd7c1bb3ca
Merge branch 'dev' of https://github.com/Windpicker-owo/MaiBot into dev
2025-08-06 12:02:48 +08:00
Windpicker-owo
94a66bd235
使Tool支持读取配置文件,优化了开始执行工具调用时的日志输出
2025-08-06 12:01:31 +08:00
UnCLAS-Prommer
1e5db5d7e1
正确使用lpmm构建prompt
2025-08-03 19:52:31 +08:00
UnCLAS-Prommer
84216a4df7
api文档更新,注释更新
2025-07-31 15:01:31 +08:00
UnCLAS-Prommer
6c0edd0ad7
调整对应的调用
2025-07-30 17:07:55 +08:00
UnCLAS-Prommer
af27d0dbf0
tools整合彻底完成
2025-07-28 23:57:55 +08:00
UnCLAS-Prommer
82c4dfbb88
Merge branch 'dev' into dev
2025-07-28 21:59:48 +08:00
UnCLAS-Prommer
97a10c554f
修复导入爆炸和文档错误
2025-07-28 13:09:33 +08:00
UnCLAS-Prommer
576bb34b69
修复send_api爆炸
2025-07-28 13:03:28 +08:00
UnCLAS-Prommer
c0375f5dd9
合并utils_api
2025-07-28 12:37:37 +08:00
UnCLAS-Prommer
d643a85a0a
send_api_doc与reply_to修改
2025-07-28 11:47:32 +08:00
UnCLAS-Prommer
d8191c493a
plugin_manage_api_doc
2025-07-27 23:16:54 +08:00
UnCLAS-Prommer
55ce050cc2
message_api_doc
2025-07-27 22:11:14 +08:00
UnCLAS-Prommer
61e5014c6b
llm_api_doc
2025-07-27 17:10:50 +08:00
UnCLAS-Prommer
96d7ad527a
generator修改与文档
2025-07-27 16:59:33 +08:00
UnCLAS-Prommer
5470f68f4a
emoji_api_doc
2025-07-27 14:42:04 +08:00