sync zh doc changes to en and ja: fix tag formats, add new languages, update MCP sources

This commit is contained in:
Junyan Qin
2026-03-30 20:05:29 +08:00
parent 1271269a90
commit 6966b8a67d
33 changed files with 117 additions and 54 deletions
+2
View File
@@ -286,6 +286,8 @@ event_context.prevent_default()
Calling this method will prevent the default subsequent behavior of this event, and the pipeline will end directly.
<Info>
Only the following events can prevent default behavior:
- PersonMessageReceived
- GroupMessageReceived
- PersonNormalMessageReceived
+4 -1
View File
@@ -32,10 +32,13 @@ execution:
Plugin multilingual support follows the [RFC 4646](https://datatracker.ietf.org/doc/html/rfc4646) standard. Currently supported languages include:
- `en_US` English
- `en_US` English (required)
- `zh_Hans` Simplified Chinese
- `zh_Hant` Traditional Chinese
- `ja_JP` Japanese
- `vi_VN` Vietnamese
- `th_TH` Thai
- `es_ES` Spanish
## Plugin Configuration Item Format
+2 -2
View File
@@ -34,8 +34,8 @@ Component EventListener generated successfully.
➜ HelloPlugin >
```
<Info title="The CLI will generate a `components` directory in the plugin directory and create corresponding component directories within it.">
<Info title="">
The CLI will generate a `components` directory in the plugin directory and create corresponding component directories within it.
```
.
├── assets
+3
View File
@@ -54,6 +54,9 @@ According to [RFC 4646](https://datatracker.ietf.org/doc/html/rfc4646) standard,
| Simplified Chinese | `zh_Hans` | `README_zh_Hans.md` | `readme/` directory |
| Traditional Chinese | `zh_Hant` | `README_zh_Hant.md` | `readme/` directory |
| Japanese | `ja_JP` | `README_ja_JP.md` | `readme/` directory |
| Vietnamese | `vi_VN` | `README_vi_VN.md` | `readme/` directory |
| Thai | `th_TH` | `README_th_TH.md` | `readme/` directory |
| Spanish | `es_ES` | `README_es_ES.md` | `readme/` directory |
### Example Directory Structure
+6 -4
View File
@@ -45,7 +45,8 @@ The plugin class in main.py is common code for each plugin, initialized when the
Each component is a core functional module of your plugin, which can be [added and removed](/en/plugin/dev/components/add) as needed. Different components are called in different situations, making it easy to extend plugin functionality later. Each component directly inherits from the various component base classes under the `langbot_plugin.api.definition.components` package and contains a `plugin: BasePlugin` object, allowing you to directly call the plugin's APIs.
<Info title="- For detailed API documentation, please refer to [API Reference](/en/plugin/dev/apis/common).">
<Info title="">
- For detailed API documentation, please refer to [API Reference](/en/plugin/dev/apis/common).
Please continue reading this tutorial to understand the plugin development process.
</Info>
@@ -76,14 +77,15 @@ lbp init
Follow the prompts to enter `Author`, `Description`, and other information.
<Info title="You can also use the `lbp init HelloPlugin` command to initialize the plugin in the subdirectory `HelloPlugin`.">
<Info title="">
You can also use the `lbp init HelloPlugin` command to initialize the plugin in the subdirectory `HelloPlugin`.
<img width="600" src="/images/zh/plugin/dev/create_plugin.png" />
</Info>
This operation will generate the initial files for the plugin. You can now open the `HelloPlugin` directory in your favorite editor and start writing plugin code.
<Info title='If you get a "command not found" error for `lbp`, it may be because you have not properly set the `PATH` environment variable.'>
<Info title="">
If you get a "command not found" error for `lbp`, it may be because you have not properly set the `PATH` environment variable.
You can use `python -m langbot_plugin.cli.__init__` instead of the `lbp` command.
For example:
+4 -1
View File
@@ -6,7 +6,10 @@ title: "Using MCP Servers"
LangBot supports using tools from MCP servers. You can add MCP servers to leverage the tool calling capabilities in large language models for better handling of LLM requests.
<Info title="- MCP service supports HTTP Streamable, SSE and stdio modes.">
- MCP servers recommended acquisition channel: [Composio MCP](https://mcp.composio.dev/)
- MCP servers recommended acquisition channels:
- [ModelScope](https://modelscope.cn/mcp)
- https://mcp.so
- https://composio.dev/toolkits
</Info>
## Enable Function Calling for Models
+6 -2
View File
@@ -26,11 +26,15 @@ Select `Webhook` or `On chat message` as the trigger and configure as follows:
- On chat message:
![n8n on chat message configuration](/images/zh/deploy/pipelines/n8n/config_n8n_onchatmessage.png)
<Info title="If you need streaming responses, set `Response Mode` to `Streaming`.">
<Info title="">
If you need streaming responses, set `Response Mode` to `Streaming`.
![n8n streaming configuration](/images/zh/deploy/pipelines/n8n/config_response_model.png)
</Info>
<Info title="Authentication corresponds to the authentication methods in LangBot's pipeline configuration, which you can modify as needed.">
<Info title="">
Authentication corresponds to the authentication methods in LangBot's pipeline configuration, which you can modify as needed.
![n8n workflow configuration](/images/zh/deploy/pipelines/n8n/config_auth.png)
</Info>
+2 -2
View File
@@ -28,8 +28,8 @@ Click to add a new bot, fill in the `Client ID` and `Token` obtained in the prev
![alt text](/images/zh/deploy/bots/discord/connect_to_langbot.png)
<Warning title="If you are using this adapter within mainland China, you may need to set up a network proxy.">
<Warning>
If you are using this adapter within mainland China, you may need to set up a network proxy.
</Warning>
After filling in, start LangBot. If configured successfully, the log will show `[02-02 16:48:15.263] manager.py (68) - [INFO] : Initializing platform adapter 1: discord`, keep LangBot running.
+6 -4
View File
@@ -44,17 +44,18 @@ Streaming related:
After filling in, start LangBot. If configured successfully, the log will show `[01-29 23:42:56.796] manager.py (68) - [INFO] : Initializing platform adapter 1: lark`, keep LangBot running.
<Warning title="By default, WebSocket long connection mode is used, corresponding to the long connection subscription below. But in some cases (such as international version of Feishu), long connection mode is not available, in which case you need to use Webhook mode, corresponding to the `Send events to developer server` mode, please refer to the following configuration:">
<Warning title="">
By default, WebSocket long connection mode is used, corresponding to the long connection subscription below. But in some cases (such as international version of Feishu), long connection mode is not available, in which case you need to use Webhook mode, corresponding to the `Send events to developer server` mode, please refer to the following configuration:
- `enable-webhook`: Set to `true`
- `encrypt-key`: Set to `Encrypt Key` in the `Encryption Strategy` of the `Events and Callbacks` page
Note that in Webhook mode, LangBot needs to be deployed on a server with a public IP, and ensure that the firewall has opened the port configured above.
</Warning>
<Tip>
**No public server?** [LangBot Cloud](https://space.langbot.app/cloud) includes built-in domain and HTTPS — get Lark bots working out of the box.
</Tip>
</Warning>
## Configure Event Subscription
@@ -66,11 +67,12 @@ And add the event: `Receive Messages`
![alt text](/images/zh/deploy/bots/lark/lark_08.png)
<Warning title="Webhook mode configuration method:">
<Warning title="">
Webhook mode configuration method:
![alt text](/images/zh/deploy/bots/lark/lark_13.png)
Please start LangBot first, fill in your server address and port here, the path is `/lark/callback`, click `Save`.
Please start LangBot first, fill in the Webhook address obtained from LangBot here.
</Warning>
+3 -1
View File
@@ -95,10 +95,12 @@ Next, open the LangBot configuration page:
<Info>
We recommend that you first refer to [Configure HTTP Reverse Proxy](/en/workshop/production/proxy-and-ssl) to configure the LangBot callback address.
</Info>
<Tip>
**Don't want to set up a public server and domain?** [LangBot Cloud](https://space.langbot.app/cloud) includes built-in domain and HTTPS — get started right away.
</Tip>
</Info>
* Get the Webhook callback URL from the LangBot configuration page
![alt text](/images/zh/deploy/bots/line/line30.png)
+1 -1
View File
@@ -7,10 +7,10 @@ Deploy the WeCom (Enterprise WeChat) bot to integrate with LangBot.
<Info title="- This integration is for internal enterprise applications, used within your organization. If external customer support is needed, please refer to the [WeCom Customer Service integration solution](wecomcs).">
- The WeCom callback address requires a public IP and domain name. We recommend you first follow [Configure HTTP Reverse Proxy](/en/workshop/production/proxy-and-ssl) to configure the LangBot callback address.
</Info>
<Tip>
**No public server?** [LangBot Cloud](https://space.langbot.app/cloud) includes built-in domain and HTTPS — get WeCom working out of the box.
</Tip>
</Info>
## Record Corporate ID
+2
View File
@@ -286,6 +286,8 @@ event_context.prevent_default()
このメソッドを呼び出すと、このイベントのデフォルトの後続動作が防止され、パイプラインは直接終了します。
<Info>
以下のイベントのみデフォルト動作を阻止できます:
- PersonMessageReceived
- GroupMessageReceived
- PersonNormalMessageReceived
+4 -1
View File
@@ -32,10 +32,13 @@ execution:
プラグインの多言語サポートは[RFC 4646](https://datatracker.ietf.org/doc/html/rfc4646)標準に従います。現在サポートされている言語は次のとおりです:
- `en_US` 英語
- `en_US` 英語(必須)
- `zh_Hans` 簡体字中国語
- `zh_Hant` 繁体字中国語
- `ja_JP` 日本語
- `vi_VN` ベトナム語
- `th_TH` タイ語
- `es_ES` スペイン語
## プラグイン設定項目フォーマット
+2 -2
View File
@@ -34,8 +34,8 @@ Component EventListener generated successfully.
➜ HelloPlugin >
```
<Info title="CLIはプラグインディレクトリに`components`ディレクトリを生成し、その中に対応するコンポーネントディレクトリを作成します。">
<Info title="">
CLIはプラグインディレクトリに`components`ディレクトリを生成し、その中に対応するコンポーネントディレクトリを作成します。
```
.
├── assets
+3
View File
@@ -54,6 +54,9 @@ LangBotプラグインは、異なる言語のユーザーにローカライズ
| 簡体字中国語 | `zh_Hans` | `README_zh_Hans.md` | `readme/`ディレクトリ |
| 繁体字中国語 | `zh_Hant` | `README_zh_Hant.md` | `readme/`ディレクトリ |
| 日本語 | `ja_JP` | `README_ja_JP.md` | `readme/`ディレクトリ |
| ベトナム語 | `vi_VN` | `README_vi_VN.md` | `readme/`ディレクトリ |
| タイ語 | `th_TH` | `README_th_TH.md` | `readme/`ディレクトリ |
| スペイン語 | `es_ES` | `README_es_ES.md` | `readme/`ディレクトリ |
### ディレクトリ構造の例
+6 -4
View File
@@ -45,7 +45,8 @@ main.pyのプラグインクラスは各プラグインの共通コードで、
各コンポーネントはプラグインのコア機能モジュールであり、必要に応じて[追加および削除](/en/plugin/dev/components/add)できます。異なるコンポーネントは異なる状況で呼び出され、後でプラグイン機能を簡単に拡張できます。各コンポーネントは`langbot_plugin.api.definition.components`パッケージ下のさまざまなコンポーネント基底クラスから直接継承し、`plugin: BasePlugin`オブジェクトを含み、プラグインのAPIを直接呼び出すことができます。
<Info title="- 詳細なAPIドキュメントについては、[APIリファレンス](/en/plugin/dev/apis/common)を参照してください。">
<Info title="">
- 詳細なAPIドキュメントについては、[APIリファレンス](/en/plugin/dev/apis/common)を参照してください。
このチュートリアルを続けて読んで、プラグイン開発プロセスを理解してください。
</Info>
@@ -76,14 +77,15 @@ lbp init
プロンプトに従って`Author`、`Description`などの情報を入力します。
<Info title="`lbp init HelloPlugin`コマンドを使用して、サブディレクトリ`HelloPlugin`でプラグインを初期化することもできます。">
<Info title="">
`lbp init HelloPlugin`コマンドを使用して、サブディレクトリ`HelloPlugin`でプラグインを初期化することもできます。
<img width="600" src="/images/zh/plugin/dev/create_plugin.png" />
</Info>
この操作により、プラグインの初期ファイルが生成されます。お気に入りのエディターで`HelloPlugin`ディレクトリを開き、プラグインコードの記述を開始できます。
<Info title="`lbp`コマンドで「command not found」エラーが発生した場合、`PATH`環境変数が適切に設定されていない可能性があります。">
<Info title="">
`lbp`コマンドで「command not found」エラーが発生した場合、`PATH`環境変数が適切に設定されていない可能性があります。
`lbp`コマンドの代わりに`python -m langbot_plugin.cli.__init__`を使用できます。
例えば:
+4 -1
View File
@@ -6,7 +6,10 @@ title: "MCPサーバーの使用"
LangBotはMCPサーバーをサポートしています。MCPサーバーを追加して、大規模言語モデルのツール呼び出し機能を活用し、LLMリクエストをより適切に処理できます。
<Info title="- MCP サービスは HTTP Streamable、SSE および stdio モードをサポートしています。">
- MCPサーバーの推奨取得チャネル: [Composio MCP](https://mcp.composio.dev/)
- MCPサーバーの推奨取得チャネル:
- [ModelScope](https://modelscope.cn/mcp)
- https://mcp.so
- https://composio.dev/toolkits
</Info>
## モデルのFunction Callingを有効化
+6 -2
View File
@@ -26,11 +26,15 @@ LangBotは現在、n8nワークフローの`Webhook`ノードを通じてワー
- On chat message:
![n8n on chat message設定](/images/zh/deploy/pipelines/n8n/config_n8n_onchatmessage.png)
<Info title="ストリーミングレスポンスが必要な場合は、`Response Mode`を`Streaming`に設定します。">
<Info title="">
ストリーミングレスポンスが必要な場合は、`Response Mode`を`Streaming`に設定します。
![n8nストリーミング設定](/images/zh/deploy/pipelines/n8n/config_response_model.png)
</Info>
<Info title="認証は、LangBotのパイプライン設定の認証方法に対応しており、必要に応じて変更できます。">
<Info title="">
認証は、LangBotのパイプライン設定の認証方法に対応しており、必要に応じて変更できます。
![n8nワークフロー設定](/images/zh/deploy/pipelines/n8n/config_auth.png)
</Info>
+2 -2
View File
@@ -28,8 +28,8 @@ title: "Discord ボットに接続"
![alt text](/images/zh/deploy/bots/discord/connect_to_langbot.png)
<Warning title="中国本土内でこのアダプターを使用している場合、ネットワークプロキシを設定する必要がある場合があります。">
<Warning title="">
中国本土内でこのアダプターを使用している場合、ネットワークプロキシを設定する必要がある場合があります。
</Warning>
入力後、LangBot を起動します。設定が成功した場合、ログに `[02-02 16:48:15.263] manager.py (68) - [INFO] : Initializing platform adapter 1: discord` と表示されます。LangBot を実行し続けてください。
+6 -4
View File
@@ -44,17 +44,18 @@ LangBot の Webui 設定ページを開き、新しいボットを作成しま
入力後、LangBot を起動します。設定が成功した場合、ログに `[01-29 23:42:56.796] manager.py (68) - [INFO] : Initializing platform adapter 1: lark` と表示されます。LangBot を実行し続けてください。
<Warning title="デフォルトでは、WebSocket 長時間接続モードが使用されます。これは以下の長時間接続サブスクリプションに対応しています。ただし、場合によっては(国際版の Feishu など)、長時間接続モードが利用できない場合があります。その場合は、Webhook モードを使用する必要があります。これは、「開発者サーバーにイベントを送信」モードに対応しています。次の設定を参照してください:">
<Warning title="">
デフォルトでは、WebSocket 長時間接続モードが使用されます。これは以下の長時間接続サブスクリプションに対応しています。ただし、場合によっては(国際版の Feishu など)、長時間接続モードが利用できない場合があります。その場合は、Webhook モードを使用する必要があります。これは、「開発者サーバーにイベントを送信」モードに対応しています。次の設定を参照してください:
- `enable-webhook`:`true` に設定
- `encrypt-key`:「イベントとコールバック」ページの「暗号化戦略」の「Encrypt Key」に設定
Webhook モードでは、LangBot をパブリック IP を持つサーバーにデプロイし、ファイアウォールが上記で設定したポートを開いていることを確認する必要があることに注意してください。
</Warning>
<Tip>
**パブリックサーバーがありませんか?** [LangBot Cloud](https://space.langbot.app/cloud) にはドメインと HTTPS が含まれており、Lark ボットをすぐに使用できます。
</Tip>
</Warning>
## イベントサブスクリプションの設定
@@ -66,11 +67,12 @@ Webhook モードでは、LangBot をパブリック IP を持つサーバーに
![alt text](/images/zh/deploy/bots/lark/lark_08.png)
<Warning title="Webhook モード設定方法:">
<Warning title="">
Webhook モード設定方法:
![alt text](/images/zh/deploy/bots/lark/lark_13.png)
まず LangBot を起動してください。ここにサーバーアドレスとポートを入力します。パスは `/lark/callback` です。「保存」をクリックします。
まず LangBot を起動してください。ここに LangBot から取得した Webhook アドレスを入力します。
</Warning>
+3 -1
View File
@@ -95,10 +95,12 @@ title: "LINE ボットの統合"
<Info>
まず、[HTTP リバースプロキシの設定](/en/workshop/production/proxy-and-ssl)を参照して LangBot コールバックアドレスを設定することをお勧めします。
</Info>
<Tip>
**パブリックサーバーとドメインの設定が不要です。** [LangBot Cloud](https://space.langbot.app/cloud) にはドメインと HTTPS が含まれており、すぐに使用できます。
</Tip>
</Info>
* LangBot 設定ページから Webhook コールバック URL を取得します
![alt text](/images/zh/deploy/bots/line/line30.png)
+1 -1
View File
@@ -7,10 +7,10 @@ WeCom(企業微信)ボットをデプロイして LangBot に接続します
<Info title="- この統合方法は、企業内部アプリケーション用であり、企業内で使用されます。外部カスタマーサービスが必要な場合は、[WeCom Customer Service 統合ソリューション](wecomcs)を確認してください。">
- WeCom コールバックアドレスにはパブリック IP とドメイン名が必要です。まず [HTTP リバースプロキシの設定](/ja/workshop/production/proxy-and-ssl)を参照して LangBot コールバックアドレスを設定することをお勧めします。
</Info>
<Tip>
**パブリックサーバーがありませんか?** [LangBot Cloud](https://space.langbot.app/cloud) にはドメインと HTTPS が含まれており、WeCom をすぐに使用できます。
</Tip>
</Info>
## 企業 ID の記録
+2
View File
@@ -297,6 +297,8 @@ event_context.prevent_default()
调用该方法后,该事件后续默认行为将被阻止,流水线将直接结束。
<Info>
仅以下事件可阻止默认行为:
- PersonMessageReceived
- GroupMessageReceived
- PersonNormalMessageReceived
+4 -1
View File
@@ -32,10 +32,13 @@ execution:
插件多语言遵循 [RFC 4646](https://datatracker.ietf.org/doc/html/rfc4646) 标准,目前支持的语言有:
- `en_US` 英文
- `en_US` 英文 (必填)
- `zh_Hans` 简体中文
- `zh_Hant` 繁体中文
- `ja_JP` 日语
- `vi_VN` 越南语
- `th_TH` 泰语
- `es_ES` 西班牙语
## 插件配置项格式
+2 -2
View File
@@ -34,8 +34,8 @@ Component EventListener generated successfully.
➜ HelloPlugin >
```
<Info title="CLI 将在插件目录下生成一个 `components` 目录,并在其中创建组件对应目录">
<Info title="">
CLI 将在插件目录下生成一个 `components` 目录,并在其中创建组件对应目录
```
.
├── assets
+3
View File
@@ -54,6 +54,9 @@ LangBot 插件支持多语言 README 文档,以便为不同语言的用户提
| 简体中文 | `zh_Hans` | `README_zh_Hans.md` | `readme/` 目录 |
| 繁体中文 | `zh_Hant` | `README_zh_Hant.md` | `readme/` 目录 |
| 日语 | `ja_JP` | `README_ja_JP.md` | `readme/` 目录 |
| 越南语 | `vi_VN` | `README_vi_VN.md` | `readme/` 目录 |
| 泰语 | `th_TH` | `README_th_TH.md` | `readme/` 目录 |
| 西班牙语 | `es_ES` | `README_es_ES.md` | `readme/` 目录 |
### 示例目录结构
+6 -4
View File
@@ -45,7 +45,8 @@ main.py 中的插件类是每个插件通用的代码,在插件被启动时会
各个组件是您插件的核心功能模块,可以根据需要[添加和删除组件](/zh/plugin/dev/components/add)。不同的组件会在不同的情况下被调用,这种设计方便后续扩展插件功能。各个组件均直接继承于`langbot_plugin.api.definition.components`包下的各个组件基类,并在其中包含`plugin: BasePlugin`对象,您可直接调用插件的 API。
<Info title="- 详细的 API 说明请参考[API 参考](/zh/plugin/dev/apis/common)。">
<Info title="">
- 详细的 API 说明请参考[API 参考](/zh/plugin/dev/apis/common)。
请您继续阅读本页教程,了解插件的开发流程。
</Info>
@@ -76,14 +77,15 @@ lbp init
按照提示输入`Author(作者)`、`Description(描述)`等信息
<Info title="您也可以使用`lbp init HelloPlugin`命令,在子目录`HelloPlugin`中初始化插件。">
<Info title="">
您也可以使用`lbp init HelloPlugin`命令,在子目录`HelloPlugin`中初始化插件。
<img width="600" src="/images/zh/plugin/dev/create_plugin.png" />
</Info>
此操作将生成插件的初始文件。您现在可以在您喜爱的编辑器中打开 `HelloPlugin` 目录,开始编写插件代码。
<Info title="若提示找不到 `lbp` 命令,可能是由于您未正确设置 `PATH` 环境变量。">
<Info title="">
若提示找不到 `lbp` 命令,可能是由于您未正确设置 `PATH` 环境变量。
可使用`python -m langbot_plugin.cli.__init__`替代`lbp`命令。
例如:
+4 -1
View File
@@ -5,7 +5,10 @@ title: "使用MCP服务器"
LangBot 支持使用来自 MCP 服务器的工具,您可以添加 MCP 服务器,使用大语言模型中的工具调用特性,更好的处理 LLM 请求。
<Info>
MCP 服务器推荐获取渠道:[ModelScope](https://modelscope.cn/mcp)
MCP 服务器推荐获取渠道:
- [ModelScope](https://modelscope.cn/mcp)
- https://mcp.so
- https://composio.dev/toolkits
</Info>
## 打开模型的函数调用功能
+6 -2
View File
@@ -27,12 +27,16 @@ or
* on chat message
![n8n on chat message 配置](/images/zh/deploy/pipelines/n8n/config_n8n_onchatmessage.png)
<Info title="如果要需要流式,其中的`Response Mode`都需要选择为`Streaming`。">
<Info title="">
如果要需要流式,其中的`Response Mode`都需要选择为`Streaming`。
![n8n 流式配置](/images/zh/deploy/pipelines/n8n/config_response_model.png)
</Info>
<Info title="Authentication 对应 LangBot 流水线配置中的几种鉴权方式,可自行更改。">
<Info title="">
Authentication 对应 LangBot 流水线配置中的几种鉴权方式,可自行更改。
![n8n 工作流配置](/images/zh/deploy/pipelines/n8n/config_auth.png)
</Info>
+2 -2
View File
@@ -28,8 +28,8 @@ title: "接入 Discord 机器人"
![alt text](/images/zh/deploy/bots/discord/connect_to_langbot.png)
<Warning title="如果你在中国大陆境内使用此适配器,可能需要设置网络代理。">
<Warning title="">
如果你在中国大陆境内使用此适配器,可能需要设置网络代理。
</Warning>
填写完成后启动 LangBot,若成功配置,日志中会出现`[02-02 16:48:15.263] manager.py (68) - [INFO] : 初始化平台适配器 1: discord`的字样,保持 LangBot 运行。
+6 -4
View File
@@ -44,17 +44,18 @@ title: "接入飞书机器人"
填写完成后启动 LangBot,若成功配置,日志中会出现`[01-29 23:42:56.796] manager.py (68) - [INFO] : 初始化平台适配器 1: lark`的字样,保持 LangBot 运行。
<Warning title="默认使用的是 WebSocket 长连接模式,对应下方的长连接订阅。但某些情况下(如国际版飞书)不具有长连接模式,此时需要使用 Webhook 模式,对应`将事件发送到开发者服务器`模式,请参考以下配置:">
<Warning title="">
默认使用的是 WebSocket 长连接模式,对应下方的长连接订阅。但某些情况下(如国际版飞书)不具有长连接模式,此时需要使用 Webhook 模式,对应`将事件发送到开发者服务器`模式,请参考以下配置:
- `enable-webhook`:设置为`true`
- `encrypt-key`:设置为`事件与回调`页面的`加密策略`中的`Encrypt Key`
注意,在Webhook模式中,LangBot 需要部署在具有公网 IP 的服务器上,并确保防火墙已开放上方配置的端口。
</Warning>
<Tip>
**没有公网服务器?** [LangBot Cloud](https://space.langbot.app/cloud) 自带域名和 HTTPS,无需自行配置,开箱即用飞书机器人。
</Tip>
</Warning>
## 配置事件订阅
@@ -66,11 +67,12 @@ title: "接入飞书机器人"
![alt text](/images/zh/deploy/bots/lark/lark_08.png)
<Warning title="Webhook 模式配置方式:">
<Warning title="">
Webhook 模式配置方式:
![alt text](/images/zh/deploy/bots/lark/lark_13.png)
请先启动 LangBot,在此处填写你的服务器地址和端口,路径为`/lark/callback`,点击`保存`。
请先启动 LangBot,在此处填写从 LangBot 获取的 Webhook 地址
</Warning>
+3 -1
View File
@@ -103,10 +103,12 @@ title: "接入LINE机器人"
<Info>
推荐您先参照[配置 HTTP 反向代理](/zh/workshop/production/proxy-and-ssl)来配置 LangBot 回调地址。
</Info>
<Tip>
**不想配置公网和域名?** [LangBot Cloud](https://space.langbot.app/cloud) 自带域名和 HTTPS,开箱即用。
</Tip>
</Info>
* 从 LangBot 配置页面获取 Webhook 回调地址
![alt text](/images/zh/deploy/bots/line/line30.png)
+1 -1
View File
@@ -7,10 +7,10 @@ title: "部署企业微信机器人"
<Info title="- 此种接入方式为企业内部自建应用,是在企业内部使用的,若需要对外接待,请查看[企业微信客服接入方案](wecomcs)。">
- 企业微信回调地址需要公网IP和域名,推荐您先参照[配置 HTTP 反向代理](/zh/workshop/production/proxy-and-ssl)来配置 LangBot 回调地址。
</Info>
<Tip>
**没有公网服务器?** [LangBot Cloud](https://space.langbot.app/cloud) 自带域名和 HTTPS,无需自行配置反向代理,开箱即用企业微信。
</Tip>
</Info>
## 记录企业ID