- logs
- stats
- system
- settings
- plugins
- user
- provider
- pipelines
- platform
- files
- knowledge
获取已加载的插件列表
测试中
GET
/api/v1/plugins
不包含加载失败的插件
插件需要 成功被加载 并 处于启用状态 才会初始化。
此接口仅返回 已加载 的插件。
未成功加载的插件,需要在日志查看报错(后续应该会优化 能实现查看所有插件)。
未成功初始化的插件这里也会显示,但用户需要查看日志才能知道插件初始化时是否有异常(后续会优化)。
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET '/api/v1/plugins'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{
"code": 0,
"data": {
"plugins": [
{
"author": "RockChinQ",
"config_schema": [],
"description": { // i18n 字段
"en_US": "LangBot Plugin Reader",
"zh_CN": "LangBot Plugin Reader"
},
"enabled": true,
"event_handlers": {},
"label": { // i18n 字段
"en_US": "LangBotPluginReader",
"zh_CN": "LangBotPluginReader"
},
"main_file": "plugins/PluginReader/main.py", // 插件入口文件,webui无关
"name": "LangBotPluginReader",
"pkg_path": "plugins/PluginReader/", // 插件包目录,webui无关
"priority": 0, // 优先级
"repository": "", // 插件仓库地址
"status": "initialized", // 插件状态,mounted(已加载未初始化,未启用的插件是这种状态)initialized(已初始化)
"tools": [], // 插件提供的 llm tools,可以用 RockChinQ/WebwlkrPlugin 来测试
"version": "0.1"
},
{
"author": "RockChinQ",
"config_schema": [],
"description": {
"en_US": "发送图片测试",
"zh_CN": "发送图片测试"
},
"enabled": true,
"event_handlers": { // 插件注册的事件列表,key为事件名,value为函数名(webui无关)
"GroupNormalMessageReceived": "group_normal_message_received",
"PersonNormalMessageReceived": "person_normal_message_received"
},
"label": {
"en_US": "SendingImageTest",
"zh_CN": "SendingImageTest"
},
"main_file": "plugins/SendingImageTestPlugin/main.py",
"name": "SendingImageTest",
"pkg_path": "plugins/SendingImageTestPlugin/",
"priority": 0,
"repository": "",
"status": "initialized",
"tools": [],
"version": "0.1"
},
{
"author": "RockChinQ",
"config_schema": [],
"description": {
"en_US": "基于GPT的函数调用能力,为QChatGPT提供联网功能",
"zh_CN": "基于GPT的函数调用能力,为QChatGPT提供联网功能"
},
"enabled": true,
"event_handlers": {},
"label": {
"en_US": "Webwlkr",
"zh_CN": "Webwlkr"
},
"main_file": "plugins/WebwlkrPlugin/main.py",
"name": "Webwlkr",
"pkg_path": "plugins/WebwlkrPlugin/",
"priority": 0,
"repository": "",
"status": "initialized",
"tools": [
{
"description": "Call this function to search about the question before you answer any questions.\n- Do not search through google.com at any time.\n- If you need to search somthing, visit https://www.sogou.com/web?query=<something>.\n- If user ask you to open a url (start with http:// or https://), visit it directly.\n- Summary the plain content result by yourself, DO NOT directly output anything in the result you got.",
"func": "handler",
"human_desc": "",
"name": "Webwlkr-access_the_web",
"parameters": {
"properties": {
"brief_len": {
"description": "max length of the plain text content, recommend 1024-4096, prefer 4096",
"type": "integer"
},
"url": {
"description": "url to visit",
"type": "string"
}
},
"required": [
"url",
"brief_len"
],
"type": "object"
}
}
],
"version": "0.1.1"
},
{
"author": "RockChinQ",
"config_schema": [
{
"description": {
"en_US": "Picture downloading may be failed if this is not provided",
"zh_CN": "如果不提供的话,获取图片可能会失败"
},
"label": {
"en_US": "GitHub Token",
"zh_CN": "GitHub 密钥"
},
"name": "github_token",
"required": false,
"type": "string"
}
],
"description": {
"en_US": "Send Nahida Images",
"zh_CN": "发送纳西妲图片"
},
"enabled": true,
"event_handlers": {},
"label": {
"en_US": "Nahida",
"zh_CN": "发纳西妲图片"
},
"main_file": "plugins/Nahida/main.py",
"name": "Nahida",
"pkg_path": "plugins/Nahida",
"priority": 0,
"repository": "https://github.com/RockChinQ/Nahida",
"status": "initialized",
"tools": [],
"version": "0.1.0"
}
]
},
"msg": "ok"
}
修改于 2025-04-25 14:47:11