From 02a2b595556751c37406a33a19c0423c690f043c Mon Sep 17 00:00:00 2001 From: Dev Khant Date: Tue, 6 May 2025 17:39:31 +0530 Subject: [PATCH] Doc: update timestamp (#2638) --- docs/features/timestamp.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/features/timestamp.mdx b/docs/features/timestamp.mdx index cd95256b..81333840 100644 --- a/docs/features/timestamp.mdx +++ b/docs/features/timestamp.mdx @@ -39,9 +39,16 @@ When adding new memories, you can specify a custom timestamp to indicate when th ```python Python +import os import time from datetime import datetime, timedelta +from mem0 import MemoryClient + +os.environ["MEM0_API_KEY"] = "your-api-key" + +client = MemoryClient() + # Get the current time current_time = datetime.now() @@ -56,6 +63,9 @@ client.add("I'm travelling to SF", user_id="user1", timestamp=unix_timestamp) ``` ```javascript JavaScript +import MemoryClient from 'mem0ai'; +const client = new MemoryClient({ apiKey: 'your-api-key' }); + // Get the current time const currentTime = new Date();