Memories
Update a memory
PATCH /v1/memories/{id}- Permission
write:memories- Tokens
- API key, CLI user token, Session token
Replace the content of a memory. Send if_sha256 to change it only if nothing has changed it since you read it. A memory that is a file in GitHub returns 409 and is changed by editing the file.
Path parameters
idstringrequired
Query parameters
if_sha256string
Make the change only if the memory's `content_sha256` still equals this value.
{
"content": str
}
{
}
1
import os
2
3
from ellipsis import Ellipsis
4
5
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
6
7
result = client.memories.update(
8
"...",
9
content="Branches are named `<issue>-<summary>`, in lowercase.\n",
10
)
11
print(result)
1
import { Ellipsis } from '@ellipsis-dev/sdk';
2
3
const client = new Ellipsis({
4
apiKey: process.env.ELLIPSIS_API_TOKEN!,
5
});
6
7
const request: Parameters<typeof client.memories.update>[1] = {
8
content: "Branches are named `<issue>-<summary>`, in lowercase.\n",
9
};
10
11
const result = await client.memories.update('...', request);
12
console.log(result);
1
curl -X PATCH "https://api.ellipsis.dev/v1/memories/{id}" \
2
-H "Authorization: Bearer $ELLIPSIS_API_TOKEN" \
3
-H "Content-Type: application/json" \
4
-d '{
5
"content": "Branches are named `<issue>-<summary>`, in lowercase.\n"
6
}'
Request
contentstring
The content that replaces the memory's current content.
Response
memoryMemoryrequired
The memory.