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",