diff --git a/README.md b/README.md index f079f360..bfd1aee7 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ > - QQ 机器人存在被限制风险,请自行了解,谨慎使用。 > - 由于程序处于开发中,可能消耗较多 token。 -## 麦麦MC项目(早期开发) +## 麦麦MC项目MaiCraft(早期开发) [让麦麦玩MC](https://github.com/MaiM-with-u/Maicraft) 交流群:1058573197 @@ -72,13 +72,13 @@ ## 💬 讨论 **技术交流群:** -- [一群](https://qm.qq.com/q/VQ3XZrWgMs) | - [二群](https://qm.qq.com/q/RzmCiRtHEW) | - [三群](https://qm.qq.com/q/wlH5eT8OmQ) | - [四群](https://qm.qq.com/q/wGePTl1UyY) + [麦麦脑电图](https://qm.qq.com/q/RzmCiRtHEW) | + [麦麦脑磁图](https://qm.qq.com/q/wlH5eT8OmQ) | + [麦麦大脑磁共振](https://qm.qq.com/q/VQ3XZrWgMs) | + [麦麦要当VTB](https://qm.qq.com/q/wGePTl1UyY) **聊天吹水群:** -- [五群](https://qm.qq.com/q/JxvHZnxyec) +- [麦麦之闲聊群](https://qm.qq.com/q/JxvHZnxyec) **插件开发测试版群:** - [插件开发群](https://qm.qq.com/q/1036092828) diff --git a/changelogs/changelog.md b/changelogs/changelog.md index d7264072..a61bb964 100644 --- a/changelogs/changelog.md +++ b/changelogs/changelog.md @@ -1,8 +1,20 @@ # Changelog -0.10.3饼: -重名问题 -动态频率进一步优化 +0.10.4饼: +重名问题(和关系一起改进) + +## [0.10.3] - 2025-9-1x +### 🌟 主要功能更改 +- planner支持多动作,移除Sub_planner +- 移除激活度系统,现在回复完全由planner控制 +- 现可自定义planner行为 +- 更丰富的聊天行为 +- + +### 细节功能更改 +- 更好的event系统 +- 为空回复添加重试机制 + ## [0.10.2] - 2025-8-31 diff --git a/src/chat/heart_flow/heartFC_chat.py b/src/chat/heart_flow/heartFC_chat.py index 68939ca7..f41559b6 100644 --- a/src/chat/heart_flow/heartFC_chat.py +++ b/src/chat/heart_flow/heartFC_chat.py @@ -188,7 +188,7 @@ class HeartFChatting: chat_id=self.stream_id, start_time=self.last_read_time, end_time=time.time(), - limit=10, + limit=20, limit_mode="latest", filter_mai=True, filter_command=True, diff --git a/src/chat/heart_flow/heartflow_message_processor.py b/src/chat/heart_flow/heartflow_message_processor.py index 7e5527ac..837b5c32 100644 --- a/src/chat/heart_flow/heartflow_message_processor.py +++ b/src/chat/heart_flow/heartflow_message_processor.py @@ -38,53 +38,13 @@ async def _calculate_interest(message: MessageRecv) -> Tuple[float, list[str]]: is_mentioned, is_at, reply_probability_boost = is_mentioned_bot_in_message(message) interested_rate = 0.0 keywords = [] - # with Timer("记忆激活"): - # interested_rate, keywords, keywords_lite = await hippocampus_manager.get_activate_from_text( - # message.processed_plain_text, - # max_depth=4, - # fast_retrieval=global_config.chat.interest_rate_mode == "fast", - # ) - # message.key_words = keywords - # message.key_words_lite = keywords_lite - # logger.debug(f"记忆激活率: {interested_rate:.2f}, 关键词: {keywords}") - text_len = len(message.processed_plain_text) - # 根据文本长度分布调整兴趣度,采用分段函数实现更精确的兴趣度计算 - # 基于实际分布:0-5字符(26.57%), 6-10字符(27.18%), 11-20字符(22.76%), 21-30字符(10.33%), 31+字符(13.86%) - - if text_len == 0: - base_interest = 0.01 # 空消息最低兴趣度 - elif text_len <= 5: - # 1-5字符:线性增长 0.01 -> 0.03 - base_interest = 0.01 + (text_len - 1) * (0.03 - 0.01) / 4 - elif text_len <= 10: - # 6-10字符:线性增长 0.03 -> 0.06 - base_interest = 0.03 + (text_len - 5) * (0.06 - 0.03) / 5 - elif text_len <= 20: - # 11-20字符:线性增长 0.06 -> 0.12 - base_interest = 0.06 + (text_len - 10) * (0.12 - 0.06) / 10 - elif text_len <= 30: - # 21-30字符:线性增长 0.12 -> 0.18 - base_interest = 0.12 + (text_len - 20) * (0.18 - 0.12) / 10 - elif text_len <= 50: - # 31-50字符:线性增长 0.18 -> 0.22 - base_interest = 0.18 + (text_len - 30) * (0.22 - 0.18) / 20 - elif text_len <= 100: - # 51-100字符:线性增长 0.22 -> 0.26 - base_interest = 0.22 + (text_len - 50) * (0.26 - 0.22) / 50 - else: - # 100+字符:对数增长 0.26 -> 0.3,增长率递减 - base_interest = 0.26 + (0.3 - 0.26) * (math.log10(text_len - 99) / math.log10(901)) # 1000-99=901 - - # 确保在范围内 - base_interest = min(max(base_interest, 0.01), 0.3) - - message.interest_value = base_interest + message.interest_value = 1 message.is_mentioned = is_mentioned message.is_at = is_at message.reply_probability_boost = reply_probability_boost - return base_interest, keywords + return 1, keywords class HeartFCMessageReceiver: diff --git a/src/main.py b/src/main.py index 2f33818e..e33e1dab 100644 --- a/src/main.py +++ b/src/main.py @@ -130,16 +130,6 @@ class MainSystem: self.server.run(), ] - # 根据配置条件性地添加记忆系统相关任务 - # if global_config.memory.enable_memory and self.hippocampus_manager: - # tasks.extend( - # [ - # # 移除记忆构建的定期调用,改为在heartFC_chat.py中调用 - # # self.build_memory_task(), - # self.forget_memory_task(), - # ] - # ) - await asyncio.gather(*tasks) async def forget_memory_task(self):