通过RESTful API使用个性化功能需遵循以下工作流:
- memory storage::
- invocations
/memory/store
端点存储用户特征 - 示例:存储用户电影偏好
curl -X POST http://localhost:8000/memory/store -H "Content-Type: application/json" -d '{"user_id":"u1001", "data":"偏爱科幻片和诺兰导演"}'
- invocations
- 记忆检索::
- invocations
/memory/retrieve
获取关联记忆 - 关键参数:时间衰减因子(控制历史记忆权重)
- invocations
- Response Generation::
- 自动将检索结果作为LLM的system prompt
- 个性化程度通过
config/memory_config.json
hit the nail on the headcontext_window
align
高级用法:
1. 批量导入历史数据可使用scripts/batch_importer.py
2. 对话连续性通过session_id
参数维护
This answer comes from the articleDeep Recall: an open source tool that provides an enterprise-class memory framework for large modelsThe