xiaozhi-esp32-server/main/xiaozhi-server/xiaozhi-memory/config.yaml
SerenNoble 346b78b1f4 feat: LLM缓存控制与对话分层优化
- LLM Provider 支持 cache boolean 开关(前端可控)
- 对话拆分为静态/半稳定/实时三层,优化缓存前缀命中率
- 新增 doubao_cache Provider(豆包 Session 缓存)
- 修复 ModelEditDialog boolean 类型被 String() 转换的 bug
- 数据库迁移:openai provider 增加 cache 字段
- xiaozhi-memory: FTS5 tokenizer 安全修复、改用 ChatGLM
- aipet: 修复 async 调用和 search 方法

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 20:57:44 +08:00

50 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 小智记忆框架配置文件
# 检索模式选择: fts5, embedding, hybrid
retrieval_mode: fts5
# SQLite + FTS5 配置
sqlite:
path: ./data/xiaozhi_memory.db
enable_wal: true # 启用WAL模式提升并发性能
tokenizer: jieba # 中文分词器: jieba, simple, unicode61
# 向量存储配置(可选,embedding模式需要)
vector_store:
type: chromadb # chromadb, qdrant
path: ./data/chroma
collection_name: xiaozhi_memories
# LLM配置(使用ChatGLM免费模型)
llm:
provider: openai
model: glm-4-flash
base_url: https://open.bigmodel.cn/api/paas/v4/
api_key: abf3f70c3b884da79be23b4a807e73f9.nVnNDc7EOaX6ckw7
# 嵌入模型配置(可选,embedding模式需要)
embedding:
provider: sentence-transformers # openai, sentence-transformers, zhipu
model: /models/paraphrase-multilingual-MiniLM-L12-v2
device: cpu # cpu, cuda
# 记忆配置
retention:
enabled: true # 启用遗忘机制
archive_after_days: 90
# 用户画像
profile:
enabled: true
auto_update: true
# 检索配置
retrieval:
top_k: 10
# 混合模式权重
semantic_weight: 0.7 # 语义检索权重
keyword_weight: 0.3 # 关键词检索权重
# 时间和重要性
time_decay: true
importance_boost: true
access_boost: true