Docs: set api_key to env (#2252)
This commit is contained in:
@@ -19,9 +19,12 @@ Here's how to set custom categories:
|
||||
|
||||
<CodeGroup>
|
||||
```python Code
|
||||
import os
|
||||
from mem0 import MemoryClient
|
||||
|
||||
client = MemoryClient(api_key="<your_mem0_api_key>")
|
||||
os.environ["MEM0_API_KEY"] = "your-api-key"
|
||||
|
||||
client = MemoryClient()
|
||||
|
||||
# Update custom categories
|
||||
new_categories = [
|
||||
@@ -95,8 +98,11 @@ You can also set custom categories during the `add` API call. This will override
|
||||
|
||||
<CodeGroup>
|
||||
```python Code
|
||||
import os
|
||||
from mem0 import MemoryClient
|
||||
|
||||
os.environ["MEM0_API_KEY"] = "your-api-key"
|
||||
|
||||
client = MemoryClient(api_key="<your_mem0_api_key>")
|
||||
|
||||
custom_categories = [
|
||||
@@ -148,9 +154,12 @@ Here is the list of **default categories**. If you don't specify any custom cate
|
||||
|
||||
<CodeGroup>
|
||||
```python Code
|
||||
import os
|
||||
from mem0 import MemoryClient
|
||||
|
||||
client = MemoryClient(api_key="<your_mem0_api_key>")
|
||||
os.environ["MEM0_API_KEY"] = "your-api-key"
|
||||
|
||||
client = MemoryClient()
|
||||
|
||||
messages = [
|
||||
{"role": "user", "content": "Hi, my name is Alice."},
|
||||
|
||||
@@ -29,9 +29,12 @@ Users can define specific kinds of memories to store. This feature enhances memo
|
||||
Here’s how you can do it:
|
||||
|
||||
```python
|
||||
import os
|
||||
from mem0 import MemoryClient
|
||||
|
||||
m = MemoryClient(api_key="xxx")
|
||||
os.environ["MEM0_API_KEY"] = "your-api-key"
|
||||
|
||||
m = MemoryClient()
|
||||
|
||||
# Define what to include
|
||||
includes = "sports related things"
|
||||
|
||||
Reference in New Issue
Block a user