Skip to content

Conversation

@Mozy403
Copy link

@Mozy403 Mozy403 commented Jan 27, 2026

Description

Summary: (summary)

Fix: #(issue)

Docs Issue/PR: (docs-issue-or-pr-link)

Reviewer: @(reviewer)

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 的人

Copilot AI review requested due to automatic review settings January 27, 2026 06:28
@Mozy403 Mozy403 closed this Jan 27, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the server_router_api.py example script to better demonstrate server_router /product/add usage patterns, especially around sync/async modes and multimodal message shapes.

Changes:

  • Added new sync-mode examples for fast and fine pipelines.
  • Reworked multimodal examples into multiple focused variants (image+text, file+text, fine image analysis, fast image save).
  • Added clarifying notes to tool-calling examples and updated the entry-point execution list accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"info": {"source_type": "image_analysis"},
}
call_add_api("example_02c_tool_description_input_output", payload)
call_add_api("example_03_multimodal_text_and_image", payload)
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call_add_api example name is inconsistent with the function name (example_03a_multimodal_text_and_image). This makes logs harder to correlate and breaks the otherwise consistent pattern in this file. Rename the string argument to match the function name (or rename the function back), so the printed "Example:" label is accurate.

Suggested change
call_add_api("example_03_multimodal_text_and_image", payload)
call_add_api("example_03a_multimodal_text_and_image", payload)

Copilot uses AI. Check for mistakes.
def example_02a_assistant_with_tool_calls():
"""
Assistant message containing tool_calls (function calls).
both multi_model_struct and simple_struct memreaders support this format.
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring mentions multi_model_struct, but the repository config uses multimodal_struct (e.g., MEM_READER_BACKEND=multimodal_struct). This is likely a typo and can mislead users trying to run the example. Update the backend name and capitalize the sentence start ("Both ...").

Suggested change
both multi_model_struct and simple_struct memreaders support this format.
Both multimodal_struct and simple_struct memreaders support this format.

Copilot uses AI. Check for mistakes.
Comment on lines 221 to 223
Tool message returning the result of a tool call.
only multi_model_struct memreader supports this format.

Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring mentions multi_model_struct, but the supported backend appears to be multimodal_struct in the codebase. Also, capitalize the sentence start ("Only ...").

Copilot uses AI. Check for mistakes.
Comment on lines +151 to +152
"async_mode": "sync",
"mode": "fast",
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is trailing whitespace on these lines (e.g., after the comma). This will fail the repo’s formatting/lint checks (ruff format / trailing-whitespace hook). Remove the extra spaces.

Copilot uses AI. Check for mistakes.
Comment on lines +169 to +170
"async_mode": "sync",
"mode": "fine",
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace is present on these lines (e.g., after the comma). This will cause formatter/pre-commit checks to fail. Remove the extra spaces.

Copilot uses AI. Check for mistakes.
@Mozy403 Mozy403 changed the title fix: adjust some server_router examples fix: adjust some server_router examples(Should be reviewed by Chenyang Xi) Jan 27, 2026
@Mozy403 Mozy403 reopened this Jan 27, 2026
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.

1 participant