Skip to content

Conversation

@endxxxx
Copy link
Collaborator

@endxxxx endxxxx commented Feb 11, 2026

Description

When retrieving preference memories, the filter field supports queries in hours, minutes, and seconds.

Related Issue (Required): Fixes #1075

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Test Script Or Test Steps (please provide)
def get_memory():
    data = {
      "user_id": user_id,
      "filter": {
          "and": [
              {
                  "create_time": {
                      "gte": "2026-01-01 20:01:39" # add hours, minutes, and seconds
                  }  
              }
          ] 
      },
      "include_preference": True,
      "include_tool_memory": True,
      "page": 1,
      "page_size": 10
    }
    headers = {
        "Content-Type": "application/json",
        "Authorization": f"Token {os.environ['MEMOS_API_KEY']}"
    }
    url = f"{os.environ['MEMOS_BASE_URL']}/get/memory"
    
    res = requests.post(url=url, headers=headers, data=json.dumps(data))

    return res.json()

Checklist

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have created related documentation issue/PR in MemOS-Docs (if applicable) | 我已在 MemOS-Docs 中创建了相关的文档 issue/PR(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

Reviewer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed
  • Tests have been provided

@CaralHsi CaralHsi merged commit c7e4cda into MemTensor:dev-20260209-v2.0.6 Feb 11, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants