mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-04 18:45:38 +08:00
feat: add dingtalk chat channel (#16183)
### What does this PR do? This PR adds a new DingTalk chat channel integration and hardens the inbound callback path. ### Summary - Adds DingTalk as a selectable chat channel in the UI and backend channel registry. - Adds the DingTalk chat channel icon asset. - Acknowledges DingTalk Stream callbacks and deduplicates repeated inbound messages to avoid duplicate replies.
This commit is contained in:
1
web/src/assets/svg/chat-channel/dingtalk.svg
Normal file
1
web/src/assets/svg/chat-channel/dingtalk.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1781761950340" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2561" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M717.6192 682.1376h116.5824l-212.0192 296.3968-5.12-1.792 46.08-194.816h-91.136c10.24-47.2576 20.0704-91.648 30.72-140.1856-25.9072 7.7824-48.5376 12.288-69.1712 21.2992-44.6976 19.456-84.8896 11.1616-121.1392-17.6128a455.68 455.68 0 0 1-66.9696-63.232c-20.48-24.4736-13.9776-38.4512 17.0496-43.6736 65.6896-11.0592 131.584-20.7872 197.5808-33.0752h-41.4208c-56.7808-0.5632-113.6128-1.4848-170.3936-1.6896-34.8672 0-59.4432-18.176-80.4864-43.4688a272.5888 272.5888 0 0 1-54.9888-110.848c-6.4512-26.0096 0.6656-33.1776 27.4944-26.9312 67.84 15.7696 135.5776 32.1024 203.4176 47.9744a1030.1952 1030.1952 0 0 0 105.1648 20.1728c-40.96-13.6192-82.7392-26.112-123.3408-40.96-61.952-22.9376-122.88-47.9232-184.832-71.68A66.56 66.56 0 0 1 201.728 240.64c-24.1152-54.9888-42.1376-111.5648-42.5472-172.288 0-22.1184 7.2192-27.5456 26.2144-18.3296C378.88 143.36 578.9184 222.3104 779.5712 299.3152A288.6656 288.6656 0 0 1 834.56 329.0624c33.3312 22.1696 44.1856 50.1248 26.9312 85.248-35.4304 72.0896-74.3936 142.4384-112.2304 213.3504-9.472 17.4592-20.0192 34.4064-31.6416 54.4768z" fill="#59ADF8" p-id="2562"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -1497,6 +1497,7 @@ Example: Virtual Hosted Style`,
|
||||
chatChannelDesc: {
|
||||
clickclack: 'Connect a ClickClack bot',
|
||||
discord: 'Connect a Discord bot',
|
||||
dingtalk: 'Connect a DingTalk bot',
|
||||
feishu: 'Connect a Feishu / Lark bot',
|
||||
googlechat: 'Connect a Google Chat bot',
|
||||
irc: 'Connect to an IRC server',
|
||||
|
||||
@@ -1226,6 +1226,7 @@ NER:使用 spaCy NER 和基于规则的关键词提取来抽取实体和关系
|
||||
chatChannelDesc: {
|
||||
clickclack: '连接 ClickClack 机器人',
|
||||
discord: '连接 Discord 机器人',
|
||||
dingtalk: '连接钉钉机器人',
|
||||
feishu: '连接飞书 / Lark 机器人',
|
||||
googlechat: '连接 Google Chat 机器人',
|
||||
irc: '连接 IRC 服务器',
|
||||
|
||||
@@ -8,6 +8,7 @@ import { IChatChannelInfoMap } from '../interface';
|
||||
export enum ChatChannelKey {
|
||||
CLICKCLACK = 'clickclack',
|
||||
DISCORD = 'discord',
|
||||
DINGTALK = 'dingtalk',
|
||||
FEISHU = 'feishu',
|
||||
GOOGLECHAT = 'googlechat',
|
||||
IRC = 'irc',
|
||||
@@ -48,6 +49,7 @@ const channelIcon = (key: ChatChannelKey) => (
|
||||
const CHANNEL_NAMES: Record<ChatChannelKey, string> = {
|
||||
[ChatChannelKey.CLICKCLACK]: 'ClickClack',
|
||||
[ChatChannelKey.DISCORD]: 'Discord',
|
||||
[ChatChannelKey.DINGTALK]: 'DingTalk',
|
||||
[ChatChannelKey.FEISHU]: 'Feishu / Lark',
|
||||
[ChatChannelKey.GOOGLECHAT]: 'Google Chat',
|
||||
[ChatChannelKey.IRC]: 'IRC',
|
||||
@@ -160,6 +162,21 @@ export const ChatChannelFormFields: Record<ChatChannelKey, FormFieldConfig[]> =
|
||||
placeholder: '1234567890',
|
||||
},
|
||||
],
|
||||
[ChatChannelKey.DINGTALK]: [
|
||||
{
|
||||
label: 'Client ID',
|
||||
name: 'config.credential.client_id',
|
||||
type: FormFieldType.Text,
|
||||
required: true,
|
||||
placeholder: 'dingxxxxxxxxxxxx',
|
||||
},
|
||||
{
|
||||
label: 'Client Secret',
|
||||
name: 'config.credential.client_secret',
|
||||
type: FormFieldType.Password,
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
[ChatChannelKey.FEISHU]: [
|
||||
{
|
||||
label: 'App ID',
|
||||
|
||||
@@ -61,6 +61,7 @@ const ChatChannel = () => {
|
||||
(id) =>
|
||||
[
|
||||
ChatChannelKey.DISCORD,
|
||||
ChatChannelKey.DINGTALK,
|
||||
ChatChannelKey.FEISHU,
|
||||
ChatChannelKey.TELEGRAM,
|
||||
ChatChannelKey.QQBOT,
|
||||
|
||||
Reference in New Issue
Block a user