更新文档,调整内存 URI 格式和写入模式示例;移除过时的 OpenViking 内容补充逻辑,并添加相应的单元测试
This commit is contained in:
@ -197,13 +197,15 @@ curl -sS -X POST "<MEMORY_SYSTEM_BASE_URL>/memory-system/memories" \
|
||||
-d '{
|
||||
"user_id": "<USER_ID>",
|
||||
"user_key": "<USER_KEY>",
|
||||
"uri": "viking://user/memories/preferences/python.md",
|
||||
"content": "# Python 偏好\n\n用户偏好使用 Python 做数据分析,常用 pandas。",
|
||||
"mode": "replace",
|
||||
"uri": "viking://user/<USER_ID>/memories/preferences/饮食偏好.md",
|
||||
"content": "用户喜欢喝茶",
|
||||
"mode": "create",
|
||||
"wait": true
|
||||
}'
|
||||
```
|
||||
|
||||
For preference memories, write directly under `memories/preferences/`; do not add an extra `/user` path segment.
|
||||
|
||||
`mode` supports:
|
||||
|
||||
- `create`: create a new memory URI.
|
||||
@ -262,7 +264,7 @@ curl -s -X POST <MEMORY_SYSTEM_BASE_URL>/memory-system/search \
|
||||
}'
|
||||
```
|
||||
|
||||
Raw API search responses include merged `items` plus compact backend diagnostics. Fields named `vector` are stripped recursively before the API returns JSON. The API does not return EverOS `original_data` or full episode payloads inside `backends` anymore. OpenViking search uses `/api/v1/search/search`; `target_uri`, `level`, and `score_threshold` are optional request fields. For OpenViking memory hits, the API also reads the matched URI with `content/read` and returns the latest body in `content` when available.
|
||||
Raw API search responses include merged `items` plus compact backend diagnostics. Fields named `vector` are stripped recursively before the API returns JSON. The API does not return EverOS `original_data` or full episode payloads inside `backends` anymore. OpenViking search uses `/api/v1/search/search`; `target_uri`, `level`, and `score_threshold` are optional request fields.
|
||||
|
||||
The search response shape should now look more like:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user