Skip to content

feat: add upload skill logic#1507

Merged
CaralHsi merged 1 commit intoMemTensor:dev-v2.0.14from
Wang-Daoji:feat/upload_skill
Apr 21, 2026
Merged

feat: add upload skill logic#1507
CaralHsi merged 1 commit intoMemTensor:dev-v2.0.14from
Wang-Daoji:feat/upload_skill

Conversation

@Wang-Daoji
Copy link
Copy Markdown
Collaborator

@Wang-Daoji Wang-Daoji commented Apr 21, 2026

Description

Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change.

Related Issue (Required): Fixes #1508

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

import time
import json
from memos.api.routers.server_router import add_memories, search_memories
from memos.api.product_models import APIADDRequest, APISearchRequest


if __name__ == "__main__":
    user_id = f"test_user_{time.time()}"

    readable_cube_ids = [user_id] 
    add_req = APIADDRequest(
        user_id=user_id,
        writable_cube_ids=readable_cube_ids,
        messages = [
            {
                "type": "file",
                "file": {
                    "file_data": "https://memos-knowledge-base-file-pre.oss-cn-shanghai.aliyuncs.com/memos-memory-guide.zip",
                }
            }
        ],
        async_mode="sync",
        mode="fine",
        info={"sbbbbb": "asdsdadsad", "bhjjjjjjjjjjj": "uuueueueueueueue"},
        session_id="1234567890",
        manager_user_id="super_manager_xxx",
        project_id="super_project_xxx",
        is_upload_skill=True,
    )


    add_rsp = add_memories(add_req)
    print("add_memories rsp: \n\n", add_rsp)

    search_req = APISearchRequest(
        user_id=user_id,
        readable_cube_ids=readable_cube_ids,
        query="memos memory",
        include_preference=True,
        search_tool_memory=True,
        include_skill_memory=True,
    )
    start = time.time()
    search_rsp = search_memories(search_req).data["skill_mem"]
    end = time.time()
    print(f"search_memories cost time: {end - start}")

    print("\n\nsearch_rsp: \n\n", json.dumps(search_rsp, indent=2, ensure_ascii=False))

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit Test
  • Test Script Or Test Steps (please provide)
  • Pipeline Automated API Test (please provide)

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 87cb6e5 into MemTensor:dev-v2.0.14 Apr 21, 2026
16 checks passed
CaralHsi added a commit that referenced this pull request Apr 21, 2026
Revert "feat: add upload skill logic (#1507)"

This reverts commit 87cb6e5.
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