Doc changes and Storage fix (#2181)

This commit is contained in:
Dev Khant
2025-01-30 23:46:33 +05:30
committed by GitHub
parent 63fbd2dc2c
commit a06c9a99ae
10 changed files with 272 additions and 283 deletions

View File

@@ -27,6 +27,6 @@ Check out our [Platform Guide](/platform/guide) to start using Mem0 platform qui
## Next Steps
- Sign up to the [Mem0 Platform](https://mem0.dev/pd)
- Join our [Discord](https://mem0.dev/Did) or [Slack](https://mem0.ai/slack) with other developers and get support.
- Join our [Discord](https://mem0.dev/Did) or [Slack](https://mem0.dev/slack) with other developers and get support.
We're excited to see what you'll build with Mem0 Platform. Let's create smarter, more personalized AI experiences together!

View File

@@ -27,8 +27,12 @@ npm install mem0ai
<CodeGroup>
```python Python
import os
from mem0 import MemoryClient
client = MemoryClient(api_key="your-api-key")
os.environ["MEM0_API_KEY"] = "your-api-key"
client = MemoryClient()
```
```javascript JavaScript
@@ -43,9 +47,12 @@ const client = new MemoryClient({ apiKey: 'your-api-key' });
For asynchronous operations in Python, you can use the AsyncMemoryClient:
```python Python
import os
from mem0 import AsyncMemoryClient
client = AsyncMemoryClient(api_key="your-api-key")
os.environ["MEM0_API_KEY"] = "your-api-key"
client = AsyncMemoryClient()
async def main():
@@ -1641,7 +1648,18 @@ curl -X POST "https://api.mem0.ai/v1/memories/" \
```
```json Output
{'message': 'ok'}
[{'id': '3f4eccba-3b09-497a-81ab-cca1ababb36b',
'memory': 'Is allergic to nuts',
'event': 'DELETE'},
{'id': 'f5dcfbf4-5f0b-422a-8ad4-cadb9e941e25',
'memory': 'Is a vegetarian',
'event': 'DELETE'},
{'id': 'dd32f70c-fa69-4fc7-997b-fb4a66d1a0fa',
'memory': 'Name is Alex',
'event': 'DELETE'}]{'message': 'ok'}
{'id': '3f4eccba-3b09-497a-81ab-cca1ababb36b',
'memory': 'Likes Chicken',
'event': 'DELETE'}
```
</CodeGroup>