docs: make example code fences copy-safe (#5833)

This commit is contained in:
Taranjeet Singh
2026-06-24 22:19:40 -07:00
committed by GitHub
parent ac8f862ff7
commit ac296f7534
5 changed files with 80 additions and 73 deletions
@@ -117,7 +117,7 @@ results_without_criteria = client.search(
### Compare Results
### Search Results (with Criteria)
```python
```text
[
{"memory": "User feels refreshed and ready to take on anything on a beautiful sunny day", "score": 0.666, ...},
{"memory": "User finally has time to draw something after a long time", "score": 0.616, ...},
@@ -128,7 +128,7 @@ results_without_criteria = client.search(
```
### Search Results (without Criteria)
```python
```text
[
{"memory": "User is happy today", "score": 0.607, ...},
{"memory": "User feels refreshed and ready to take on anything on a beautiful sunny day", "score": 0.512, ...},
+1 -1
View File
@@ -190,7 +190,7 @@ messages = [
client.add(messages, user_id='alice')
```
```python Memories with categories
```text Memories with categories
# Following categories will be created for the memories added
Sometimes draws and sketches in free time (hobbies)
Is quite athletic (sports)
+5 -5
View File
@@ -108,10 +108,10 @@ print(response)
```javascript JavaScript
// Basic Export request
const filters = {"user_id": "alice"};
const basicFilters = {"user_id": "alice"};
const response = await client.createMemoryExport({
schema: json_schema,
filters: filters
filters: basicFilters
});
// Export with custom instructions and additional filters
@@ -124,16 +124,16 @@ const export_instructions = `
`;
// For create operation, using only user_id filter as requested
const filters = {
const exportFilters = {
"AND": [
{"user_id": "alex"},
{"created_at": {"gte": "2024-01-01"}}
]
}
};
const responseWithInstructions = await client.createMemoryExport({
schema: json_schema,
filters: filters,
filters: exportFilters,
exportInstructions: export_instructions
});