Skip to content

feat: add keyword search#1073

Merged
CaralHsi merged 12 commits intoMemTensor:dev-20260209-v2.0.6from
hijzy:dev2
Feb 11, 2026
Merged

feat: add keyword search#1073
CaralHsi merged 12 commits intoMemTensor:dev-20260209-v2.0.6from
hijzy:dev2

Conversation

@hijzy
Copy link
Collaborator

@hijzy hijzy commented Feb 10, 2026

Description

Add keyword search
Related Issue (Required): Feat #1072

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Test Script Or Test Steps (please provide)
import os
import requests
import json

os.environ["MEMOS_API_KEY"] = "YOUR_API_KEY"
os.environ["MEMOS_BASE_URL"] = "https://memos.memtensor.cn/api/openmem/v1"

data = {
  "query": "我国庆想出去玩,帮我推荐个没去过的城市,以及没住过的酒店品牌",
  "user_id": "memos_user_123",
  "conversation_id": "0928",
}
headers = {
  "Content-Type": "application/json",
  "Authorization": f"Token {os.environ['MEMOS_API_KEY']}"
}
url = f"{os.environ['MEMOS_BASE_URL']}/search/memory"

res = requests.post(url=url, headers=headers, data=json.dumps(data))

print(f"result: {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 88bdf9a into MemTensor:dev-20260209-v2.0.6 Feb 11, 2026
16 checks passed
lailoo pushed a commit to lailoo/MemOS that referenced this pull request Feb 13, 2026
* feat: add keyword search

* test: 按照 top_k 截断 keyword 路检索而不是 top6

* fix: 修复 cot embedding 顺序问题, 修复阈值筛选偏好记忆可能误删的问题

* feat: 强保语义和关键词路 top1

* fix: 使用 keyword_score 而不是 relativity 作为关键词路强保判断依据

* feat: 两路 top1 参与 mmr 计算但是不会被淘汰

* revert and 使用 http bge reranker

* Revert "fix: 修复 cot embedding 顺序问题, 修复阈值筛选偏好记忆可能误删的问题"

This reverts commit 27967fe.

* fix: 修复 query embedding 顺序问题和偏好记忆的相关的分数字段错误

* revert

* reformat

---------

Co-authored-by: CaralHsi <caralhsi@gmail.com>
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