LangBot Docs
Plugins

从 GitHub 安装插件

GitHub リポジトリからプラグインをインストールします。非同期処理で、POST リクエストは直ちに `task_id` を返します。宣言された LangBot バージョン範囲が現在のバージョンと互換性がない(または宣言が無効な)場合、`allow_incompatible: true` が指定されていなければ非同期タスクは失敗し、タスク照会 API からエラーコード `plugin_incompatible_langbot_version` および `details`(`current`、`min`、`max`、`status`: `"incompatible" | "invalid"`)を取得できます。

POST
/api/v1/plugins/install/github

GitHub リポジトリからプラグインをインストールします。非同期処理で、POST リクエストは直ちに task_id を返します。宣言された LangBot バージョン範囲が現在のバージョンと互換性がない(または宣言が無効な)場合、allow_incompatible: true が指定されていなければ非同期タスクは失敗し、タスク照会 API からエラーコード plugin_incompatible_langbot_version および details(current、min、max、status: "incompatible" | "invalid")を取得できます。

Authorization

X-API-Key<token>

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  }}