Skip to content

Commit

Permalink
Update readme (mem0ai#1549)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev-Khant authored and Jacksonxhx committed Jul 31, 2024
1 parent aac7a58 commit 8c8c2e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,19 @@ print(result)

# Retrieve memories
all_memories = m.get_all()
memory_id = all_memories[0]["id"] # get a memory_id
print(all_memories)

# Search memories
related_memories = m.search(query="What are Alice's hobbies?", user_id="alice")
print(related_memories)

# Update a memory
result = m.update(memory_id="m1", data="Likes to play tennis on weekends")
result = m.update(memory_id=memory_id, data="Likes to play tennis on weekends")
print(result)

# Get memory history
history = m.history(memory_id="m1")
history = m.history(memory_id=memory_id)
print(history)
```

Expand Down

0 comments on commit 8c8c2e1

Please sign in to comment.