From 843e1ddeaaf741643fa055c5253c42340db59ee3 Mon Sep 17 00:00:00 2001 From: Schaled Date: Sat, 5 Sep 2026 17:11:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs:=201.2.3/1.2.4=20=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E6=9B=B4=E6=96=B0=EF=BC=88zh=20+=20en=20?= =?UTF-8?q?=E9=95=9C=E5=83=8F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - changelog 新增 1.2.3 与 1.2.4 timeline 条目 - model-config: 补充模型级 send_temperature 字段说明 - plugin/tools: 补充工具返回 stop_after_execution 结束 Planner 的行为 - webui/memory-management: 审计时间线入口、调优/导入参数弹窗化与运行状态收纳 - bot-config: 移除已删除的 vector 表达模式选项,注明自动迁移行为 - features/emoji-system: 表情分析提示词接入 Prompt 管理 --- en/changelog/index.md | 16 ++++++++++++++++ en/manual/configuration/bot-config.md | 2 +- en/manual/configuration/model-config.md | 2 ++ en/manual/features/emoji-system.md | 1 + en/manual/webui/memory-management.md | 17 +++++++++++------ en/plugin/tools.md | 16 ++++++++++++++++ zh/changelog/index.md | 16 ++++++++++++++++ zh/manual/configuration/bot-config.md | 2 +- zh/manual/configuration/model-config.md | 2 ++ zh/manual/features/emoji-system.md | 1 + zh/manual/webui/memory-management.md | 17 +++++++++++------ zh/plugin/tools.md | 16 ++++++++++++++++ 12 files changed, 94 insertions(+), 14 deletions(-) diff --git a/en/changelog/index.md b/en/changelog/index.md index b18939f..9b86f81 100644 --- a/en/changelog/index.md +++ b/en/changelog/index.md @@ -2,6 +2,22 @@ For dev and detailed changelogs, see [GitHub Releases](https://github.com/MaiM-with-u/MaiBot/releases). +::: timeline 2026-09-01 +- [1.2.4] Plugin tools can request ending the Planner after execution; models can stop sending the temperature parameter; WebUI [1.7.3] merges MaiMai Observation into the chat workspace and streamlines memory management +- Maisaka: when a plugin tool returns `stop_after_execution: true` successfully, the Planner ends after the current tool batch finishes and waits for new messages +- Models: model advanced settings add a "Send temperature parameter" switch (`send_temperature`, on by default); when off, MaiBot no longer sends any MaiBot-managed temperature — model-level, task-level, or from extra parameters — for compatibility with models that reject this parameter +- WebUI [1.7.3]: the standalone "MaiMai Observation" page merges into the chat workspace; the sidebar now shows chattable sessions and read-only chat streams (marked with an "Observing" badge) in one place, and clicking a chat stream opens its reasoning timeline inline +- WebUI [1.7.3]: long-term memory run status moves into the "More actions" menu, simplifying the top of the memory management page; tuning parameters and import common/advanced parameters collapse into dialogs; the audit timeline layout is adjusted — the audit scope now spans the full row and change summaries merge into the event list +- WebUI [1.7.3]: emoji keyword-recognition prompts integrate into the "Prompt Management" page, with per-language editing, custom versions, and hot reload +- Long-term memory: multiple fixes for person profile refresh, authoritative fact and alias maintenance, and memory import/audit flows; no config changes +::: + +::: timeline 2026-08-23 +- [1.2.3] Expression config compatibility fix and Maisaka orphan tool message fix +- Expressions: fixed startup failures when an old config still used the `vector` selection mode; after upgrading, the first launch auto-migrates it to `vector_intent` (Super Fine) and writes the config back +- Maisaka: fixed orphan tool messages +::: + ::: timeline 2026-08-23 - [1.2.2] Expression selection performance and accuracy improved; WebUI resource management and model config experience comprehensively upgraded - Expressions: MMR diversity reranking rewritten with vectorized implementation, significantly faster on large candidate pools; adjusted vector similarity weight mix, removed lexical overlap scoring to avoid false interference on short texts and CJK content; removed `vector` selection mode, existing configs auto-upgrade to `vector_intent` diff --git a/en/manual/configuration/bot-config.md b/en/manual/configuration/bot-config.md index aea7bd6..7649ba9 100644 --- a/en/manual/configuration/bot-config.md +++ b/en/manual/configuration/bot-config.md @@ -393,7 +393,7 @@ expression_groups = [] **`expression_self_reflect`** — Expression learning AI review. **Type**: `bool`. **Default**: `true`. AI review before writing. -**`expression_selection_mode`** — Expression selection strategy. **Type**: `str` (enum). **Default**: `"legacy"`. Options: `"legacy"`, `"vector"`, `"vector_intent"`. +**`expression_selection_mode`** — Expression selection strategy. **Type**: `str` (enum). **Default**: `"legacy"`. Options: `"legacy"` (casual), `"vector_intent"` (super fine, requires an embedding model). The old `"vector"` mode has been removed; after upgrading, the first launch auto-migrates it to `"vector_intent"` and writes the config back. **`expression_vector_index_path`** — Expression vector index path. Relative paths resolve against the project root. diff --git a/en/manual/configuration/model-config.md b/en/manual/configuration/model-config.md index 264ec80..7ca8237 100644 --- a/en/manual/configuration/model-config.md +++ b/en/manual/configuration/model-config.md @@ -66,6 +66,7 @@ cache_price_in = 0.0 # [Optional] Cache hit input price, price_out = 2.0 # [Optional] Output price, unit: CNY/M token # temperature = 0.7 # [Optional] Model-level temperature, overrides temperature in task config # max_tokens = 4096 # [Optional] Model-level max token count, overrides max_tokens in task config +# send_temperature = true # [Optional] Whether to send the MaiBot-managed temperature, true by default; set to false to stop sending model/task temperatures force_stream_mode = false # [Optional] Force stream output mode, set to true if the model does not support non-streaming output visual = false # [Optional] Whether it is a multimodal model (supports visual input) extra_params = {} # [Optional] Extra parameters, see Model Extra Params @@ -78,6 +79,7 @@ extra_params = {} # [Optional] Extra parameters, see - **Required**: `model_identifier` (API identifier), `name` (custom name), `api_provider` (associated provider) - **Pricing**: `price_in` / `price_out` used for statistics, unit is CNY/million tokens. Enable `cache` to separately set `cache_price_in` - **Model-level Override**: `temperature` / `max_tokens` can override task config; if not set, task defaults are used +- **Temperature Send Switch**: `send_temperature` defaults to `true`; set it to `false` (or turn off "Send temperature parameter" in the WebUI model advanced settings) to stop MaiBot from sending any MaiBot-managed temperature for this model (model-level, task-level, and extra parameters), compatible with models that reject this parameter - **Vision**: `visual = true` indicates support for image input, used for `vlm` tasks - **`extra_params`**: Provider-specific parameters (thinking mode, reasoning intensity, etc.), see [Model Extra Params](./model-extra-params.md) diff --git a/en/manual/features/emoji-system.md b/en/manual/features/emoji-system.md index 67224c2..2714b18 100644 --- a/en/manual/features/emoji-system.md +++ b/en/manual/features/emoji-system.md @@ -60,6 +60,7 @@ MaiBot: (This sticker is so funny, saved!) - Uses AI to recognize sticker content - Analyzes the expressed emotion - Automatically generates tags +- The analysis prompt can be edited per language and saved as custom versions in the WebUI "Prompt Management" page, with hot reload ### 2️⃣ Categorization & Organization **Categorize by Emotion** diff --git a/en/manual/webui/memory-management.md b/en/manual/webui/memory-management.md index 5ed3b12..64763a1 100644 --- a/en/manual/webui/memory-management.md +++ b/en/manual/webui/memory-management.md @@ -34,13 +34,19 @@ Like a mind map, displaying relationships between concepts: - Lines indicate relationships (e.g., "Genshin Impact - Game") - Click a circle to view detailed information +### Audit Timeline +Review memory changes for each chat stream: +- Memory audit events (additions, updates, deletions, etc.) are listed in reverse chronological order with pagination +- Filter by chat stream and event type +- Change summaries are merged directly into the event list + ## Manage Memories ### Add Memories You can manually teach MaiBot new knowledge: 1. Click "Import Memory" 2. Paste text or upload a file -3. Select the processing method +3. Set common and advanced parameters in the "Import Parameters" dialog as needed 4. Start the import ### Correct Memories @@ -85,13 +91,12 @@ Especially important content can be set as permanent: - This content will never be automatically cleaned ### Memory Tuning -If MaiBot's memory performance is poor, you can: -- Adjust memory parameters -- Re-process memories -- Optimize retrieval effects +If MaiBot's memory performance is poor, you can run tuning tasks to optimize retrieval: +- The page keeps only the instructions and the start button as permanent content +- Tuning parameters live in the "Tuning Parameters" dialog; they only affect the next tuning task, so keeping the defaults is fine ### Runtime Maintenance -The WebUI also provides operational entry points for runtime self-check, auto-save toggle, vector reconstruction, paragraph vector backfill, import task logs, and deletion operation records. +The WebUI also provides operational entry points for runtime self-check, auto-save toggle, vector reconstruction, paragraph vector backfill, import task logs, and deletion operation records. The "More actions" menu in the top-right corner centralizes memory run status (including vector reconstruction and data refresh), keeping the page header cleaner. ## Usage Recommendations diff --git a/en/plugin/tools.md b/en/plugin/tools.md index e93379f..b171bee 100644 --- a/en/plugin/tools.md +++ b/en/plugin/tools.md @@ -157,6 +157,22 @@ The return value of a Tool handler is returned to the LLM as the tool execution The LLM decides the next step based on the return value (e.g., replying to the user, calling other tools, etc.). +When returning a `dict`, you may also include the boolean field **`stop_after_execution`** — set it to `true` to request ending the current Planner run after the whole tool batch finishes, and wait for new messages before continuing: + +- Takes effect only when the tool **succeeds**; if any successful result in the same batch carries `true`, it applies +- The field must be a boolean; any other type makes this tool call be treated as a failure +- When omitted, it defaults to `false` and behavior is unchanged + +::: code-group + +```python [Python ~vscode-icons:file-type-python~] +async def handle_shutdown(self, stream_id: str, **kwargs): + await self.ctx.send.text("本轮操作已完成。", stream_id) + return {"success": True, "stop_after_execution": True} +``` + +::: + ### Returning Images and Other Media If a Tool needs to pass an image to Maisaka for further observation or reasoning, do not embed base64 images directly into `content`. It is recommended to return `dict`, placing the text for the LLM to read in `content` and the image itself in `content_items`: diff --git a/zh/changelog/index.md b/zh/changelog/index.md index 736b02f..ddb260b 100644 --- a/zh/changelog/index.md +++ b/zh/changelog/index.md @@ -1,5 +1,21 @@ # 更新日志 +::: timeline 2026-09-01 +- [1.2.4] 插件工具支持执行后结束 Planner,模型可关闭 temperature 参数发送,WebUI [1.7.3] 麦麦观察并入聊天工作区、记忆管理交互精简 +- Maisaka:插件工具成功返回 `stop_after_execution: true` 时,在当前工具批次执行完成后结束 Planner,并等待新消息再继续 +- 模型:模型高级设置新增"发送 temperature 参数"开关(`send_temperature`,默认开启);关闭后不再发送由 MaiBot 管理的模型温度、任务温度与附加参数中的 temperature,兼容不接受该参数的模型 +- WebUI [1.7.3]:原独立"麦麦观察"页合并进聊天工作区,侧边栏统一展示可聊天会话与只读聊天流(带"观察"标识),点击聊天流即可在内嵌时间线查看对应推理过程 +- WebUI [1.7.3]:长期记忆运行状态收进"更多操作"菜单,精简记忆管理页面顶部布局;调优参数与导入公共/高级参数收纳进弹窗;审计时间线布局调整,审计范围整行展示,变动摘要合并进事件列表 +- WebUI [1.7.3]:表情包关键词识别提示词接入"Prompt 管理"页面,支持按语言编辑、创建自定义版本并热加载生效 +- 长期记忆:修复人物画像刷新、权威事实与人物别名维护、记忆导入与审计流程中的多项问题,无配置变更 +::: + +::: timeline 2026-08-23 +- [1.2.3] 表达方式配置兼容性修复与 Maisaka 孤儿工具消息修复 +- 表达方式:修复旧配置仍使用 `vector` 选择模式导致无法启动的问题,升级后首次启动自动迁移为 `vector_intent`(超级精细)并写回配置文件 +- Maisaka:修复孤儿 tool 消息的情况 +::: + ::: timeline 2026-08-23 - [1.2.2] 表达选取性能与准确性优化,WebUI 资源管理与模型配置体验全面升级 - 表达方式:MMR 多样性重排改为向量化实现,大候选池下速度显著提升;调整向量相似度权重配比,去除词面重合打分以避免短文本与 CJK 场景误干扰;移除 `vector`(精细)模式,原有配置自动升级为 `vector_intent`(超级精细) diff --git a/zh/manual/configuration/bot-config.md b/zh/manual/configuration/bot-config.md index 42b2a33..ee9152a 100644 --- a/zh/manual/configuration/bot-config.md +++ b/zh/manual/configuration/bot-config.md @@ -393,7 +393,7 @@ expression_groups = [] **`expression_self_reflect`** — 表达学习 AI 审核。**类型**:`bool`。**默认值**:`true`。写入前进行 AI 审核。 -**`expression_selection_mode`** — 表达选择策略。**类型**:`str`(枚举)。**默认值**:`"legacy"`。可选 `"legacy"`、`"vector"`、`"vector_intent"`。 +**`expression_selection_mode`** — 表达选择策略。**类型**:`str`(枚举)。**默认值**:`"legacy"`。可选 `"legacy"`(随手)、`"vector_intent"`(超级精细,需要配置嵌入模型)。旧配置中的 `"vector"` 模式已移除,升级后首次启动会自动迁移为 `"vector_intent"` 并写回配置文件。 **`expression_vector_index_path`** — 表达向量索引路径。相对路径按项目根目录解析。 diff --git a/zh/manual/configuration/model-config.md b/zh/manual/configuration/model-config.md index eb7c1f7..c2ffefe 100644 --- a/zh/manual/configuration/model-config.md +++ b/zh/manual/configuration/model-config.md @@ -66,6 +66,7 @@ cache_price_in = 0.0 # [可选] 缓存命中输入价格 price_out = 2.0 # [可选] 输出价格,单位:元/M token # temperature = 0.7 # [可选] 模型级别温度,会覆盖任务配置中的 temperature # max_tokens = 4096 # [可选] 模型级别最大 token 数,会覆盖任务配置中的 max_tokens +# send_temperature = true # [可选] 是否发送 MaiBot 管理的 temperature,默认 true;设为 false 后模型/任务温度均不发送 force_stream_mode = false # [可选] 强制流式输出模式,模型不支持非流式输出时设为 true visual = false # [可选] 是否为多模态模型(支持视觉输入) extra_params = {} # [可选] 额外参数,详见 模型额外参数 @@ -78,6 +79,7 @@ extra_params = {} # [可选] 额外参数,详见 - **必填**:`model_identifier`(API 标识符)、`name`(自定义名称)、`api_provider`(归属服务商) - **价格**:`price_in` / `price_out` 用于统计,单位 元/百万 token。开启 `cache` 后可单独设置 `cache_price_in` - **模型级覆盖**:`temperature` / `max_tokens` 可覆盖任务配置,不设则使用任务默认值 +- **温度发送开关**:`send_temperature` 默认 `true`;设为 `false`(对应 WebUI 模型高级设置中关闭"发送 temperature 参数")后,MaiBot 不再向该模型发送任何由它管理的 temperature(模型级、任务级与附加参数中的温度),兼容不接受该参数的模型 - **视觉**:`visual = true` 表示支持图像输入,用于 `vlm` 任务 - **`extra_params`**:服务商特有参数(思考模式、推理强度等),详见 [模型额外参数](./model-extra-params.md) diff --git a/zh/manual/features/emoji-system.md b/zh/manual/features/emoji-system.md index 2286f04..f883c63 100644 --- a/zh/manual/features/emoji-system.md +++ b/zh/manual/features/emoji-system.md @@ -60,6 +60,7 @@ MaiBot:(这个表情好有趣,收藏了!) - 用 AI 识别表情包内容 - 分析表达的情绪 - 自动生成标签 +- 分析提示词可在 WebUI"Prompt 管理"页面按语言编辑、保存自定义版本,热加载生效 ### 2️⃣ 分类整理 **按情绪分类** diff --git a/zh/manual/webui/memory-management.md b/zh/manual/webui/memory-management.md index 2c27ced..8a3096a 100644 --- a/zh/manual/webui/memory-management.md +++ b/zh/manual/webui/memory-management.md @@ -35,13 +35,19 @@ MaiBot 会记住聊天内容,就像人的记忆一样。你可以在 WebUI 里 - 连线表示关系(比如"原神-游戏") - 点击圆圈看详细信息 +### 审计时间线 +核对每个聊天流的记忆变动: +- 按时间倒序分页展示记忆审计事件(新增、更新、删除等) +- 可按聊天流和事件类型筛选 +- 变动摘要直接合并在事件列表中 + ## 管理记忆 ### 添加记忆 可以手动教 MaiBot 新知识: 1. 点击"导入记忆" 2. 粘贴文本或上传文件 -3. 选择处理方式 +3. 按需在"导入参数"弹窗中设置公共与高级参数 4. 开始导入 ### 纠正记忆 @@ -86,13 +92,12 @@ MaiBot 会给每个用户建立"画像": - 这些内容永远不会被自动清理 ### 记忆调优 -如果 MaiBot 记性不好,可以: -- 调整记忆参数 -- 重新处理记忆 -- 优化检索效果 +如果 MaiBot 记性不好,可以运行调优任务优化检索效果: +- 页面常驻内容只保留说明与开始按钮 +- 调优参数收在"调优参数"弹窗里,只影响下一次调优任务,一般保持默认即可 ### 运行时维护 -WebUI 还提供运行时自检、自动保存开关、向量重建、段落向量回填、导入任务和删除操作记录等运维入口。 +WebUI 还提供运行时自检、自动保存开关、向量重建、段落向量回填、导入任务和删除操作记录等运维入口。页面右上角的"更多操作"菜单集中了记忆运行状态查看(含向量重建与刷新数据),页面顶部布局更简洁。 ## 使用建议 diff --git a/zh/plugin/tools.md b/zh/plugin/tools.md index 1c48f10..0fca075 100644 --- a/zh/plugin/tools.md +++ b/zh/plugin/tools.md @@ -158,6 +158,22 @@ Tool 处理函数的返回值会作为工具执行结果返回给 LLM。返回 LLM 会根据返回值决定下一步操作(如向用户回复、调用其他工具等)。 +返回 `dict` 时还可携带布尔字段 **`stop_after_execution`** —— 置为 `true` 表示请求在当前工具批次全部执行完成后结束本轮 Planner,等待新消息再继续: + +- 仅当工具**执行成功**时生效;同一批次内任意一个成功结果携带 `true` 即生效 +- 该字段必须为布尔值,返回其他类型会导致这次工具调用按失败处理 +- 缺省(不返回该字段)时视为 `false`,行为不变 + +::: code-group + +```python [Python ~vscode-icons:file-type-python~] +async def handle_shutdown(self, stream_id: str, **kwargs): + await self.ctx.send.text("本轮操作已完成。", stream_id) + return {"success": True, "stop_after_execution": True} +``` + +::: + ### 返回图片和其他媒体 如果 Tool 需要把图片交给 Maisaka 继续观察或推理,不要把图片 base64 直接塞进 `content`。推荐返回 `dict`,将给 LLM 阅读的文字放在 `content`,将图片本体放在 `content_items`: From 768c98efd3662d67b8355808cba646f399da4ef8 Mon Sep 17 00:00:00 2001 From: Schaled Date: Sat, 5 Sep 2026 17:25:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?ci:=20=E4=BF=AE=E6=AD=A3=20docs-build=20?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E7=9A=84=E7=BC=93=E5=AD=98=E4=B8=8E?= =?UTF-8?q?=E4=BA=A7=E7=89=A9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VitePress 源码位于仓库根目录而非 docs/ 子目录,原路径抄自 docs/ 布局项目: 构建产物实际输出在 .vitepress/dist,导致校验步骤在构建成功后仍必失败。 同步修正 transform cache 路径与 hashFiles 范围、失败产物上传路径。 --- .github/workflows/docs-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index 0af5bd9..1402abb 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -36,8 +36,8 @@ jobs: - name: Cache VitePress transform cache uses: actions/cache@v4 with: - path: docs/.vitepress/cache - key: vitepress-cache-${{ runner.os }}-${{ hashFiles('docs/**', 'pnpm-lock.yaml') }} + path: .vitepress/cache + key: vitepress-cache-${{ runner.os }}-${{ hashFiles('zh/**', 'en/**', 'public/**', '.vitepress/**', 'pnpm-lock.yaml') }} restore-keys: | vitepress-cache-${{ runner.os }}- @@ -51,8 +51,8 @@ jobs: - name: Verify build output run: | - test -f docs/.vitepress/dist/index.html || { - echo "Missing docs/.vitepress/dist/index.html" + test -f .vitepress/dist/index.html || { + echo "Missing .vitepress/dist/index.html" exit 1 } @@ -61,6 +61,6 @@ jobs: uses: actions/upload-artifact@v4 with: name: docs-dist-failed - path: docs/.vitepress/dist + path: .vitepress/dist if-no-files-found: ignore retention-days: 3 \ No newline at end of file