从 GitHub 安装插件
从 GitHub 仓库安装插件。异步操作,POST 请求立即返回 `task_id`。若插件声明的 LangBot 版本范围与当前版本不兼容(或声明无效),且未传 `allow_incompatible: true`,异步任务将失败,可通过任务查询接口获取错误码 `plugin_incompatible_langbot_version` 及 `details`(包含 `current`、`min`、`max`、`status`: `"incompatible" | "invalid"`)。
从 GitHub 仓库安装插件。异步操作,POST 请求立即返回 task_id。若插件声明的 LangBot 版本范围与当前版本不兼容(或声明无效),且未传 allow_incompatible: true,异步任务将失败,可通过任务查询接口获取错误码 plugin_incompatible_langbot_version 及 details(包含 current、min、max、status: "incompatible" | "invalid")。
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/plugins/install/github" \ -H "Content-Type: application/json" \ -d '{ "url": "https://github.com/rocksclawbot/langbot-community-plugins/tree/main/disaster-alert" }'{ "code": 0, "data": { "task_id": 0 }}上传文档 POST
上传文档文件,大小限制 10MB。上传后可将 file_id 用于知识库关联。
从 Marketplace 安装插件 POST
从 LangBot Marketplace 安装插件。异步操作,POST 请求立即返回 `task_id`。若插件没有任何兼容当前 LangBot 的版本,异步任务直接失败(`allow_incompatible` 对此无效);`allow_incompatible` 仅用于跳过安装包 manifest 的兼容校验。发生兼容性错误时,可通过任务查询接口获取错误码 `plugin_incompatible_langbot_version` 及 `details`(包含 `current`、`min`、`max`、`status`: `"incompatible" | "invalid"`)。
