mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
docs: add usage of select_knowledgebase in plugin development docs (#7115)
* docs: 补充 select_knowledgebase 及 _special 字段文档 在插件配置文档中添加 select_knowledgebase 的说明(返回 list, 支持多选),并列出 AstrBot Core 内部使用的其他 _special 值供参考。 * docs: 优化 _special 字段文档表达 标注内部 _special 值为不稳定实现,请勿在插件中使用; 说明 select_agent_runner_provider:* 中 * 的含义; 修正英文措辞。
This commit is contained in:
@@ -62,7 +62,15 @@ When the code editor is enabled, it looks like this:
|
||||
|
||||

|
||||
|
||||
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:*` (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 display as follows:
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -62,7 +62,15 @@ AstrBot 提供了“强大”的配置解析和可视化功能。能够让用户
|
||||
|
||||

|
||||
|
||||
**_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` 为例,将呈现以下效果:
|
||||
|
||||

|
||||
|
||||
|
||||
Reference in New Issue
Block a user