Mem0 Python SDK v2.2.0 新增用户画像功能
原标题:Mem0 Python SDK (v2.2.0)
AI 摘要
Mem0 发布 Python SDK v2.2.0,为 MemoryClient 和 AsyncMemoryClient 新增用户画像(User Profiles)功能,包括 get_profile、generate_profile、get_profile_settings、update_profile_settings、sample_profiles 和 get_profile_job 等方法。画像是由 LLM 根据用户记忆异步生成的、按项目配置的 JSON Schema 约束的结构化 JSON 摘要,每个任务 POST 都携带 Idempotency-Key 以支持安全重试。此外修复了 Valkey 向量存储中时间戳为 None 时引发 TypeError 的问题。
正文节选
**New Features:** - **Client:** Add User Profiles to `MemoryClient` and `AsyncMemoryClient`: `get_profile()`, `generate_profile()`, `get_profile_settings()`, `update_profile_settings()`, `sample_profiles()`, and `get_profile_job()`. A profile is a structured, always-current JSON summary of one user, shaped by a JSON Schema you configure per project and filled by an LLM from that user's memories. Generation is asynchronous. Every job POST carries an `Idempotency-Key`; to retry a lost request wit