feat: support session_id in current chat search

This commit is contained in:
2026-06-23 11:39:29 +08:00
parent f77454b4cc
commit d7e061b780
4 changed files with 78 additions and 5 deletions

View File

@ -486,7 +486,7 @@ curl -X POST http://127.0.0.1:8010/memories/search \
-d '{
"user_id": "u_123",
"user_key": "uk_xxx",
"conversation_id": "c_456",
"session_id": "chat:c_456",
"query": "图片里的蓝色圆形在哪里?",
"scope": ["current_chat", "resources"],
"method": "hybrid",
@ -502,7 +502,7 @@ curl -X POST http://127.0.0.1:8010/memories/search \
| scope | 行为 |
|---|---|
| `current_chat` | 搜索 `chat:{conversation_id}`需要传 `conversation_id` |
| `current_chat` | 搜索指定聊天 session推荐传完整 `session_id`,如 `chat:c_456`;也兼容旧字段 `conversation_id`会转换为 `chat:{conversation_id}` |
| `resources` | 搜索当前用户已提取且未删除的资源 session |
| `all_user_memory` | 搜索用户全部记忆,不加 session 过滤 |