[docs] Minor Docs fixes ( enhancements , restructure ) (#3748)

This commit is contained in:
Parth Sharma
2025-11-13 11:58:36 -08:00
committed by GitHub
parent 3297ec1a46
commit 2bca30ebe6
10 changed files with 507 additions and 506 deletions
@@ -164,7 +164,7 @@ Ray can plan workouts that avoid aggravating Max's knee, without pulling in race
Run the basic loop for a week and check what's stored:
```python
memories = mem0_client.get_all(user_id="max")
memories = mem0_client.get_all(filters={"AND": [{"user_id": "max"}]})
print([m["memory"] for m in memories["results"]])
# Output: ["Max wants to run marathon under 4 hours", "hey", "lol ok", "cool thanks", "gtg bye"]
@@ -202,7 +202,7 @@ Now chat again:
chat("hey how's it going", user_id="max")
chat("I prefer trail running over roads", user_id="max")
memories = mem0_client.get_all(user_id="max")
memories = mem0_client.get_all(filters={"AND": [{"user_id": "max"}]})
print([m["memory"] for m in memories["results"]])
# Output: ["Max wants to run marathon under 4 hours", "Max prefers trail running over roads"]
@@ -411,7 +411,7 @@ Max changes his goal from sub-4 to sub-3:45:
```python
# Find the old memory
memories = mem0_client.get_all(user_id="max")
memories = mem0_client.get_all(filters={"AND": [{"user_id": "max"}]})
goal_memory = [m for m in memories["results"] if "sub-4" in m["memory"]][0]
# Update it
@@ -126,7 +126,7 @@ async def get_all_memory(
) -> str:
"""Retrieve all memories from Mem0"""
user_id = context.context.user_id or "default_user"
memories = await client.get_all(user_id=user_id)
memories = await client.get_all(filters={"AND": [{"user_id": user_id}]})
results = '\n'.join([result["memory"] for result in memories["results"]])
return str(results)
```