diff --git a/.gitignore b/.gitignore index 4b4f5b80e..933255c60 100644 --- a/.gitignore +++ b/.gitignore @@ -306,3 +306,4 @@ src/chat/focus_chat/working_memory/test/test1.txt src/chat/focus_chat/working_memory/test/test4.txt run_maiserver.bat src/plugins/test_plugin_pic/actions/pic_action_config.toml +run_pet.bat diff --git a/README.md b/README.md index b29cfc5a0..965c6dca9 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,6 @@ - - - MaiBot - +MaiBot -# 麦麦!MaiCore-MaiBot (编辑中) +# 麦麦!MaiCore-MaiBot ![Python Version](https://img.shields.io/badge/Python-3.10+-blue) ![License](https://img.shields.io/github/license/SengokuCola/MaiMBot?label=协议) @@ -31,8 +28,8 @@ - 💭 **智能对话系统**:基于 LLM 的自然语言交互。 - 🤔 **实时思维系统**:模拟人类思考过程。 - 💝 **情感表达系统**:丰富的表情包和情绪表达。 -- 🧠 **持久记忆系统**:基于 MongoDB 的长期记忆存储。 -- 🔄 **动态人格系统**:自适应的性格特征。 +- 🧠 **持久记忆系统**:基于图的长期记忆存储。 +- 🔄 **动态人格系统**:自适应的性格特征和表达方式。
@@ -47,18 +44,20 @@ ## 🔥 更新和安装 -**最新版本: v0.6.3** ([更新日志](changelogs/changelog.md)) +**最新版本: v0.7.0** ([更新日志](changelogs/changelog.md)) 可前往 [Release](https://github.com/MaiM-with-u/MaiBot/releases/) 页面下载最新版本 +可前往 [启动器发布页面](https://github.com/MaiM-with-u/mailauncher/releases/tag/v0.1.0)下载最新启动器 **GitHub 分支说明:** - `main`: 稳定发布版本(推荐) - `dev`: 开发测试版本(不稳定) - `classical`: 旧版本(停止维护) -### 最新版本部署教程 (MaiCore 版本) +### 最新版本部署教程 +- [从0.6升级须知](https://docs.mai-mai.org/faq/maibot/update_to_07.html) - [🚀 最新版本部署教程](https://docs.mai-mai.org/manual/deployment/mmc_deploy_windows.html) - 基于 MaiCore 的新版本部署方式(与旧版本不兼容) > [!WARNING] -> - 从 0.5.x 旧版本升级前请务必阅读:[升级指南](https://docs.mai-mai.org/faq/maibot/backup_update.html) +> - 从 0.6.x 旧版本升级前请务必阅读:[升级指南](https://docs.mai-mai.org/faq/maibot/update_to_07.html) > - 项目处于活跃开发阶段,功能和 API 可能随时调整。 > - 文档未完善,有问题可以提交 Issue 或者 Discussion。 > - QQ 机器人存在被限制风险,请自行了解,谨慎使用。 diff --git a/src/chat/focus_chat/heartFC_Cycleinfo.py b/src/chat/focus_chat/heartFC_Cycleinfo.py index 129a58af8..a12dc861f 100644 --- a/src/chat/focus_chat/heartFC_Cycleinfo.py +++ b/src/chat/focus_chat/heartFC_Cycleinfo.py @@ -95,13 +95,20 @@ class CycleDetail: def log_cycle_to_file(self, file_path: str): """将循环信息写入文件""" - # 如果目录不存在,则创建目录 + # 如果目录不存在,则创建目 dir_name = os.path.dirname(file_path) + # 去除特殊字符,保留字母、数字、下划线、中划线和中文 + dir_name = "".join( + char for char in dir_name if char.isalnum() or char in ["_", "-", "/"] or "\u4e00" <= char <= "\u9fff" + ) + print("dir_name:", dir_name) if dir_name and not os.path.exists(dir_name): os.makedirs(dir_name, exist_ok=True) # 写入文件 import json + file_path = os.path.join(dir_name, os.path.basename(file_path)) + print("file_path:", file_path) with open(file_path, "a", encoding="utf-8") as f: f.write(json.dumps(self.to_dict(), ensure_ascii=False) + "\n") diff --git a/src/individuality/expression_style.py b/src/individuality/expression_style.py index cb3778da4..29b687076 100644 --- a/src/individuality/expression_style.py +++ b/src/individuality/expression_style.py @@ -39,7 +39,7 @@ class PersonalityExpression: ) self.meta_file_path = os.path.join("data", "expression", "personality", "expression_style_meta.json") self.expressions_file_path = os.path.join("data", "expression", "personality", "expressions.json") - self.max_calculations = 10 + self.max_calculations = 20 def _read_meta_data(self): if os.path.exists(self.meta_file_path):