docs: add usage of select_knowledgebase in plugin development docs#7115
Conversation
在插件配置文档中添加 select_knowledgebase 的说明(返回 list, 支持多选),并列出 AstrBot Core 内部使用的其他 _special 值供参考。
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Since you’re now exposing internal
_specialvalues likeselect_providers,provider_pool, etc., consider explicitly stating whether these are stable/public or internal/subject-to-change to avoid plugin authors depending on unsupported interfaces.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since you’re now exposing internal `_special` values like `select_providers`, `provider_pool`, etc., consider explicitly stating whether these are stable/public or internal/subject-to-change to avoid plugin authors depending on unsupported interfaces.
## Individual Comments
### Comment 1
<location path="docs/en/dev/star/guides/plugin-config.md" line_range="73" />
<code_context>
+> [!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:

</code_context>
<issue_to_address>
**suggestion (typo):** Consider rephrasing "present the following effect" to a more natural English expression.
The phrasing is understandable but slightly awkward. Consider alternatives like "it will have the following effect" or "it will display as follows" for more natural wording.
```suggestion
Using `select_provider` as an example, it will display as follows:
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Code Review
This pull request updates the plugin configuration documentation in both English and Chinese to include the select_knowledgebase special field and provides a list of internal _special values used by AstrBot Core. Feedback was provided to clarify the meaning of the wildcard in the select_agent_runner_provider:* field to prevent developer confusion.
| - `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:*`. |
There was a problem hiding this comment.
为了让文档更清晰,建议在此处说明 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:*`. | |
| > 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 wildcard for the agent runner subtype). |
| - `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` 值,供参考。 |
There was a problem hiding this comment.
为了让文档更清晰,建议在此处说明 select_agent_runner_provider:* 中通配符 * 的含义,避免开发者产生困惑。
| > 此外,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` 值,供参考。 |
There was a problem hiding this comment.
Pull request overview
Updates the plugin configuration documentation to reflect current _special capabilities, especially select_knowledgebase, so plugin authors can rely on accurate WebUI behavior.
Changes:
- Documented
select_knowledgebaseunder_special, including that it returns alistand supports multi-select. - Added a reference list of additional internal/reserved
_specialvalues used/supported by AstrBot.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/zh/dev/star/guides/plugin-config.md | Expands _special documentation with select_knowledgebase and a reference list of additional values. |
| docs/en/dev/star/guides/plugin-config.md | English equivalent of the _special documentation expansion, including select_knowledgebase. |
| - `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:*`. |
There was a problem hiding this comment.
In the NOTE, it says AstrBot Core “also uses” provider_pool / persona_pool as _special values, but there are no occurrences of "_special": "provider_pool" or "_special": "persona_pool" in the repo’s config schemas (they appear to be values the Dashboard renderer supports, not necessarily ones Core actively uses). Suggest rewording to “Dashboard supports / reserved for internal use”, or cite an actual Core schema usage. Also, since select_providers is listed here, consider noting it returns a list (multi-select) to prevent misuse.
| > 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, the Dashboard renderer also supports additional internal `_special` values, such as `select_providers`, `provider_pool`, `persona_pool`, `select_plugin_set`, `t2i_template`, `get_embedding_dim`, and `select_agent_runner_provider:*`. These are reserved for AstrBot's own built-in configurations and may change without notice; third-party plugins should avoid relying on them. | |
| > Note: `select_providers` returns a `list` (multi-select), so any schema using it must set `"type": "list"` with an appropriate list default (for example `[]`). |
| - `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` 值,供参考。 |
There was a problem hiding this comment.
这段 NOTE 里提到 AstrBot Core “内部还使用了” provider_pool / persona_pool 作为 _special 值,但目前仓库内未找到任何配置 schema 使用 "_special": "provider_pool" 或 "_special": "persona_pool"(它们更像是 Dashboard 已支持但未必在 Core schema 中实际引用的内部值)。建议:1) 若只是表示 WebUI 支持这些 _special,请改成“Dashboard 支持/内部保留”;或 2) 给出 Core 中实际使用它们的 schema 示例来源。另:既然在此处列出了 select_providers,建议补充其返回值也是 list(多选)以避免误用。
| - `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_knowledgebase`、`select_providers` 的结果为 `list` 类型,支持多选,建议将对应配置项的 `type` 设为 `list`,默认值设为 `[]`。 | |
| > [!NOTE] | |
| > 此外,Dashboard 内部还预留并使用了 `select_providers`、`provider_pool`、`persona_pool`、`select_plugin_set`、`t2i_template`、`get_embedding_dim`、`select_agent_runner_provider:*` 等 `_special` 值,供参考,一般插件开发者可仅关注上文列出的常用值。 |
标注内部 _special 值为不稳定实现,请勿在插件中使用; 说明 select_agent_runner_provider:* 中 * 的含义; 修正英文措辞。
select_knowledgebase in plugin development docs
插件文档select_knowledgebase相关过时且不完整
Modifications / 改动点
在插件配置文档中添加 select_knowledgebase 的说明(返回 list,
支持多选),并列出 AstrBot Core 内部使用的其他 _special 值供参考。
Screenshots or Test Results / 运行截图或测试结果
Checklist / 检查清单
😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
/ 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。
👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
/ 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。
🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in
requirements.txtandpyproject.toml./ 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到
requirements.txt和pyproject.toml文件相应位置。😮 My changes do not introduce malicious code.
/ 我的更改没有引入恶意代码。
Summary by Sourcery
Document additional
_specialfield options for plugin configuration, including behavior ofselect_knowledgebaseand other internally used values in AstrBot Core.Documentation:
select_knowledgebaseis a supported_specialvalue, returning a list and supporting multi-selection for plugin configs in both English and Chinese docs._specialvalues used by AstrBot Core to guide plugin authors beyond the most common options.