Merge branch 'dev' of https://github.com/MaiM-with-u/MaiBot into dev
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -306,3 +306,4 @@ src/chat/focus_chat/working_memory/test/test1.txt
|
|||||||
src/chat/focus_chat/working_memory/test/test4.txt
|
src/chat/focus_chat/working_memory/test/test4.txt
|
||||||
run_maiserver.bat
|
run_maiserver.bat
|
||||||
src/plugins/test_plugin_pic/actions/pic_action_config.toml
|
src/plugins/test_plugin_pic/actions/pic_action_config.toml
|
||||||
|
run_pet.bat
|
||||||
|
|||||||
19
README.md
19
README.md
@@ -1,9 +1,6 @@
|
|||||||
<picture>
|
<img src="depends-data/maimai.png" alt="MaiBot" title="作者:略nd" width="300">
|
||||||
<source media="(max-width: 600px)" srcset="depends-data/maimai.png" width="100%">
|
|
||||||
<img alt="MaiBot" src="depends-data/maimai.png" title="作者:略nd" style="float: right; width: 20%;">
|
|
||||||
</picture>
|
|
||||||
|
|
||||||
# 麦麦!MaiCore-MaiBot (编辑中)
|
# 麦麦!MaiCore-MaiBot
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
@@ -31,8 +28,8 @@
|
|||||||
- 💭 **智能对话系统**:基于 LLM 的自然语言交互。
|
- 💭 **智能对话系统**:基于 LLM 的自然语言交互。
|
||||||
- 🤔 **实时思维系统**:模拟人类思考过程。
|
- 🤔 **实时思维系统**:模拟人类思考过程。
|
||||||
- 💝 **情感表达系统**:丰富的表情包和情绪表达。
|
- 💝 **情感表达系统**:丰富的表情包和情绪表达。
|
||||||
- 🧠 **持久记忆系统**:基于 MongoDB 的长期记忆存储。
|
- 🧠 **持久记忆系统**:基于图的长期记忆存储。
|
||||||
- 🔄 **动态人格系统**:自适应的性格特征。
|
- 🔄 **动态人格系统**:自适应的性格特征和表达方式。
|
||||||
|
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<a href="https://www.bilibili.com/video/BV1amAneGE3P" target="_blank">
|
<a href="https://www.bilibili.com/video/BV1amAneGE3P" target="_blank">
|
||||||
@@ -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/) 页面下载最新版本
|
可前往 [Release](https://github.com/MaiM-with-u/MaiBot/releases/) 页面下载最新版本
|
||||||
|
可前往 [启动器发布页面](https://github.com/MaiM-with-u/mailauncher/releases/tag/v0.1.0)下载最新启动器
|
||||||
**GitHub 分支说明:**
|
**GitHub 分支说明:**
|
||||||
- `main`: 稳定发布版本(推荐)
|
- `main`: 稳定发布版本(推荐)
|
||||||
- `dev`: 开发测试版本(不稳定)
|
- `dev`: 开发测试版本(不稳定)
|
||||||
- `classical`: 旧版本(停止维护)
|
- `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 的新版本部署方式(与旧版本不兼容)
|
- [🚀 最新版本部署教程](https://docs.mai-mai.org/manual/deployment/mmc_deploy_windows.html) - 基于 MaiCore 的新版本部署方式(与旧版本不兼容)
|
||||||
|
|
||||||
> [!WARNING]
|
> [!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 可能随时调整。
|
> - 项目处于活跃开发阶段,功能和 API 可能随时调整。
|
||||||
> - 文档未完善,有问题可以提交 Issue 或者 Discussion。
|
> - 文档未完善,有问题可以提交 Issue 或者 Discussion。
|
||||||
> - QQ 机器人存在被限制风险,请自行了解,谨慎使用。
|
> - QQ 机器人存在被限制风险,请自行了解,谨慎使用。
|
||||||
|
|||||||
@@ -95,13 +95,20 @@ class CycleDetail:
|
|||||||
|
|
||||||
def log_cycle_to_file(self, file_path: str):
|
def log_cycle_to_file(self, file_path: str):
|
||||||
"""将循环信息写入文件"""
|
"""将循环信息写入文件"""
|
||||||
# 如果目录不存在,则创建目录
|
# 如果目录不存在,则创建目
|
||||||
dir_name = os.path.dirname(file_path)
|
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):
|
if dir_name and not os.path.exists(dir_name):
|
||||||
os.makedirs(dir_name, exist_ok=True)
|
os.makedirs(dir_name, exist_ok=True)
|
||||||
# 写入文件
|
# 写入文件
|
||||||
import json
|
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:
|
with open(file_path, "a", encoding="utf-8") as f:
|
||||||
f.write(json.dumps(self.to_dict(), ensure_ascii=False) + "\n")
|
f.write(json.dumps(self.to_dict(), ensure_ascii=False) + "\n")
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class PersonalityExpression:
|
|||||||
)
|
)
|
||||||
self.meta_file_path = os.path.join("data", "expression", "personality", "expression_style_meta.json")
|
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.expressions_file_path = os.path.join("data", "expression", "personality", "expressions.json")
|
||||||
self.max_calculations = 10
|
self.max_calculations = 20
|
||||||
|
|
||||||
def _read_meta_data(self):
|
def _read_meta_data(self):
|
||||||
if os.path.exists(self.meta_file_path):
|
if os.path.exists(self.meta_file_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user