Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

Doc: Fix examples (#2355)

Dev Khante9a0be66d825
diff --git a/docs/examples/customer-support-agent.mdx b/docs/examples/customer-support-agent.mdx
index 16ff56d8a..171ddded3 100644
--- a/docs/examples/customer-support-agent.mdx
+++ b/docs/examples/customer-support-agent.mdx
@@ -94,8 +94,8 @@ You can fetch all the memories at any point in time using the following code:
```python
memories = support_agent.get_memories(user_id=customer_id)
-for m in memories:
- print(m['text'])
+for m in memories['results']:
+ print(m['memory'])
```
### Key Points
diff --git a/docs/examples/personal-ai-tutor.mdx b/docs/examples/personal-ai-tutor.mdx
index 9df825ddf..71ebae1d2 100644
--- a/docs/examples/personal-ai-tutor.mdx
+++ b/docs/examples/personal-ai-tutor.mdx
@@ -96,8 +96,8 @@ You can fetch all the memories at any point in time using the following code:
```python
memories = ai_tutor.get_memories(user_id=user_id)
-for m in memories:
- print(m['text'])
+for m in memories['results']:
+ print(m['memory'])
```
### Key Points
diff --git a/docs/examples/personal-travel-assistant.mdx b/docs/examples/personal-travel-assistant.mdx
index 6a49e6341..6187725d0 100644
--- a/docs/examples/personal-travel-assistant.mdx
+++ b/docs/examples/personal-travel-assistant.mdx
@@ -82,11 +82,11 @@ class PersonalTravelAssistant:
def get_memories(self, user_id):
memories = self.memory.get_all(user_id=user_id)
- return [m['memory'] for m in memories['memories']]
+ return [m['memory'] for m in memories['results']]
def search_memories(self, query, user_id):
memories = self.memory.search(query, user_id=user_id)
- return [m['memory'] for m in memories['memories']]
+ return [m['memory'] for m in memories['results']]
# Usage example
user_id = "traveler_123"