fix: updating docs with v3 integrations updates (#4898)
This commit is contained in:
@@ -49,7 +49,7 @@ Import necessary modules and configure Mem0:
|
||||
```python
|
||||
import boto3
|
||||
from opensearchpy import OpenSearch, RequestsHttpConnection, AWSV4SignerAuth
|
||||
from mem0.memory.main import Memory
|
||||
from mem0 import Memory
|
||||
|
||||
region = 'us-west-2'
|
||||
service = 'aoss'
|
||||
|
||||
@@ -24,7 +24,7 @@ You can get your Mem0 API key from the <a href="https://app.mem0.ai/" rel="nofol
|
||||
Install the necessary libraries:
|
||||
|
||||
```bash
|
||||
pip install mem0 keywordsai-sdk
|
||||
pip install mem0ai keywordsai-sdk
|
||||
```
|
||||
|
||||
Set up your environment variables:
|
||||
@@ -65,7 +65,7 @@ config = {
|
||||
}
|
||||
|
||||
# Initialize Memory
|
||||
memory = Memory.from_config(config_dict=config)
|
||||
memory = Memory.from_config(config)
|
||||
|
||||
# Add a memory
|
||||
result = memory.add(
|
||||
|
||||
@@ -92,7 +92,6 @@ config = {
|
||||
"provider": "openai",
|
||||
"config": {"model": "text-embedding-3-small"},
|
||||
},
|
||||
"version": "v1.1",
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ Customize memory behavior:
|
||||
# Configure memory search
|
||||
memories = mem0.search(
|
||||
query="travel preferences",
|
||||
user_id="alex",
|
||||
filters={"user_id": "alex"},
|
||||
top_k=5 # Number of memories to retrieve
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user