From dd04753f1a974183030da6cecccaf0bdd2dfb032 Mon Sep 17 00:00:00 2001 From: Victor Giordani Date: Sat, 23 May 2026 00:23:58 +0200 Subject: [PATCH 1/2] docs: clarify API search filter description --- src/memos/api/product_models.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/memos/api/product_models.py b/src/memos/api/product_models.py index 049ca544a..62185b8e9 100644 --- a/src/memos/api/product_models.py +++ b/src/memos/api/product_models.py @@ -400,18 +400,13 @@ class APISearchRequest(BaseRequest): ) # ==== Filter conditions ==== - # TODO: maybe add detailed description later filter: dict[str, Any] | None = Field( None, - description=""" - Filter for the memory, example: - { - "`and` or `or`": [ - {"id": "uuid-xxx"}, - {"created_at": {"gt": "2024-01-01"}}, - ] - } - """, + description=( + "Optional structured metadata filter for narrowing memory search results. " + "Supports logical operators such as `and` and `or`, and field conditions " + "such as id and created_at ranges. None means no metadata filter is applied." + ), ) # ==== Extended capabilities ==== From 6abbf8f1c0377be0d98db324e412e06c1e6d7740 Mon Sep 17 00:00:00 2001 From: Victor Giordani <112464371+VictorGTheCoder@users.noreply.github.com> Date: Sat, 23 May 2026 00:31:30 +0200 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/memos/api/product_models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/memos/api/product_models.py b/src/memos/api/product_models.py index 62185b8e9..d2334bdcf 100644 --- a/src/memos/api/product_models.py +++ b/src/memos/api/product_models.py @@ -404,8 +404,10 @@ class APISearchRequest(BaseRequest): None, description=( "Optional structured metadata filter for narrowing memory search results. " - "Supports logical operators such as `and` and `or`, and field conditions " - "such as id and created_at ranges. None means no metadata filter is applied." + "Supports logical operators such as `and` and `or`, plus field-level " + "operator objects. Example: " + '`{"and": [{"field_name": {"eq": "value"}}, {"other_field": {"gte": 10}}]}`. ' + "None means no metadata filter is applied." ), )