a754e7843f1ee790dead7d1bf75289538c3e9e43
Updated .env.example to improve clarity and added new configuration options for memory and reliability settings. Refactored main.py to streamline the bot's entry point and improved error handling. Enhanced README to reflect new features and command structure. Removed deprecated cmd_zip_skill and skills_creator modules to clean up the codebase. Updated AIClient and MemorySystem for better performance and flexibility in handling user interactions.
QQbot (Memory + Persona Core)
QQ 机器人项目,保留并强化两大核心能力:
Memory:短期/长期记忆、检索、清理、会话作用域Persona:角色配置、作用域优先级(session > group > user > global)
主要能力
- 多模型配置与运行时切换:
/models - 人设管理:
/personality - 记忆管理:
/memory、/clear - QQ 消息安全输出:自动清理 Markdown/URL
- 工程增强:消息去重、失败重试、权限边界、结构化日志
快速开始
- 安装依赖
pip install -r requirements.txt
- 配置环境变量
copy .env.example .env
- 启动
python main.py
命令
- 基础
/help/clear/clear short/clear long/clear all
- 人设
/personality/personality list/personality set <key> [global|user|group|session]/personality add <name> <Introduction>/personality remove <key>
- 模型
/models/models current/models add <model_name>/models add <key> <provider> <model_name> [api_base]/models switch <key|index>/models remove <key|index>
- 记忆
/memory/memory get <id>/memory add <content|json>/memory update <id> <content|json>/memory delete <id>/memory search <query> [limit]
关键配置
AI_MEMORY_SCOPE=user|session:记忆作用域BOT_ADMIN_IDS:管理员白名单(逗号分隔)AI_CHAT_RETRIES/AI_CHAT_RETRY_BACKOFF_SECONDS:聊天失败重试MESSAGE_DEDUP_SECONDS/MESSAGE_DEDUP_MAX_SIZE:消息去重窗口LOG_FORMAT=text|json:日志输出格式
测试
pytest -q
Description
Languages
Python
87.8%
HTML
9.5%
Shell
1.5%
JavaScript
1%
Batchfile
0.2%