From c11637bd2f645247911430275669c0c8a6a9d21f Mon Sep 17 00:00:00 2001 From: Saket Aryan Date: Fri, 21 Mar 2025 21:23:57 +0530 Subject: [PATCH] Update Node SDK Docs for Update Method (#2418) --- docs/openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/openapi.json b/docs/openapi.json index 4a7213a5..29849bd0 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -1761,7 +1761,7 @@ }, { "lang": "JavaScript", - "source": "const options = {\n method: 'PUT',\n headers: {\n 'Authorization': 'Token ',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n text: 'Your updated memory text here'\n })\n};\n\nfetch('https://api.mem0.ai/v1/memories/{memory_id}/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\n// Update a specific memory\nconst memory_id=\nconst message=\"Your updated memory message here\"\nclient.update(memory_id, message)\n .then(result => console.log(result))\n .catch(error => console.error(error));" }, { "lang": "cURL",