-
Notifications
You must be signed in to change notification settings - Fork 436
fix: adjust some server_router examples(Should be reviewed by Chenyang Xi) #962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev-20260126-v2.0.4
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -136,6 +136,47 @@ def example_01b_standard_chat_triplet(): | |||||
| call_add_api("example_01b_standard_chat_triplet", payload) | ||||||
|
|
||||||
|
|
||||||
| def example_01c_sync_fast_minimal(): | ||||||
| """ | ||||||
| Sync fast mode example - immediate response required. | ||||||
|
|
||||||
| - async_mode="sync": Blocks until processing completes | ||||||
| - mode="fast": Fast pipeline without LLM call | ||||||
| - Use case: User needs immediate confirmation | ||||||
| """ | ||||||
| payload = { | ||||||
| "user_id": USER_ID, | ||||||
| "writable_cube_ids": [MEM_CUBE_ID], | ||||||
| "messages": "紧急:明天上午10点开会。", | ||||||
| "async_mode": "sync", | ||||||
| "mode": "fast", | ||||||
| } | ||||||
| call_add_api("example_01c_sync_fast_minimal", payload) | ||||||
|
|
||||||
|
|
||||||
| def example_01d_sync_fine_detailed(): | ||||||
| """ | ||||||
| Sync fine mode example - high-quality extraction required. | ||||||
|
|
||||||
| - async_mode="sync": Blocks until processing completes | ||||||
| - mode="fine": Fine pipeline with LLM analysis | ||||||
| - Use case: Important information needs deep understanding | ||||||
| """ | ||||||
| payload = { | ||||||
| "user_id": USER_ID, | ||||||
| "writable_cube_ids": [MEM_CUBE_ID], | ||||||
| "messages": "明年计划去杭州西湖旅游,预算5000元,喜欢安静的酒店。", | ||||||
| "async_mode": "sync", | ||||||
| "mode": "fine", | ||||||
|
Comment on lines
+169
to
+170
|
||||||
| "custom_tags": ["travel", "planning"], | ||||||
| "info": { | ||||||
| "priority": "high", | ||||||
| "source_type": "important_note" | ||||||
| } | ||||||
| } | ||||||
| call_add_api("example_01d_sync_fine_detailed", payload) | ||||||
|
|
||||||
|
|
||||||
| # =========================================================================== | ||||||
| # 2. Tool / function-calling related examples | ||||||
| # =========================================================================== | ||||||
|
|
@@ -144,6 +185,7 @@ def example_01b_standard_chat_triplet(): | |||||
| 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. | ||||||
|
||||||
| both multi_model_struct and simple_struct memreaders support this format. | |
| Both multimodal_struct and simple_struct memreaders support this format. |
Copilot
AI
Jan 27, 2026
There was a problem hiding this comment.
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
AI
Jan 27, 2026
There was a problem hiding this comment.
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.
| call_add_api("example_03_multimodal_text_and_image", payload) | |
| call_add_api("example_03a_multimodal_text_and_image", payload) |
There was a problem hiding this comment.
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.