memories.delete.
A call always covers exactly one user: pass user_id, plus customer_id on a B2B instance. A request that would reach wider than one user is refused.
Python 0.5.5 and later. JavaScript and TypeScript 0.5.6 and later.
Parameters
string
required
What to forget, in the user’s own words. 3 to 500 characters.
string
The user whose memories to search. Optional in the signature, but a call without it is refused (HTTP 400), because a forget must cover exactly one user.
string
The customer the user belongs to. Required on B2B. Not accepted on B2C: passing it is rejected. See B2C vs B2B.
dict[str, str]
The level of your scope ladder to search, named in full, for example
{"customer": "acme", "team": "payments", "user": "dana"}. Only needed when your ladder has a level between customer and user.string
default:"preview"
What happens to the memories that match.
Returns
AForgetResponse.
string
What happened.
string | None
The id of this forget request. In
preview mode, the pending request you approve in the dashboard.list[ForgetCandidate]
The memories the description matched. Each has
memory_id, content, memory_type, and store: "memory", or where a copy of its text lives (chunk, sentence, entity, triple, profile, candidate).list[string]
The memories removed by this call.
list[string]
The memories that could not be removed.
list[string]
On a
partial result, the stores that may still hold the text.bool
true when a search limit stopped the match while it was still finding memories, so the description may cover more than this call reached.Example
Raises
InvalidInputError: the call does not cover exactly one user (HTTP 400), Synap rejected the request (HTTP 422), ordescriptionormodeis invalid (caught before anything is sent).ServiceUnavailableError: the matcher was unavailable (HTTP 503). Nothing was deleted, so it is safe to try again. The SDK retries first, under its normal retry policy.RateLimitError: too many requests (HTTP 429).AuthenticationError: the API key is missing or invalid, orinitialize()has not been called.
See also
- memories.delete: delete one memory by its id
- Erasing a person: remove everything about one person