Doc: api_key changes (#2251)
This commit is contained in:
@@ -14,13 +14,17 @@ To use the async client, you first need to initialize it:
|
||||
<CodeGroup>
|
||||
|
||||
```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()
|
||||
```
|
||||
|
||||
```javascript JavaScript
|
||||
const { MemoryClient } = require('mem0ai');
|
||||
const client = new MemoryClient('your-api-key');
|
||||
const client = new MemoryClient({ apiKey: 'your-api-key'});
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
@@ -13,10 +13,12 @@ When a user submits an image, Mem0 processes it to extract textual information a
|
||||
|
||||
<CodeGroup>
|
||||
```python Code
|
||||
import os
|
||||
from mem0 import MemoryClient
|
||||
|
||||
# Initialize the MemoryClient with your API key
|
||||
client = MemoryClient(api_key="your_api_key_here")
|
||||
os.environ["MEM0_API_KEY"] = "your-api-key"
|
||||
|
||||
client = MemoryClient()
|
||||
|
||||
messages = [
|
||||
{
|
||||
|
||||
@@ -17,9 +17,12 @@ Create a webhook for your project; it will receive events only from that project
|
||||
<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()
|
||||
|
||||
# Create webhook in a specific project
|
||||
webhook = client.create_webhook(
|
||||
@@ -33,7 +36,7 @@ print(webhook)
|
||||
|
||||
```javascript JavaScript
|
||||
const { MemoryClient } = require('mem0ai');
|
||||
const client = new MemoryClient('your-api-key');
|
||||
const client = new MemoryClient({ apiKey: 'your-api-key'});
|
||||
|
||||
// Create webhook in a specific project
|
||||
const webhook = await client.createWebhook({
|
||||
Reference in New Issue
Block a user