Mem0 TS Spec/Docs Update (#2275)

This commit is contained in:
Saket Aryan
2025-02-28 21:43:51 +05:30
committed by GitHub
parent d9b48191de
commit c1aba35884
9 changed files with 157 additions and 78 deletions

View File

@@ -330,7 +330,7 @@ result = m.add("I like to drink coffee in the morning and go for a walk.", user_
```
```typescript TypeScript
const result = memory.add("I like to drink coffee in the morning and go for a walk.", 'alice');
const result = memory.add("I like to drink coffee in the morning and go for a walk.", { userId: "alice", metadata: { category: "preferences" } });
```
```json Output
@@ -361,7 +361,7 @@ related_memories = m.search("Should I drink coffee or tea?", user_id="alice")
```
```typescript TypeScript
const relatedMemories = memory.search("Should I drink coffee or tea?", "alice");
const relatedMemories = memory.search("Should I drink coffee or tea?", { userId: "alice" });
```
```json Output