Refactor configuration and enhance AI capabilities
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.
This commit is contained in:
36
.env.example
36
.env.example
@@ -1,36 +1,36 @@
|
||||
# QQ 机器人配置
|
||||
# 可从 https://bot.q.qq.com/open 获取
|
||||
|
||||
# 机器人 AppID(必填)
|
||||
# QQ Bot credentials
|
||||
BOT_APPID=your_app_id_here
|
||||
|
||||
# 机器人 AppSecret(必填)
|
||||
BOT_SECRET=your_app_secret_here
|
||||
|
||||
# 日志级别: DEBUG / INFO / WARNING / ERROR
|
||||
# Runtime
|
||||
APP_ENV=dev
|
||||
LOG_LEVEL=INFO
|
||||
|
||||
# 是否启用沙箱环境
|
||||
LOG_FORMAT=text
|
||||
SANDBOX_MODE=False
|
||||
|
||||
# ==================== AI 配置 ====================
|
||||
# Optional admin allow-list (comma separated user IDs).
|
||||
# Empty means all users are treated as admin.
|
||||
BOT_ADMIN_IDS=
|
||||
|
||||
# 主模型配置
|
||||
# 可选 provider: openai / anthropic / deepseek / qwen
|
||||
# AI chat model
|
||||
AI_PROVIDER=openai
|
||||
AI_MODEL=gpt-4
|
||||
AI_API_KEY=your_api_key_here
|
||||
# 可选,自定义 API 地址
|
||||
AI_API_BASE=https://api.openai.com/v1
|
||||
|
||||
# 嵌入模型配置(用于长期记忆检索)
|
||||
# 不配置时将回退为主模型的 embedding 能力(如果可用)
|
||||
# Embedding model (optional)
|
||||
AI_EMBED_PROVIDER=openai
|
||||
AI_EMBED_MODEL=text-embedding-3-small
|
||||
AI_EMBED_API_KEY=
|
||||
AI_EMBED_API_BASE=
|
||||
|
||||
# 向量数据库配置
|
||||
# true: 使用 Chroma(推荐)
|
||||
# false: 使用 JSON 存储
|
||||
# Memory storage and retrieval
|
||||
AI_USE_VECTOR_DB=true
|
||||
AI_USE_QUERY_EMBEDDING=false
|
||||
AI_MEMORY_SCOPE=session
|
||||
|
||||
# Reliability
|
||||
AI_CHAT_RETRIES=1
|
||||
AI_CHAT_RETRY_BACKOFF_SECONDS=0.8
|
||||
MESSAGE_DEDUP_SECONDS=30
|
||||
MESSAGE_DEDUP_MAX_SIZE=4096
|
||||
|
||||
Reference in New Issue
Block a user