From 9919f30a665b8c09c1e393c57aebcbe45ff1e435 Mon Sep 17 00:00:00 2001 From: piexian <64474352+piexian@users.noreply.github.com> Date: Sun, 29 Mar 2026 05:48:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20=E8=A1=A5=E5=85=85=20select=5Fknowl?= =?UTF-8?q?edgebase=20=E5=8F=8A=20=5Fspecial=20=E5=AD=97=E6=AE=B5=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在插件配置文档中添加 select_knowledgebase 的说明(返回 list, 支持多选),并列出 AstrBot Core 内部使用的其他 _special 值供参考。 --- docs/en/dev/star/guides/plugin-config.md | 10 +++++++++- docs/zh/dev/star/guides/plugin-config.md | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/en/dev/star/guides/plugin-config.md b/docs/en/dev/star/guides/plugin-config.md index 538f872b9a..9fdabc9b35 100644 --- a/docs/en/dev/star/guides/plugin-config.md +++ b/docs/en/dev/star/guides/plugin-config.md @@ -62,7 +62,15 @@ When the code editor is enabled, it looks like this: ![editor_mode_fullscreen](https://files.astrbot.app/docs/source/images/plugin/image-7.png) -The **_special** field is only available after v4.0.0. Currently supports `select_provider`, `select_provider_tts`, `select_provider_stt`, `select_persona`, allowing users to quickly select model providers, personas, and other data already configured in the WebUI. Results are all strings. Using select_provider as an example, it will present the following effect: +The **_special** field is only available after v4.0.0. Common values include `select_provider`, `select_provider_tts`, `select_provider_stt`, `select_persona`, and `select_knowledgebase`, allowing users to quickly select model providers, personas, knowledge bases, and other data already configured in the WebUI. + +- `select_provider`, `select_provider_tts`, `select_provider_stt`, and `select_persona` return strings. +- `select_knowledgebase` returns a `list` and supports multiple selection, so the corresponding config item should use `type: list` with a default value of `[]`. + +> [!NOTE] +> For reference, AstrBot Core also uses other internal `_special` values, such as `select_providers`, `provider_pool`, `persona_pool`, `select_plugin_set`, `t2i_template`, `get_embedding_dim`, and `select_agent_runner_provider:*`. + +Using `select_provider` as an example, it will present the following effect: ![image](https://files.astrbot.app/docs/source/images/plugin/image-select-provider.png) diff --git a/docs/zh/dev/star/guides/plugin-config.md b/docs/zh/dev/star/guides/plugin-config.md index 26077c1426..3c52e2616f 100644 --- a/docs/zh/dev/star/guides/plugin-config.md +++ b/docs/zh/dev/star/guides/plugin-config.md @@ -62,7 +62,15 @@ AstrBot 提供了“强大”的配置解析和可视化功能。能够让用户 ![editor_mode_fullscreen](https://files.astrbot.app/docs/source/images/plugin/image-7.png) -**_special** 字段仅 v4.0.0 之后可用。目前支持填写 `select_provider`, `select_provider_tts`, `select_provider_stt`, `select_persona`,用于让用户快速选择用户在 WebUI 上已经配置好的模型提供商、人设等数据。结果均为字符串。以 select_provider 为例,将呈现以下效果: +**_special** 字段仅 v4.0.0 之后可用。常用可填写值包括 `select_provider`, `select_provider_tts`, `select_provider_stt`, `select_persona`, `select_knowledgebase`,用于让用户快速选择在 WebUI 上已经配置好的模型提供商、人设、知识库等数据。 + +- `select_provider`、`select_provider_tts`、`select_provider_stt`、`select_persona` 的结果为字符串。 +- `select_knowledgebase` 的结果为 `list` 类型,支持多选,建议将对应配置项的 `type` 设为 `list`,默认值设为 `[]`。 + +> [!NOTE] +> 此外,AstrBot Core 内部还使用了 `select_providers`、`provider_pool`、`persona_pool`、`select_plugin_set`、`t2i_template`、`get_embedding_dim`、`select_agent_runner_provider:*` 等 `_special` 值,供参考。 + +以 `select_provider` 为例,将呈现以下效果: ![image](https://files.astrbot.app/docs/source/images/plugin/image-select-provider.png) From 92dcaefe3205243b10ebe24d9a208b9a07beed12 Mon Sep 17 00:00:00 2001 From: piexian <64474352+piexian@users.noreply.github.com> Date: Sun, 29 Mar 2026 05:59:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20=E4=BC=98=E5=8C=96=20=5Fspecial=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=96=87=E6=A1=A3=E8=A1=A8=E8=BE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 标注内部 _special 值为不稳定实现,请勿在插件中使用; 说明 select_agent_runner_provider:* 中 * 的含义; 修正英文措辞。 --- docs/en/dev/star/guides/plugin-config.md | 4 ++-- docs/zh/dev/star/guides/plugin-config.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/dev/star/guides/plugin-config.md b/docs/en/dev/star/guides/plugin-config.md index 9fdabc9b35..3bb6811415 100644 --- a/docs/en/dev/star/guides/plugin-config.md +++ b/docs/en/dev/star/guides/plugin-config.md @@ -68,9 +68,9 @@ The **_special** field is only available after v4.0.0. Common values include `se - `select_knowledgebase` returns a `list` and supports multiple selection, so the corresponding config item should use `type: list` with a default value of `[]`. > [!NOTE] -> For reference, AstrBot Core also uses other internal `_special` values, such as `select_providers`, `provider_pool`, `persona_pool`, `select_plugin_set`, `t2i_template`, `get_embedding_dim`, and `select_agent_runner_provider:*`. +> For reference, AstrBot Core also uses other internal `_special` values, such as `select_providers`, `provider_pool`, `persona_pool`, `select_plugin_set`, `t2i_template`, `get_embedding_dim`, and `select_agent_runner_provider:*` (where `*` is a placeholder for the runner type). These are internal implementations and may change at any time — please avoid using them in plugins. -Using `select_provider` as an example, it will present the following effect: +Using `select_provider` as an example, it will display as follows: ![image](https://files.astrbot.app/docs/source/images/plugin/image-select-provider.png) diff --git a/docs/zh/dev/star/guides/plugin-config.md b/docs/zh/dev/star/guides/plugin-config.md index 3c52e2616f..38e3ee4ad0 100644 --- a/docs/zh/dev/star/guides/plugin-config.md +++ b/docs/zh/dev/star/guides/plugin-config.md @@ -68,7 +68,7 @@ AstrBot 提供了“强大”的配置解析和可视化功能。能够让用户 - `select_knowledgebase` 的结果为 `list` 类型,支持多选,建议将对应配置项的 `type` 设为 `list`,默认值设为 `[]`。 > [!NOTE] -> 此外,AstrBot Core 内部还使用了 `select_providers`、`provider_pool`、`persona_pool`、`select_plugin_set`、`t2i_template`、`get_embedding_dim`、`select_agent_runner_provider:*` 等 `_special` 值,供参考。 +> 此外,AstrBot Core 内部还使用了 `select_providers`、`provider_pool`、`persona_pool`、`select_plugin_set`、`t2i_template`、`get_embedding_dim`、`select_agent_runner_provider:*`(`*` 为运行器类型占位符)等 `_special` 值。这些属于内部实现,随时可能变动,请勿在插件中使用。 以 `select_provider` 为例,将呈现以下效果: