diff --git a/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk10.png b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk10.png new file mode 100644 index 000000000..0096e8c58 Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk10.png differ diff --git a/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk11.png b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk11.png new file mode 100644 index 000000000..07279c29a Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk11.png differ diff --git a/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk12.png b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk12.png new file mode 100644 index 000000000..2f630bb07 Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk12.png differ diff --git a/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk13.png b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk13.png new file mode 100644 index 000000000..0f3a5343f Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk13.png differ diff --git a/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk14.png b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk14.png new file mode 100644 index 000000000..ec1683cb7 Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk14.png differ diff --git a/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk15.png b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk15.png new file mode 100644 index 000000000..43ea3c0f4 Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk15.png differ diff --git a/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk6.png b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk6.png new file mode 100644 index 000000000..d1ddafacf Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk6.png differ diff --git a/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk7.png b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk7.png new file mode 100644 index 000000000..900ccfb2e Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk7.png differ diff --git a/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk8.png b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk8.png new file mode 100644 index 000000000..f5b56f61b Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk8.png differ diff --git a/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk9.png b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk9.png new file mode 100644 index 000000000..c4a59d462 Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/dingtalk/dingtalk9.png differ diff --git a/docs/assets/image/zh/deploy/bots/lark/connect_to_langbot01.png b/docs/assets/image/zh/deploy/bots/lark/connect_to_langbot01.png new file mode 100644 index 000000000..77300c4a0 Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/lark/connect_to_langbot01.png differ diff --git a/docs/assets/image/zh/deploy/bots/lark/lark_14.png b/docs/assets/image/zh/deploy/bots/lark/lark_14.png new file mode 100644 index 000000000..fe98eb3a4 Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/lark/lark_14.png differ diff --git a/docs/assets/image/zh/deploy/bots/lark/lark_15.png b/docs/assets/image/zh/deploy/bots/lark/lark_15.png new file mode 100644 index 000000000..561fab11e Binary files /dev/null and b/docs/assets/image/zh/deploy/bots/lark/lark_15.png differ diff --git a/docs/en/deploy/platforms/dingtalk.md b/docs/en/deploy/platforms/dingtalk.md index c8793dd29..426e72fd1 100644 --- a/docs/en/deploy/platforms/dingtalk.md +++ b/docs/en/deploy/platforms/dingtalk.md @@ -24,6 +24,34 @@ If this is the first time creating a bot, the right side is empty, you need to c Click `Event Subscription`, change the push method to `Stream Mode Push`. +If card streaming is needed, you must apply for card permissions in the permission management, as shown: +![Before applying for card permissions](/assets/image/zh/deploy/bots/dingtalk/dingtalk6.png) + +![After applying for card permissions](/assets/image/zh/deploy/bots/dingtalk/dingtalk7.png) + +Additionally, for card messages you mainly need to create a card template and record the template ID to fill in the configuration, the process is as follows: +> The card content template ID can be obtained by logging into the developer backend > [Card Platform](https://open-dev.dingtalk.com/fe/card?spm=ding_open_doc.document.0.0.33cf2281L0fXsV) + +Fill in information when creating a new template, as shown: +![Fill in information for new template](/assets/image/zh/deploy/bots/dingtalk/dingtalk8.png) + +Select a preset template (just choose the first one and modify the template content later), as shown: +![Select preset template](/assets/image/zh/deploy/bots/dingtalk/dingtalk9.png) +Click Use +![Click](/assets/image/zh/deploy/bots/dingtalk/dingtalk10.png) +Create +![Create](/assets/image/zh/deploy/bots/dingtalk/dingtalk11.png) + +After clicking Create you'll be redirected to edit the template. As shown, you can freely edit your desired card message: +![Edit template](/assets/image/zh/deploy/bots/dingtalk/dingtalk12.png) + +For the main content, keep the default 'content' unchanged: +![Don't modify](../../../assets/image/zh/deploy/bots/dingtalk/dingtalk13.png) + +After editing and confirming everything is correct, save it and copy the template ID to fill in the configuration file: +![Save](../../../assets/image/zh/deploy/bots/dingtalk/dingtalk14.png) +![Copy template ID](../../../assets/image/zh/deploy/bots/dingtalk/dingtalk15.png) + ## Fill in Configuration Information Click `Credentials and Basic Information`, record `Client ID` and `Client Secret`, @@ -31,8 +59,13 @@ Click `Application Capabilities`, `Robot`, record the RobotCode and Robot Name. `markdown_card` is whether to enable Markdown form replies. Record the above configuration items and fill them in the LangBot bot configuration form +Click [Card Platform](https://open-dev.dingtalk.com/fe/card?spm=ding_open_doc.document.0.0.33cf2281L0fXsV), copy the corresponding bound template ID from the template list, and fill it into the card template ID field. + ![Connect to LangBot](/assets/image/zh/deploy/bots/dingtalk/connect_to_langbot.png) +Streaming related: +![img.png](../../../assets/image/zh/deploy/bots/lark/lark_15.png) + **Start LangBot**. ## Add Bot diff --git a/docs/en/deploy/platforms/lark.md b/docs/en/deploy/platforms/lark.md index 565b2e9cc..9a4782589 100644 --- a/docs/en/deploy/platforms/lark.md +++ b/docs/en/deploy/platforms/lark.md @@ -15,6 +15,10 @@ Add the permissions shown in the image in the permission management: ![alt text](/assets/image/zh/deploy/bots/lark/lark_04.png) +If card streaming permissions are required, additionally add the following card creation and update permissions as shown in the image: + +![img_1.png](../../../assets/image/zh/deploy/bots/lark/lark_14.png) + ## Connect to LangBot Find `app_id` and `app_secret` on the `Credentials and Basic Information` page. @@ -29,6 +33,9 @@ Fill in the relevant information in the form ![alt text](/assets/image/zh/deploy/bots/lark/connect_to_langbot.png) +Streaming related: +![Streaming related](../../../assets/image/zh/deploy/bots/lark/connect_to_langbot01.png) + 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 diff --git a/docs/zh/deploy/platforms/dingtalk.md b/docs/zh/deploy/platforms/dingtalk.md index e8c6f2456..7e4be1290 100644 --- a/docs/zh/deploy/platforms/dingtalk.md +++ b/docs/zh/deploy/platforms/dingtalk.md @@ -24,6 +24,35 @@ 点击`事件订阅`,将其中的推送方式改为`Stream模式推送`。 +如果需要卡片流式,则需要在权限管理中申请卡片权限,如图: +![申请卡片权限前](/assets/image/zh/deploy/bots/dingtalk/dingtalk6.png) + +![申请卡片权限后](/assets/image/zh/deploy/bots/dingtalk/dingtalk7.png) + +另外卡片消息主要创建卡片模板,并记录模板id填入配置信息,流程如下: +> 卡片内容模板ID,可通过登录开发者后台 > [卡片平台](https://open-dev.dingtalk.com/fe/card?spm=ding_open_doc.document.0.0.33cf2281L0fXsV)获取 + +新建模板填写信息,如图: +![新建模板填写信息](/assets/image/zh/deploy/bots/dingtalk/dingtalk8.png) + +选择预设模板(直接选第一个然后进去后更改模板内容),如图: +![选择预设模板](/assets/image/zh/deploy/bots/dingtalk/dingtalk9.png) +点击使用 +![点击](/assets/image/zh/deploy/bots/dingtalk/dingtalk10.png) +创建 +![创建](/assets/image/zh/deploy/bots/dingtalk/dingtalk11.png) + +点击创建后会跳转到编辑模板。如图,这样你就可以尽情的编辑你想要的卡片消息了: +![编辑模板](/assets/image/zh/deploy/bots/dingtalk/dingtalk12.png) + +主内容这里默认content不要改动即可: +![不改动](../../../assets/image/zh/deploy/bots/dingtalk/dingtalk13.png) + +编辑好没问题之后保存即可,并复制模板id用以填写配置文件: +![保存](../../../assets/image/zh/deploy/bots/dingtalk/dingtalk14.png) +![复制模板id](../../../assets/image/zh/deploy/bots/dingtalk/dingtalk15.png) + + ## 填写配置信息 点击`凭证与基础信息`,记录`Client ID` 和 `Client Secret`, @@ -31,8 +60,14 @@ `markdown_card` 为是否启用 Markdown 形式的回复,当此配置项关闭时,`@发送者` 配置开关不会生效。 将以上配置项 记录下来,填到 LangBot 机器人配置表单中。 +点击[卡片平台](https://open-dev.dingtalk.com/fe/card?spm=ding_open_doc.document.0.0.33cf2281L0fXsV)模板列表复制绑定的对应的模板id填入卡片模板id + + ![对接 LangBot](/assets/image/zh/deploy/bots/dingtalk/connect_to_langbot.png) +流式相关: +![img.png](../../../assets/image/zh/deploy/bots/lark/lark_15.png) + **启动 LangBot** 。 ## 添加机器人 diff --git a/docs/zh/deploy/platforms/lark.md b/docs/zh/deploy/platforms/lark.md index 6fb0fc0df..42ffd0e06 100644 --- a/docs/zh/deploy/platforms/lark.md +++ b/docs/zh/deploy/platforms/lark.md @@ -15,6 +15,10 @@ ![alt text](/assets/image/zh/deploy/bots/lark/lark_04.png) +如需卡片流式权限则多添加如下图的创建与更新卡片: + +![img_1.png](../../../assets/image/zh/deploy/bots/lark/lark_14.png) + ## 对接 LangBot 在`凭证与基础信息`页找到`app_id`和`app_secret`。 @@ -29,6 +33,9 @@ ![alt text](/assets/image/zh/deploy/bots/lark/connect_to_langbot.png) +流式相关: +![流式相关](../../../assets/image/zh/deploy/bots/lark/connect_to_langbot01.png) + 填写完成后启动 LangBot,若成功配置,日志中会出现`[01-29 23:42:56.796] manager.py (68) - [INFO] : 初始化平台适配器 1: lark`的字样,保持 LangBot 运行。 :::warning