You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Service is running: `python -m uvicorn memos.api.server_api:app --host 0.0.0.0 --port 8001`
7
+
-`.env` is configured for Redis, embeddings, and the vector DB (current test setup: Redis reachable, Qdrant Cloud connected).
8
+
9
+
### 1) /product/add
10
+
- Purpose: Write a memory (sync/async).
11
+
- Example request (sync):
12
+
13
+
```bash
14
+
curl -s -X POST http://127.0.0.1:8001/product/add \
15
+
-H 'Content-Type: application/json' \
16
+
-d '{
17
+
"user_id": "tester",
18
+
"mem_cube_id": "default_cube",
19
+
"memory_content": "Apple is a fruit rich in fiber.",
20
+
"async_mode": "sync"
21
+
}'
22
+
```
23
+
24
+
- Observed result: `200`, message: "Memory added successfully", returns the written `memory_id` and related info.
25
+
26
+
### 2) /product/get_all
27
+
- Purpose: List all memories for the user/type to confirm writes.
28
+
- Example request:
29
+
30
+
```bash
31
+
curl -s -X POST http://127.0.0.1:8001/product/get_all \
32
+
-H 'Content-Type: application/json' \
33
+
-d '{
34
+
"user_id": "tester",
35
+
"memory_type": "text_mem",
36
+
"mem_cube_ids": ["default_cube"]
37
+
}'
38
+
```
39
+
40
+
- Observed result: `200`, shows the recently written apple memories (WorkingMemory/LongTermMemory/UserMemory present, `vector_sync=success`).
41
+
42
+
### 3) /product/search
43
+
- Purpose: Vector search memories.
44
+
- Example request:
45
+
46
+
```bash
47
+
curl -s -X POST http://127.0.0.1:8001/product/search \
48
+
-H 'Content-Type: application/json' \
49
+
-d '{
50
+
"query": "What fruit is rich in fiber?",
51
+
"user_id": "tester",
52
+
"mem_cube_id": "default_cube",
53
+
"top_k": 5,
54
+
"pref_top_k": 3,
55
+
"include_preference": false
56
+
}'
57
+
```
58
+
59
+
- Observed result: previously returned 400 because payload indexes (e.g., `vector_sync`) were missing in Qdrant. Index creation is now automatic during Qdrant initialization (memory_type/status/vector_sync/user_name).
60
+
- If results are empty or errors persist, verify indexes exist (auto-created on restart) or recreate/clean the collection.
61
+
62
+
### Notes / Next steps
63
+
-`/product/add` and `/product/get_all` are healthy.
64
+
-`/product/search` still returns empty results even with vectors present; likely related to search filters or vector retrieval.
65
+
- Suggested follow-ups: inspect `SearchHandler` flow, filter conditions (user_id/session/cube_name), and vector DB search calls; capture logs or compare with direct `VecDBFactory.search` calls.
0 commit comments