fix(sdk): removing deprecating param from our sdk and docs changes with it (#4740)

This commit is contained in:
Kartik
2026-04-12 00:34:58 +05:30
committed by GitHub
parent 3882af7450
commit e44b46ef2e
138 changed files with 1186 additions and 2840 deletions
+10 -6
View File
@@ -81,6 +81,10 @@ client = MemoryClient(api_key="m0-...")
**Critical Change**: Platform uses v2 endpoints that require filtering parameters to be nested inside a `filters` dictionary.
</Warning>
<Note>
The `limit` parameter has been removed in favor of `top_k` across all SDKs. Update any code using `limit=` to use `top_k=` instead.
</Note>
| Method | Open Source | Platform |
| ------ | ----------- | -------- |
| `search()` | `m.search(query, user_id="alex")` | `client.search(query, filters={"user_id": "alex"})` |
@@ -121,18 +125,18 @@ Note: `add()` and `delete()` methods remain unchanged. The `update()` method is
<CodeGroup>
```python Open Source (Old)
# Get all memories for a user
memories = m.get_all(user_id="alex", limit=10)
memories = m.get_all(user_id="alex", top_k=10)
# Get memories with pagination
memories = m.get_all(user_id="alex", limit=5, offset=10)
memories = m.get_all(user_id="alex", top_k=5, offset=10)
```
```python Platform (New)
# Get all memories for a user
memories = client.get_all(filters={"user_id": "alex"}, limit=10)
memories = client.get_all(filters={"user_id": "alex"}, top_k=10)
# Get memories with pagination
memories = client.get_all(filters={"user_id": "alex"}, limit=5, offset=10)
memories = client.get_all(filters={"user_id": "alex"}, top_k=5, offset=10)
```
</CodeGroup>
</Accordion>
@@ -283,7 +287,7 @@ The Platform introduces powerful capabilities not available in OSS:
"user preferences",
filters={"user_id": "alex"},
rerank=True, # Platform exclusive
limit=5
top_k=5
)
# Search with keyword expansion
@@ -335,7 +339,7 @@ The Platform introduces powerful capabilities not available in OSS:
{"timestamp": {"gte": "2024-01-01"}}
]
},
limit=100
top_k=100
)
# Monitor usage patterns