Doc: update timestamp (#2638)

This commit is contained in:
Dev Khant
2025-05-06 17:39:31 +05:30
committed by GitHub
parent ec1d7a45d3
commit 02a2b59555

View File

@@ -39,9 +39,16 @@ When adding new memories, you can specify a custom timestamp to indicate when th
<CodeGroup> <CodeGroup>
```python Python ```python Python
import os
import time import time
from datetime import datetime, timedelta from datetime import datetime, timedelta
from mem0 import MemoryClient
os.environ["MEM0_API_KEY"] = "your-api-key"
client = MemoryClient()
# Get the current time # Get the current time
current_time = datetime.now() current_time = datetime.now()
@@ -56,6 +63,9 @@ client.add("I'm travelling to SF", user_id="user1", timestamp=unix_timestamp)
``` ```
```javascript JavaScript ```javascript JavaScript
import MemoryClient from 'mem0ai';
const client = new MemoryClient({ apiKey: 'your-api-key' });
// Get the current time // Get the current time
const currentTime = new Date(); const currentTime = new Date();