Update Docs (#3520)

This commit is contained in:
Deshraj Yadav
2025-09-30 08:41:36 -07:00
committed by GitHub
parent 135883935f
commit d68ed11d58
134 changed files with 2193 additions and 2090 deletions
+6 -6
View File
@@ -35,7 +35,7 @@ const openAIClient = new OpenAI();
const mem0Client = new MemoryClient(mem0Config);
```
### Adding Memories
## Adding Memories
Store user preferences, past interactions, or any relevant information:
<CodeGroup>
@@ -84,7 +84,7 @@ await addUserPreferences();
]
```
</CodeGroup>
### Retrieving Memories
## Retrieving Memories
Search for relevant memories based on the current user input:
@@ -92,7 +92,7 @@ Search for relevant memories based on the current user input:
const relevantMemories = await mem0Client.search(userInput, mem0Config);
```
### Structured Responses with Zod
## Structured Responses with Zod
Define structured response schemas to get consistent output formats:
@@ -125,7 +125,7 @@ const response = await openAIClient.responses.create({
});
```
### Using Web Search
## Using Web Search
Combine memory with web search for up-to-date recommendations:
@@ -139,7 +139,7 @@ const response = await openAIClient.responses.create({
## Examples
### Complete Car Recommendation System
## Complete Car Recommendation System
```javascript
import MemoryClient from "mem0ai";
@@ -230,7 +230,7 @@ const getMemoryString = (memories) => {
run().catch(console.error);
```
### Responses
## Responses
<CodeGroup>
```json Without Memories