Skip to content

docs: 完善 _special 配置项说明并补充 select_knowledgebase 返回类型#163

Open
piexian wants to merge 2 commits intoAstrBotDevs:v4from
piexian:docs/select-knowledgebase-multiselect
Open

docs: 完善 _special 配置项说明并补充 select_knowledgebase 返回类型#163
piexian wants to merge 2 commits intoAstrBotDevs:v4from
piexian:docs/select-knowledgebase-multiselect

Conversation

@piexian
Copy link

@piexian piexian commented Mar 6, 2026

  • 补充 select_knowledgebase 返回 list、支持多选
  • 补充 _special 的常用取值及 Core 内部其他取值说明

Summary by Sourcery

在插件配置指南中补充文档,说明额外的 _special 配置选项,并澄清 select_knowledgebase 的返回类型。

文档更新:

  • 说明 select_knowledgebase 返回列表、支持多选,并且在插件配置文档中应与 type: list 和空列表默认值一起使用。
  • 在英文和中文的插件文档中列出常见和内部使用的 _special 值,包括知识库相关,以及各种与 provider 和 pool 相关的选项。
Original summary in English

Summary by Sourcery

Document additional _special configuration options and clarify return types for select_knowledgebase in plugin configuration guides.

Documentation:

  • Explain that select_knowledgebase returns a list, supports multi-select, and should be paired with type: list and an empty list default in plugin config docs.
  • List common and internally used _special values, including knowledge base and various provider- and pool-related options, in both English and Chinese plugin documentation.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求主要更新了 AstrBot 插件配置文档中关于 _special 字段的说明。通过详细阐述 select_knowledgebase 的返回类型和多选功能,并补充了 Core 内部使用的其他 _special 值,旨在为用户提供更准确、更全面的配置指南,从而提升文档的实用性和清晰度。

Highlights

  • select_knowledgebase 返回类型和多选支持: 补充了 select_knowledgebase 的返回类型说明,明确其为 list 类型并支持多选,同时建议配置项使用 type: list 和默认值 []
  • _special 字段常用值扩展: 扩展了 _special 字段的常用值列表,新增了 select_knowledgebase
  • _special 字段内部值补充: 补充了 AstrBot Core 内部使用的其他 _special 值,如 select_providersprovider_poolpersona_pool 等,使文档内容更全面。
Changelog
  • en/dev/star/guides/plugin-config.md
    • 更新了 _special 字段的说明,增加了 select_knowledgebase 并阐明其返回类型为 list 且支持多选。
    • 补充了 AstrBot Core 内部使用的其他 _special 值。
  • zh/dev/star/guides/plugin-config.md
    • 更新了 _special 字段的说明,增加了 select_knowledgebase 并阐明其返回类型为 list 且支持多选。
    • 补充了 AstrBot Core 内部使用的其他 _special 值。
  • zh/dev/star/plugin.md
    • 更新了 _special 字段的说明,增加了 select_knowledgebase 并阐明其返回类型为 list 且支持多选。
    • 补充了 AstrBot Core 内部使用的其他 _special 值。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="zh/dev/star/guides/plugin-config.md" line_range="65" />
<code_context>
 ![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`,默认值设为 `[]`。此外,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)
</code_context>
<issue_to_address>
**suggestion (typo):** 为了让中文读起来更顺畅,避免这句话中连续两次出现“用户”。

这句话中“用户”连续出现两次,显得重复。建议改为“用于让用户快速选择在 WebUI 上已经配置好的模型提供商、人设、知识库等数据。”以提升语句流畅度。

```suggestion
**_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`,默认值设为 `[]`。此外,AstrBot Core 内部还使用了 `select_providers`、`provider_pool`、`persona_pool`、`select_plugin_set`、`t2i_template`、`get_embedding_dim`、`select_agent_runner_provider:*` 等 `_special` 值。以 `select_provider` 为例,将呈现以下效果:
```
</issue_to_address>

### Comment 2
<location path="zh/dev/star/plugin.md" line_range="786" />
<code_context>
 ![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`,默认值设为 `[]`。此外,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)
</code_context>
<issue_to_address>
**suggestion (typo):** 重复使用“用户”会让这句话读起来有些别扭,建议去掉第二个“用户”。

建议改为“用于让用户快速选择在 WebUI 上已经配置好的模型提供商、人设、知识库等数据。”以避免“用户”重复,使语句更自然顺畅。

```suggestion
**_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`,默认值设为 `[]`。此外,AstrBot Core 内部还使用了 `select_providers`、`provider_pool`、`persona_pool`、`select_plugin_set`、`t2i_template`、`get_embedding_dim`、`select_agent_runner_provider:*` 等 `_special` 值。以 `select_provider` 为例,将呈现以下效果:
```
</issue_to_address>

Sourcery 对开源项目免费使用——如果你觉得这次评审有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="zh/dev/star/guides/plugin-config.md" line_range="65" />
<code_context>
 ![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`,默认值设为 `[]`。此外,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)
</code_context>
<issue_to_address>
**suggestion (typo):** Avoid repeating “用户” twice in succession in this sentence for smoother Chinese.

这句话中“用户”连续出现两次,显得重复。建议改为“用于让用户快速选择在 WebUI 上已经配置好的模型提供商、人设、知识库等数据。”以提升语句流畅度。

```suggestion
**_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`,默认值设为 `[]`。此外,AstrBot Core 内部还使用了 `select_providers`、`provider_pool`、`persona_pool`、`select_plugin_set`、`t2i_template`、`get_embedding_dim`、`select_agent_runner_provider:*` 等 `_special` 值。以 `select_provider` 为例,将呈现以下效果:
```
</issue_to_address>

### Comment 2
<location path="zh/dev/star/plugin.md" line_range="786" />
<code_context>
 ![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`,默认值设为 `[]`。此外,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)
</code_context>
<issue_to_address>
**suggestion (typo):** The repeated “用户” makes the sentence slightly awkward; consider removing the second occurrence.

建议改为“用于让用户快速选择在 WebUI 上已经配置好的模型提供商、人设、知识库等数据。”以避免“用户”重复,使语句更自然顺畅。

```suggestion
**_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`,默认值设为 `[]`。此外,AstrBot Core 内部还使用了 `select_providers`、`provider_pool`、`persona_pool`、`select_plugin_set`、`t2i_template`、`get_embedding_dim`、`select_agent_runner_provider:*` 等 `_special` 值。以 `select_provider` 为例,将呈现以下效果:
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

本次 PR 主要是完善了 _special 配置项的文档说明,并补充了 select_knowledgebase 的返回类型信息。文档的更新内容清晰且有帮助。我发现几处可以进一步改进的地方以提高文档的可读性:更新后的说明段落内容较长,信息密集,我建议将其拆分。此外,在 zh/dev/star/plugin.md 文件中,引用的示例图片似乎不正确。我已经针对这些问题提出了具体的修改建议。

Note: Security Review has been skipped due to the limited scope of the PR.

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