Update add method and prompts (#1775)

This commit is contained in:
Dev Khant
2024-09-04 05:42:35 +05:30
committed by GitHub
parent d113037a4f
commit f21ca9b765
5 changed files with 306 additions and 129 deletions

View File

@@ -86,6 +86,12 @@ m = Memory.from_config(config_dict=config)
```python Code
# For a user
result = m.add("Likes to play cricket on weekends", user_id="alice", metadata={"category": "hobbies"})
# messages = [
# {"role": "user", "content": "Hi, I'm Alex. I like to play cricket on weekends."},
# {"role": "assistant", "content": "Hello Alex! It's great to know that you enjoy playing cricket on weekends. I'll remember that for future reference."}
# ]
# client.add(messages, user_id="alice")
```
```json Output