Add support for Org/Proj ID (#2014)

This commit is contained in:
Dev Khant
2024-11-07 10:46:08 +05:30
committed by GitHub
parent 77b0912808
commit 4cc91d7505
2 changed files with 58 additions and 7 deletions

View File

@@ -32,9 +32,10 @@ Example with the mem0 Python package:
```python
from mem0 import MemoryClient
# Recommended: Using organization and project IDs
client = MemoryClient(
organization='YOUR_ORG_NAME',
project='YOUR_PROJECT_NAME',
org_id='YOUR_ORG_ID',
project_id='YOUR_PROJECT_ID',
)
```
@@ -43,12 +44,15 @@ Example with the mem0 Node.js package:
```javascript
import { MemoryClient } from "mem0ai";
// Recommended: Using organization and project IDs
const client = new MemoryClient({
organization: "YOUR_ORG_NAME",
project: "YOUR_PROJECT_NAME"
orgId: "YOUR_ORG_ID",
projectId: "YOUR_PROJECT_ID"
});
```
> **Note**: The use of `organization` and `project` parameters is deprecated and will be removed in version `0.1.40`. Please use `org_id` and `project_id` (Python) or `orgId` and `projectId` (Node.js) instead.
## Getting Started
To begin using the Mem0 API, you'll need to: