mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-01 13:25:18 +08:00
* doc: add in the dingtalk.md and lark.md stream config need add condition * doc: add in the english dingtalk.md and lark.md stream config need add condition
84 lines
2.9 KiB
Markdown
84 lines
2.9 KiB
Markdown
# Connect to Feishu Bot
|
|
|
|
## Create Bot
|
|
|
|
Go to the [Feishu Open Platform](https://open.feishu.cn/app), log in, and create an enterprise self-built application.
|
|
|
|

|
|
|
|

|
|
|
|
Add bot capability to the application:
|
|

|
|
|
|
Add the permissions shown in the image in the permission management:
|
|
|
|

|
|
|
|
If card streaming permissions are required, additionally add the following card creation and update permissions as shown in the image:
|
|
|
|

|
|
|
|
## Connect to LangBot
|
|
|
|
Find `app_id` and `app_secret` on the `Credentials and Basic Information` page.
|
|
|
|

|
|
|
|
|
|
|
|
Open LangBot's Webui configuration page, create a new bot
|
|
|
|
Fill in the relevant information in the form
|
|
|
|

|
|
|
|
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
|
|
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.
|
|
:::
|
|
|
|
## Configure Event Subscription
|
|
|
|
Go to the `Events and Callbacks` page, configure the subscription method as `Long Connection`:
|
|
|
|

|
|
|
|
And add the event: `Receive Messages`
|
|
|
|

|
|
|
|
:::warning
|
|
Webhook mode configuration method:
|
|
|
|

|
|
|
|
Please start LangBot first, fill in your server address and port here, the path is `/lark/callback`, click `Save`.
|
|
|
|
:::
|
|
|
|
## Publish Bot
|
|
|
|
Click `Create Version` at the top, fill in the version number and other information, click `Save` below.
|
|
|
|

|
|
|
|
Add the bot to a Feishu group to use it:
|
|
|
|

|
|
|
|

|
|
|
|
Private chat can also be used directly
|
|
|
|

|