Skip to content

fix: Preference search results hide project_id / operation / manager_user_id in info #1089

@CaralHsi

Description

@CaralHsi

Pre-submission checklist | 提交前检查

  • I have searched existing issues and this hasn't been mentioned before | 我已搜索现有问题,确认此问题尚未被提及
  • I have read the project documentation and confirmed this issue doesn't already exist | 我已阅读项目文档并确认此问题尚未存在
  • This issue is specific to MemOS and not a general software issue | 该问题是针对 MemOS 的,而不是一般软件问题

Bug Description | 问题描述

When searching preference memories via /search, some fields only appear in metadata.info:
project_id
operation
manager_user_id
They are not exposed on the top-level of metadata, so callers must dig into info.

How to Reproduce | 如何重现

data = {
"user_id": user_id,
"writable_cube_ids": [cube_id],
"messages": [
{
"role": "user",
"content": "我偏好住贵的酒店 不要再给我推荐全季了",
"message_id": "u-1"
},
{
"role": "assistant",
"content": "好的 我会记住你的偏好,下次 我就会给你推荐贵的酒店",
"message_id": "u-1"
}
],
"info": {"source_type": "batch_import"},
"include_preference": True,
"async_mode": "sync",
"mode": "fine",
"manager_user_id": "mock_manager_id_xcyyyyyy",
"project_id": "mock_project_id_xcyyyyyy"
}
call(ADD_URL, data, "conversation")

Search for the weather query we just added

search_data = {
"user_id": user_id,
"mem_cube_id": cube_id,
"query": "我今天看什么了",
"top_k": 5,
"include_preference": True
}
call(SEARCH_URL, search_data, "search_weather_query")

data = {
"user_id": user_id,
"mem_cube_id": cube_id,
"include_preference": True
}
call(GET_URL, data, "get")

Environment | 环境信息

2.0.6

Additional Context | 其他信息

No response

Willingness to Implement | 实现意愿

  • I'm willing to implement this myself | 我愿意自己解决
  • I would like someone else to implement this | 我希望其他人来解决

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpendingPending items to be addressed | 待解决事项。

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions