[pull] main from supermemoryai:main - #447
Merged
Merged
Conversation
…ly) (#1367) ### TL;DR Documents the new `ids` parameter for the `forget-matching` endpoint, allowing exact memory deletion without semantic search. ### What changed? The `forget-matching` endpoint now accepts either a `query` (semantic search-based forgetting) or an explicit `ids` list (direct deletion by memory ID) — one or the other must be provided. The docs have been updated to reflect this: - The `query` parameter is now marked as `one of*` rather than required, and `ids` is introduced as an alternative with the same mutual-exclusivity constraint. - `threshold` is clarified as applying to `query` mode only. - Code examples for both JavaScript and cURL now show the recommended two-step pattern: run a `dryRun` with `query`, then apply using the `ids` returned from the preview — avoiding drift if the container changes between steps. - A new `<Tip>` block explains why passing `ids` on the apply step produces a more deterministic delete than re-running the `query`. ### How to test? 1. Call `forget-matching` with `dryRun: true` and a `query` to retrieve candidate `id`s. 2. Re-call with `dryRun: false` and the `ids` from step 1 to confirm only those exact memories are forgotten. 3. Verify that passing `ids` belonging to a different `containerTag` are ignored. 4. Confirm that providing both `query` and `ids`, or neither, returns an appropriate validation error. ### Why make this change? Re-running a `query` on the apply step can produce different results if the container was modified between the preview and the apply. Exposing `ids` as a first-class parameter lets callers pin the delete to exactly the set they reviewed, making bulk forgetting safer and more predictable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )