Compare commits
41 Commits
v4.8.15-al
...
v4.8.16-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a997f277ad | ||
|
|
1f4e5f6d71 | ||
|
|
ce2e926d76 | ||
|
|
bd79e7701f | ||
|
|
82871be054 | ||
|
|
8ba339e78f | ||
|
|
8e9c030600 | ||
|
|
9b8779ba08 | ||
|
|
bfac393ab1 | ||
|
|
76d20b2b76 | ||
|
|
b4933471cd | ||
|
|
c995bccef8 | ||
|
|
3deac290bf | ||
|
|
b7eb4c15de | ||
|
|
41a8536c16 | ||
|
|
1e618502c7 | ||
|
|
e9297c2c6a | ||
|
|
30a89fe4cb | ||
|
|
c41def5fbb | ||
|
|
b596976a96 | ||
|
|
e71708ee76 | ||
|
|
ddddd998c8 | ||
|
|
181b854342 | ||
|
|
40af63b1dd | ||
|
|
d2a56a2fed | ||
|
|
4b9b0dbbb9 | ||
|
|
c0135f5f21 | ||
|
|
8a4715293e | ||
|
|
69dc927a5a | ||
|
|
d5752ddbaa | ||
|
|
048f5a2d53 | ||
|
|
096afef629 | ||
|
|
f832d32c62 | ||
|
|
d7c6204e62 | ||
|
|
806109b748 | ||
|
|
b327e487a5 | ||
|
|
c98224dda3 | ||
|
|
5cea6015c0 | ||
|
|
fd47f73086 | ||
|
|
fc8f73fc55 | ||
|
|
1b8b11239c |
BIN
docSite/assets/imgs/dingtalk-bot-1.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
docSite/assets/imgs/dingtalk-bot-2.png
Normal file
|
After Width: | Height: | Size: 159 KiB |
BIN
docSite/assets/imgs/dingtalk-bot-3.png
Normal file
|
After Width: | Height: | Size: 151 KiB |
BIN
docSite/assets/imgs/dingtalk-bot-4.png
Normal file
|
After Width: | Height: | Size: 314 KiB |
BIN
docSite/assets/imgs/dingtalk-bot-5.png
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
docSite/assets/imgs/dingtalk-bot-6.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
docSite/assets/imgs/dingtalk-bot-7.png
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
docSite/assets/imgs/dingtalk-bot-8.png
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
docSite/assets/imgs/image-25.png
Normal file
|
After Width: | Height: | Size: 320 KiB |
BIN
docSite/assets/imgs/image-26.png
Normal file
|
After Width: | Height: | Size: 358 KiB |
BIN
docSite/assets/imgs/image-27.png
Normal file
|
After Width: | Height: | Size: 488 KiB |
BIN
docSite/assets/imgs/image-28.png
Normal file
|
After Width: | Height: | Size: 320 KiB |
BIN
docSite/assets/imgs/image-29.png
Normal file
|
After Width: | Height: | Size: 367 KiB |
BIN
docSite/assets/imgs/image-30.png
Normal file
|
After Width: | Height: | Size: 950 KiB |
BIN
docSite/assets/imgs/image-31.png
Normal file
|
After Width: | Height: | Size: 152 KiB |
BIN
docSite/assets/imgs/image-32.png
Normal file
|
After Width: | Height: | Size: 202 KiB |
BIN
docSite/assets/imgs/image-33.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
docSite/assets/imgs/image-34.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
docSite/assets/imgs/image-35.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
docSite/assets/imgs/image-36.png
Normal file
|
After Width: | Height: | Size: 153 KiB |
BIN
docSite/assets/imgs/image-37.png
Normal file
|
After Width: | Height: | Size: 196 KiB |
BIN
docSite/assets/imgs/image-38.png
Normal file
|
After Width: | Height: | Size: 206 KiB |
BIN
docSite/assets/imgs/image-39.png
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
docSite/assets/imgs/image-40.png
Normal file
|
After Width: | Height: | Size: 190 KiB |
BIN
docSite/assets/imgs/image-41.png
Normal file
|
After Width: | Height: | Size: 352 KiB |
BIN
docSite/assets/imgs/image-42.png
Normal file
|
After Width: | Height: | Size: 282 KiB |
BIN
docSite/assets/imgs/image-43.png
Normal file
|
After Width: | Height: | Size: 190 KiB |
BIN
docSite/assets/imgs/image-44.png
Normal file
|
After Width: | Height: | Size: 198 KiB |
BIN
docSite/assets/imgs/image-45.png
Normal file
|
After Width: | Height: | Size: 241 KiB |
BIN
docSite/assets/imgs/image-46.png
Normal file
|
After Width: | Height: | Size: 249 KiB |
BIN
docSite/assets/imgs/image-47.png
Normal file
|
After Width: | Height: | Size: 251 KiB |
BIN
docSite/assets/imgs/image-48.png
Normal file
|
After Width: | Height: | Size: 311 KiB |
BIN
docSite/assets/imgs/image-49.png
Normal file
|
After Width: | Height: | Size: 119 KiB |
BIN
docSite/assets/imgs/image-50.png
Normal file
|
After Width: | Height: | Size: 248 KiB |
BIN
docSite/assets/imgs/searxng_plugin_guide1.png
Normal file
|
After Width: | Height: | Size: 339 KiB |
@@ -201,7 +201,7 @@ weight: 708
|
||||
- /imgs/model/qwen.svg - 通义千问
|
||||
- /imgs/model/sparkDesk.svg - 讯飞星火
|
||||
- /imgs/model/yi.svg - 零一万物
|
||||
-
|
||||
- /imgs/model/hunyuan.svg - 腾讯混元
|
||||
|
||||
## 特殊模型
|
||||
|
||||
|
||||
@@ -126,17 +126,40 @@ OneAPI 的 API Key 配置错误,需要修改`OPENAI_API_KEY`环境变量,并
|
||||
|
||||
## 四、常见模型问题
|
||||
|
||||
### 报错 - 模型响应为空
|
||||
### 报错 - 模型响应为空/模型报错
|
||||
|
||||
该错误是由于 stream 模式下,oneapi 直接结束了流请求,并且未返回任何内容导致。
|
||||
|
||||
4.8.10 版本新增了错误日志,报错时,会在日志中打印出实际发送的 Body 参数,可以复制该参数后,通过 curl 向 oneapi 发起请求测试。
|
||||
|
||||
由于 oneapi 在 stream 模式下,无法正确捕获错误,可以设置成 `stream=false` 后进行测试。可能的问题:
|
||||
由于 oneapi 在 stream 模式下,无法正确捕获错误,有时候可以设置成 `stream=false` 来获取到精确的错误。
|
||||
|
||||
可能的报错问题:
|
||||
|
||||
1. 国内模型命中风控
|
||||
2. 不支持的模型参数:只保留 messages 和必要参数来测试,删除其他参数测试。
|
||||
3. 参数不符合模型要求:例如有的模型 temperature 不支持 0,有些不支持两位小数。max_tokens 超出,上下文超长等。
|
||||
4. 模型部署有问题,stream 模式不兼容。
|
||||
|
||||
测试示例如下,可复制报错日志中的请求体进行测试:
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://api.openai.com/v1/chat/completions' \
|
||||
--header 'Authorization: Bearer sk-xxxx' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"model": "xxx",
|
||||
"temperature": 0.01,
|
||||
"max_tokens": 1000,
|
||||
"stream": true,
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": " 你是饿"
|
||||
}
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
||||
### 如何测试模型是否支持工具调用
|
||||
|
||||
|
||||
@@ -866,6 +866,8 @@ curl --location --request DELETE 'http://localhost:3000/api/core/chat/delHistory
|
||||
|
||||
### 清空所有历史记录
|
||||
|
||||
仅会情况通过 API Key 创建的对话历史记录,不会清空在线使用、分享链接等其他来源的对话历史记录。
|
||||
|
||||
{{< tabs tabTotal="3" >}}
|
||||
{{< tab tabName="请求示例" >}}
|
||||
{{< markdownify >}}
|
||||
@@ -1313,6 +1315,83 @@ curl --location --request POST 'http://localhost:3000/api/core/chat/feedback/upd
|
||||
|
||||
## 猜你想问
|
||||
|
||||
**4.8.16 后新版接口**
|
||||
|
||||
新版猜你想问,必须包含 appId 和 chatId 的参数才可以进行使用。会自动根据 chatId 去拉取最近 6 轮对话记录作为上下文来引导回答。
|
||||
|
||||
{{< tabs tabTotal="3" >}}
|
||||
{{< tab tabName="请求示例" >}}
|
||||
{{< markdownify >}}
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'http://localhost:3000/api/core/ai/agent/v2/createQuestionGuide' \
|
||||
--header 'Authorization: Bearer {{apikey}}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"appId": "appId",
|
||||
"chatId": "chatId",
|
||||
"questionGuide": {
|
||||
"open": true,
|
||||
"model": "GPT-4o-mini",
|
||||
"customPrompt": "你是一个智能助手,请根据用户的问题生成猜你想问。"
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
{{< /markdownify >}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab tabName="参数说明" >}}
|
||||
{{< markdownify >}}
|
||||
|
||||
{{% alert icon=" " context="success" %}}
|
||||
|
||||
| 参数名 | 类型 | 必填 | 说明 |
|
||||
| --- | --- | --- | --- |
|
||||
| appId | string | ✅ | 应用 Id |
|
||||
| chatId | string | ✅ | 对话 Id |
|
||||
| questionGuide | object | | 自定义配置,不传的话,则会根据 appId,取最新发布版本的配置 |
|
||||
|
||||
```ts
|
||||
type CreateQuestionGuideParams = OutLinkChatAuthProps & {
|
||||
appId: string;
|
||||
chatId: string;
|
||||
questionGuide?: {
|
||||
open: boolean;
|
||||
model?: string;
|
||||
customPrompt?: string;
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
{{% /alert %}}
|
||||
|
||||
{{< /markdownify >}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab tabName="响应示例" >}}
|
||||
{{< markdownify >}}
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"statusText": "",
|
||||
"message": "",
|
||||
"data": [
|
||||
"你对AI有什么看法?",
|
||||
"想了解AI的应用吗?",
|
||||
"你希望AI能做什么?"
|
||||
]
|
||||
}
|
||||
```
|
||||
{{< /markdownify >}}
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
---
|
||||
|
||||
**4.8.16 前旧版接口:**
|
||||
|
||||
{{< tabs tabTotal="3" >}}
|
||||
{{< tab tabName="请求示例" >}}
|
||||
{{< markdownify >}}
|
||||
@@ -1369,3 +1448,5 @@ curl --location --request POST 'http://localhost:3000/api/core/ai/agent/createQu
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: '升级到 V4.3(需要初始化)'
|
||||
title: '升级到 V4.3(包含升级脚本)'
|
||||
description: 'FastGPT 从旧版本升级到 V4.3 操作指南'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: '升级到 V4.4(需要初始化)'
|
||||
title: '升级到 V4.4(包含升级脚本)'
|
||||
description: 'FastGPT 从旧版本升级到 V4.4 操作指南'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: '升级到 V4.4.1(需要初始化)'
|
||||
title: '升级到 V4.4.1(包含升级脚本)'
|
||||
description: 'FastGPT 从旧版本升级到 V4.4.1 操作指南'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: '升级到 V4.4.2(需要初始化)'
|
||||
title: '升级到 V4.4.2(包含升级脚本)'
|
||||
description: 'FastGPT 从旧版本升级到 V4.4.2 操作指南'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.4.5(需要初始化)'
|
||||
title: 'V4.4.5(包含升级脚本)'
|
||||
description: 'FastGPT V4.4.5 更新'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.6(需要初始化)'
|
||||
title: 'V4.6(包含升级脚本)'
|
||||
description: 'FastGPT V4.6 更新'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.6.2(需要初始化)'
|
||||
title: 'V4.6.2(包含升级脚本)'
|
||||
description: 'FastGPT V4.6.2'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.6.3(需要初始化)'
|
||||
title: 'V4.6.3(包含升级脚本)'
|
||||
description: 'FastGPT V4.6.3'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.6.4(需要初始化)'
|
||||
title: 'V4.6.4(包含升级脚本)'
|
||||
description: 'FastGPT V4.6.4'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.6.9(需要初始化)'
|
||||
title: 'V4.6.9(包含升级脚本)'
|
||||
description: 'FastGPT V4.6.9更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.7.1(需要初始化)'
|
||||
title: 'V4.7.1(包含升级脚本)'
|
||||
description: 'FastGPT V4.7.1 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.8.1(需要初始化)'
|
||||
title: 'V4.8.1(包含升级脚本)'
|
||||
description: 'FastGPT V4.8.1 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.8.10(需要初始化)'
|
||||
title: 'V4.8.10(包含升级脚本)'
|
||||
description: 'FastGPT V4.8.10 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.8.12(需要初始化)'
|
||||
title: 'V4.8.12(包含升级脚本)'
|
||||
description: 'FastGPT V4.8.12 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.8.15(进行中)'
|
||||
title: 'V4.8.15(包含升级脚本)'
|
||||
description: 'FastGPT V4.8.15 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
@@ -23,11 +23,36 @@ weight: 809
|
||||
|
||||
## 升级指南
|
||||
|
||||
- 更新 FastGPT 镜像 tag: v4.8.15-alpha
|
||||
- 更新 FastGPT 商业版镜像 tag: v4.8.15-alpha (fastgpt-pro镜像)
|
||||
- 更新 fastgpt 镜像 tag: v4.8.15-fix3
|
||||
- 更新 fastgpt-pro 商业版镜像 tag: v4.8.15
|
||||
- Sandbox 镜像,可以不更新
|
||||
|
||||
|
||||
## 运行升级脚本
|
||||
|
||||
从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的 `rootkey`;{{host}} 替换成**FastGPT 域名**。
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://{{host}}/api/admin/initv4815' \
|
||||
--header 'rootkey: {{rootkey}}' \
|
||||
--header 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
会重置应用定时执行的字段,把 null 去掉,减少索引大小。
|
||||
|
||||
----
|
||||
|
||||
从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的 `rootkey`;{{host}} 替换成**fastgpt-pro域名**。
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://{{host}}/api/admin/init/refreshFreeUser' \
|
||||
--header 'rootkey: {{rootkey}}' \
|
||||
--header 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
重新计算一次免费版用户的时长,之前有版本升级时没有重新计算时间,导致会误发通知。
|
||||
|
||||
|
||||
## 完整更新内容
|
||||
|
||||
1. 新增 - API 知识库, 见 [API 知识库介绍](/docs/guide/knowledge_base/api_dataset/),外部文件库会被弃用。
|
||||
@@ -41,9 +66,11 @@ weight: 809
|
||||
9. 优化 - 支持 Markdown 文本分割时,只有标题,无内容。
|
||||
10. 优化 - 字符串变量替换,未赋值的变量会转成 undefined,而不是保留原来 id 串。
|
||||
11. 优化 - 全局变量默认值在 API 生效,并且自定义变量支持默认值。
|
||||
12. 修复 - 分享链接点赞鉴权问题。
|
||||
13. 修复 - 对话页面切换自动执行应用时,会误触发非自动执行应用。
|
||||
14. 修复 - 语言播放鉴权问题。
|
||||
15. 修复 - 插件应用知识库引用上限始终为 3000
|
||||
16. 修复 - 工作流编辑记录存储上限,去掉本地存储,增加异常离开时,强制自动保存。
|
||||
17. 修复 - 工作流特殊变量替换问题。($开头的字符串无法替换)
|
||||
12. 优化 - 增加 HTTP Body 的 JSON 解析,正则将 undefined 转 null,减少 Body 解析错误。
|
||||
13. 优化 - 定时执行增加运行日志,增加重试,减少报错概率。
|
||||
14. 修复 - 分享链接点赞鉴权问题。
|
||||
15. 修复 - 对话页面切换自动执行应用时,会误触发非自动执行应用。
|
||||
16. 修复 - 语言播放鉴权问题。
|
||||
17. 修复 - 插件应用知识库引用上限始终为 3000
|
||||
18. 修复 - 工作流编辑记录存储上限,去掉本地存储,增加异常离开时,强制自动保存。
|
||||
19. 修复 - 工作流特殊变量替换问题。($开头的字符串无法替换)
|
||||
|
||||
29
docSite/content/zh-cn/docs/development/upgrading/4816.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
title: 'V4.8.16(进行中)'
|
||||
description: 'FastGPT V4.8.16 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
toc: true
|
||||
weight: 808
|
||||
---
|
||||
|
||||
|
||||
## 完整更新内容
|
||||
|
||||
1. 新增 - SearXNG 搜索插件[点击查看教程](/docs/guide/plugins/searxng_plugin_guide/)
|
||||
2. 新增 - 商业版支持 API 知识库和链接集合定时同步。
|
||||
3. 新增 - 猜你想问支持选择模型和自定义提示词。
|
||||
4. 新增 - 钉钉和企微机器人 webhook 插件。
|
||||
5. 新增 - 商业版支持钉钉 SSO 登录配置。[点击查看教程](/docs/guide/admin/sso_dingtalk/)
|
||||
6. 新增 - 商业版支持飞书和语雀知识库导入。[点击查看教程](/docs/guide/knowledge_base/lark_dataset/)
|
||||
7. 新增 - sandbox 新增 createHmac 加密全局方法。
|
||||
8. 新增 - 工作流右键支持
|
||||
9. 优化 - 工作流/简易模式变量初始化代码,去除监听初始化,避免因渲染顺序不一致导致的失败。
|
||||
10. 优化 - 工作流获取数据类型不一致数据时,增加类型转化,避免 undefined。
|
||||
11. 修复 - 无法自动切换默认语言。增加分享链接,强制执行一次切换默认语言。
|
||||
12. 修复 - 数组选择器自动兼容 4.8.13 以前的数据。
|
||||
13. 修复 - 站点同步知识库,链接同步时未使用选择器。
|
||||
14. 修复 - 简易模式转工作流,没有把系统配置项转化。
|
||||
15. 修复 - 插件独立运行,变量初始值未赋上。
|
||||
16. 修复 - 工作流使用弹窗组件时,关闭弹窗后,有时候会出现页面偏移。
|
||||
17. 修复 - 插件调试时,日志未保存插件输入参数。
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.8.4(需要初始化)'
|
||||
title: 'V4.8.4(包含升级脚本)'
|
||||
description: 'FastGPT V4.8.4 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.8.5(需要初始化)'
|
||||
title: 'V4.8.5(包含升级脚本)'
|
||||
description: 'FastGPT V4.8.5 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.8.6(需要初始化)'
|
||||
title: 'V4.8.6(包含升级脚本)'
|
||||
description: 'FastGPT V4.8.6 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'V4.8.8(需要初始化)'
|
||||
title: 'V4.8.8(包含升级脚本)'
|
||||
description: 'FastGPT V4.8.8 更新说明'
|
||||
icon: 'upgrade'
|
||||
draft: false
|
||||
|
||||
@@ -55,14 +55,14 @@ docker-compose up -d
|
||||
|
||||
## 执行升级初始化脚本
|
||||
|
||||
镜像更新完后,可以查看文档中的`版本介绍`,通常需要执行升级脚本的版本都会标明`需要初始化`,打开对应的文档,参考说明执行初始化脚本即可,大部分时候都是需要发送一个`POST`请求。
|
||||
镜像更新完后,可以查看文档中的`版本介绍`,通常需要执行升级脚本的版本都会标明`包含升级脚本`,打开对应的文档,参考说明执行**升级脚本**即可,大部分时候都是需要发送一个`POST`请求。
|
||||
|
||||
|
||||
## QA
|
||||
|
||||
### 为什么需要初始化
|
||||
### 为什么需要执行升级脚本
|
||||
|
||||
数据表出现大幅度变更,无法通过设置默认值,或复杂度较高时,会通过初始化来更新部分数据表字段。
|
||||
数据表出现大幅度变更,无法通过设置默认值,或复杂度较高时,会通过升级脚本来更新部分数据表字段。
|
||||
严格按初始化步骤进行操作,不会造成旧数据丢失。但在初始化过程中,如果数据量大,需要初始化的时间较长,这段时间可能会造成服务无法正常使用。
|
||||
|
||||
### {{host}} 是什么
|
||||
|
||||
9
docSite/content/zh-cn/docs/guide/admin/_index.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
weight: 490
|
||||
title: '商业版后台'
|
||||
description: '商业版后台使用教程'
|
||||
icon: 'chat_bubble'
|
||||
draft: false
|
||||
images: []
|
||||
---
|
||||
<!-- 470 ~ 500 -->
|
||||
44
docSite/content/zh-cn/docs/guide/admin/sso_dingtalk.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
weight: 490
|
||||
title: '钉钉 SSO 配置'
|
||||
description: '钉钉 SSO 登录'
|
||||
icon: 'chat_bubble'
|
||||
draft: false
|
||||
images: []
|
||||
---
|
||||
|
||||
## 1. 注册钉钉应用
|
||||
|
||||
登录 [钉钉开放平台](https://open-dev.dingtalk.com/fe/app?hash=%23%2Fcorp%2Fapp#/corp/app),创建一个应用。
|
||||
|
||||

|
||||
|
||||
## 2. 配置钉钉应用安全设置
|
||||
|
||||
点击进入创建好的应用后,点开`安全设置`,配置出口 IP(服务器 IP),和重定向 URL。重定向 URL 填写逻辑:
|
||||
|
||||
`{{fastgpt 域名}}/login/provider`
|
||||
|
||||

|
||||
|
||||
## 3. 设置钉钉应用权限
|
||||
|
||||
点击进入创建好的应用后,点开`权限设置`,开放两个权限: `个人手机号信息`和`通讯录个人信息读权限`
|
||||
|
||||

|
||||
|
||||
## 4. 发布应用
|
||||
|
||||
点击进入创建好的应用后,点开`版本管理与发布`,随便创建一个新版本即可。
|
||||
|
||||
## 5. 在 FastGPT Admin 配置钉钉应用 id
|
||||
|
||||
名字都是对应上,直接填写即可。
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
| |  |
|
||||
|
||||
## 6. 测试
|
||||
|
||||

|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
title: '飞书知识库'
|
||||
description: 'FastGPT 飞书知识库功能介绍和使用方式'
|
||||
icon: 'language'
|
||||
draft: false
|
||||
toc: true
|
||||
weight: 405
|
||||
---
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
|
||||
FastGPT v4.8.16 版本开始,商业版用户支持飞书知识库导入,用户可以通过配置飞书应用的 appId 和 appSecret,并选中一个**文档空间的顶层文件夹**来导入飞书知识库。目前处于测试阶段,部分交互有待优化。
|
||||
|
||||
由于飞书限制,无法直接获取所有文档内容,目前仅可以获取共享空间下文件目录的内容,无法获取个人空间和知识库里的内容。
|
||||
|
||||
|
||||
## 1. 创建飞书应用
|
||||
|
||||
打开 [飞书开放平台](https://open.feishu.cn/?lang=zh-CN),点击**创建应用**,选择**自建应用**,然后填写应用名称。
|
||||
|
||||
## 2. 配置应用权限
|
||||
|
||||
创建应用后,进入应用可以配置相关权限,这里需要增加两个权限:
|
||||
|
||||
1. 获取云空间文件夹下的云文档清单
|
||||
2. 查看新版文档
|
||||
|
||||

|
||||
|
||||
## 3. 获取 appId 和 appSecret
|
||||
|
||||

|
||||
|
||||
## 4. 给 Folder 增加权限
|
||||
|
||||
可参考飞书教程: https://open.feishu.cn/document/server-docs/docs/drive-v1/faq#b02e5bfb
|
||||
|
||||
大致总结为:
|
||||
|
||||
1. 把刚刚创建的应用拉入一个群里
|
||||
2. 给这个群增加目录权限
|
||||
|
||||
如果你的目录已经给全员组增加权限了,则可以跳过上面步骤,直接获取 Folder Token。
|
||||
|
||||

|
||||
|
||||
## 5. 获取 Folder Token
|
||||
|
||||
可以页面路径上获取 Folder Token,注意不要把问号复制进来。
|
||||
|
||||

|
||||
|
||||
## 6. 创建知识库
|
||||
|
||||
根据 3 和 5 获取到的 3 个参数,创建知识库,选择飞书文件库类型,然后填入对应的参数,点击创建。
|
||||
|
||||

|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: '语雀文件库'
|
||||
description: 'FastGPT 语雀文件库功能介绍和使用方式'
|
||||
icon: 'language'
|
||||
draft: false
|
||||
toc: true
|
||||
weight: 405
|
||||
---
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
|
||||
FastGPT v4.8.16 版本开始,商业版用户支持语雀文件库导入,用户可以通过配置语雀的 token 和 uid 来导入语雀文档库。目前处于测试阶段,部分交互有待优化。
|
||||
|
||||
## 1. 获取语雀的 token 和 uid
|
||||
|
||||
在语雀首页 - 个人头像 - 设置,可找到对应参数。
|
||||
|
||||

|
||||
|
||||
参考下图获取 Token 和 User ID,注意给 Token 赋值权限:
|
||||
|
||||
| 获取 Token | 增加权限 | 获取 User ID |
|
||||
| --- | --- | --- |
|
||||
|  |  |  |
|
||||
|
||||
## 2. 创建知识库
|
||||
|
||||
使用上一步获取的 token 和 uid,创建知识库,选择语雀文件库类型,然后填入对应的参数,点击创建。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 3. 导入文档
|
||||
|
||||
创建完知识库后,点击`添加文件`即可导入语雀的文档库,跟随引导即可。
|
||||
|
||||
语雀知识库支持定时同步功能,每天会不定时的扫描一次,如果文档有更新,则会进行同步,也可以进行手动同步。
|
||||
|
||||

|
||||
178
docSite/content/zh-cn/docs/guide/plugins/searxng_plugin_guide.md
Normal file
@@ -0,0 +1,178 @@
|
||||
---
|
||||
title: "SearXNG 搜索插件配置与使用说明"
|
||||
description: "FastGPT SearXNG 搜索插件配置指南"
|
||||
icon: "search"
|
||||
draft: false
|
||||
toc: true
|
||||
weight: 303
|
||||
---
|
||||
|
||||
[SearXNG](https://github.com/searxng/searxng)是一款免费的互联网元搜索引擎,它汇总了来自各种搜索服务和数据库的结果。它不会跟踪或分析用户。用户可以自行部署它进行使用。本文介绍 Searxng 的部署以及接入 FastGPT 插件。
|
||||
|
||||
|
||||
## 1. 部署应用
|
||||
|
||||
这里介绍在 Sealos 中部署 SearXNG 的方法。Docker 部署,可以直接参考 [SearXNG 官方教程](https://github.com/searxng/searxng)。
|
||||
|
||||
点击打开 [Sealos 北京区](https://bja.sealos.run/),点击应用部署,并新建一个应用:
|
||||
|
||||
| 打开应用部署 | 点击新建应用 |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
|
||||
## 2. 部署配置
|
||||
|
||||
把下面参数,填入配置中:
|
||||
|
||||
* 镜像名: searxng/searxng:latest
|
||||
* CPU: 0.2
|
||||
* 内存: 512M
|
||||
* 容器暴露端口: 8080
|
||||
* 开启公网访问
|
||||
* 点击高级配置,填写环境变量和配置文件
|
||||
|
||||

|
||||
|
||||
**环境变量**
|
||||
|
||||
填下面两个内容,主要是为了减小并发,不然内存占用非常大。
|
||||
|
||||
```
|
||||
UWSGI_WORKERS=4
|
||||
UWSGI_THREADS=4
|
||||
```
|
||||
|
||||
**配置文件**
|
||||
|
||||
新增一个配置文件,文件名:`/etc/searx/settings.yml`
|
||||
文件内容:
|
||||
|
||||
```txt
|
||||
general:
|
||||
debug: false
|
||||
instance_name: "searxng"
|
||||
privacypolicy_url: false
|
||||
donation_url: false
|
||||
contact_url: false
|
||||
enable_metrics: true
|
||||
open_metrics: ''
|
||||
|
||||
brand:
|
||||
new_issue_url: https://github.com/searxng/searxng/issues/new
|
||||
docs_url: https://docs.searxng.org/
|
||||
public_instances: https://searx.space
|
||||
wiki_url: https://github.com/searxng/searxng/wiki
|
||||
issue_url: https://github.com/searxng/searxng/issues
|
||||
|
||||
search:
|
||||
safe_search: 0
|
||||
autocomplete: ""
|
||||
autocomplete_min: 4
|
||||
default_lang: "auto"
|
||||
ban_time_on_fail: 5
|
||||
max_ban_time_on_fail: 120
|
||||
formats:
|
||||
- html
|
||||
|
||||
server:
|
||||
port: 8080
|
||||
bind_address: "0.0.0.0"
|
||||
base_url: false
|
||||
limiter: false
|
||||
public_instance: false
|
||||
secret_key: "example"
|
||||
image_proxy: false
|
||||
http_protocol_version: "1.0"
|
||||
method: "POST"
|
||||
default_http_headers:
|
||||
X-Content-Type-Options: nosniff
|
||||
X-Download-Options: noopen
|
||||
X-Robots-Tag: noindex, nofollow
|
||||
Referrer-Policy: no-referrer
|
||||
|
||||
redis:
|
||||
url: false
|
||||
|
||||
ui:
|
||||
static_path: ""
|
||||
static_use_hash: false
|
||||
templates_path: ""
|
||||
default_theme: simple
|
||||
default_locale: ""
|
||||
query_in_title: false
|
||||
infinite_scroll: false
|
||||
center_alignment: false
|
||||
theme_args:
|
||||
simple_style: auto
|
||||
|
||||
outgoing:
|
||||
request_timeout: 30.0
|
||||
max_request_timeout: 40.0
|
||||
pool_connections: 200
|
||||
pool_maxsize: 50
|
||||
enable_http2: false
|
||||
retries: 5
|
||||
|
||||
engines:
|
||||
|
||||
- name: bing
|
||||
engine: bing
|
||||
shortcut: bi
|
||||
|
||||
doi_resolvers:
|
||||
oadoi.org: 'https://oadoi.org/'
|
||||
doi.org: 'https://doi.org/'
|
||||
doai.io: 'https://dissem.in/'
|
||||
sci-hub.se: 'https://sci-hub.se/'
|
||||
sci-hub.st: 'https://sci-hub.st/'
|
||||
sci-hub.ru: 'https://sci-hub.ru/'
|
||||
|
||||
default_doi_resolver: 'oadoi.org'
|
||||
```
|
||||
|
||||
国内目前只有 Bing 引擎可以正常用,所以上面的配置只配置了 bing 引擎。如果在海外部署,可以使用[Sealos 新加坡可用区](https://cloud.sealos.io/),并配置其他搜索引擎,可以参考[SearXNG 默认配置文件](https://github.com/searxng/searxng/blob/master/searx/settings.yml), 从里面复制一些 engine 配置。例如:
|
||||
|
||||
```
|
||||
- name: duckduckgo
|
||||
engine: duckduckgo
|
||||
shortcut: ddg
|
||||
|
||||
- name: google
|
||||
engine: google
|
||||
shortcut: go
|
||||
```
|
||||
|
||||
## 3. FastGPT 使用
|
||||
|
||||
复制 Sealos 部署后提供的公网地址,填入 FastGPT 的 SearXNG 插件的 URL 中。
|
||||
|
||||
| 复制公网地址| 填入 URL |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
|
||||
## 返回格式
|
||||
|
||||
* 成功时返回搜索结果数组:
|
||||
|
||||
```Bash
|
||||
{
|
||||
"result": "[{\"title\":\"标题1\",\"link\":\"链接1\",\"snippet\":\"摘要1\"}, ...]"
|
||||
}
|
||||
```
|
||||
|
||||
* 失败时通过 Promise.reject 可能返回错误信息:
|
||||
|
||||
```Bash
|
||||
- "缺少查询参数"
|
||||
- "缺少url"
|
||||
- "Failed to fetch data from Search XNG"
|
||||
```
|
||||
|
||||
一般问题来源于参数缺失与服务部署,如有更多问题可在用户群提问。
|
||||
|
||||
## FAQ
|
||||
|
||||
### 无搜索结果
|
||||
|
||||
1. 先直接打开外网地址,测试是否可以正常搜索。
|
||||
2. 检查是否有超时的搜索引擎,通过 API 调用时不会返回结果。
|
||||
@@ -84,4 +84,18 @@ function main({input}){
|
||||
}
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
### createHmac 加密
|
||||
|
||||
与 node 中 crypto 的 createHmac 方法一致。
|
||||
|
||||
```js
|
||||
function main({secret}){
|
||||
const {sign,timestamp} = createHmac('sha256',secret)
|
||||
|
||||
return {
|
||||
sign,timestamp
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
title: "接入钉钉机器人教程"
|
||||
description: "FastGPT 接入钉钉机器人教程"
|
||||
icon: "chat"
|
||||
draft: false
|
||||
toc: true
|
||||
weight: 505
|
||||
---
|
||||
|
||||
从 4.8.16 版本起,FastGPT 商业版支持直接接入钉钉机器人,无需额外的 API。
|
||||
|
||||
## 1. 创建钉钉企业内部应用
|
||||
|
||||
1. 在[钉钉开发者后台](https://open-dev.dingtalk.com/fe/app)创建企业内部应用。
|
||||
|
||||

|
||||
|
||||
2. 获取**Client ID**和**Client Secret**。
|
||||
|
||||

|
||||
|
||||
## 2. 为 FastGPT 添加发布渠道
|
||||
|
||||
在 FastGPT 中选择要接入的应用,在**发布渠道**页面,新建一个接入钉钉机器人的发布渠道。
|
||||
|
||||
将前面拿到的 **Client ID** 和 **Client Secret** 填入配置弹窗中。
|
||||
|
||||

|
||||
|
||||
创建完成后,点击**请求地址**按钮,然后复制回调地址。
|
||||
|
||||
## 3. 为应用添加**机器人**应用能力。
|
||||
|
||||
在钉钉开发者后台,点击左侧**添加应用能力**,为刚刚创建的企业内部应用添加 **机器人** 应用能力。
|
||||
|
||||

|
||||
|
||||
## 4. 配置机器人回调地址
|
||||
|
||||
点击左侧**机器人** 应用能力,然后将底部**消息接受模式**设置为**HTTP模式**,消息接收地址填入前面复制的 FastGPT 的回调地址。
|
||||
|
||||

|
||||
|
||||
调试完成后,点击**发布**。
|
||||
|
||||
## 5. 发布应用
|
||||
机器人发布后,还需要在**版本管理与发布**页面发布应用版本。
|
||||
|
||||

|
||||
|
||||
点击**创建新版本**后,设置版本号和版本描述后点击保存发布即可。
|
||||
|
||||

|
||||
|
||||
应用发布后,即可在钉钉企业中使用机器人功能,可对机器人私聊。或者在群组添加机器人后`@机器人`,触发对话。
|
||||
|
||||

|
||||
@@ -114,15 +114,15 @@ services:
|
||||
# fastgpt
|
||||
sandbox:
|
||||
container_name: sandbox
|
||||
image: ghcr.io/labring/fastgpt-sandbox:v4.8.14 # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.14 # 阿里云
|
||||
image: ghcr.io/labring/fastgpt-sandbox:v4.8.15 # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.15 # 阿里云
|
||||
networks:
|
||||
- fastgpt
|
||||
restart: always
|
||||
fastgpt:
|
||||
container_name: fastgpt
|
||||
image: ghcr.io/labring/fastgpt:v4.8.14-milvus-fix # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.14-milvus-fix # 阿里云
|
||||
image: ghcr.io/labring/fastgpt:v4.8.15-fix2 # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix2 # 阿里云
|
||||
ports:
|
||||
- 3000:3000
|
||||
networks:
|
||||
|
||||
@@ -72,15 +72,15 @@ services:
|
||||
# fastgpt
|
||||
sandbox:
|
||||
container_name: sandbox
|
||||
image: ghcr.io/labring/fastgpt-sandbox:v4.8.13 # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.13 # 阿里云
|
||||
image: ghcr.io/labring/fastgpt-sandbox:v4.8.15 # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.15 # 阿里云
|
||||
networks:
|
||||
- fastgpt
|
||||
restart: always
|
||||
fastgpt:
|
||||
container_name: fastgpt
|
||||
image: ghcr.io/labring/fastgpt:v4.8.14 # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.14 # 阿里云
|
||||
image: ghcr.io/labring/fastgpt:v4.8.15-fix2 # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix2 # 阿里云
|
||||
ports:
|
||||
- 3000:3000
|
||||
networks:
|
||||
|
||||
@@ -53,15 +53,15 @@ services:
|
||||
wait $$!
|
||||
sandbox:
|
||||
container_name: sandbox
|
||||
image: ghcr.io/labring/fastgpt-sandbox:v4.8.14 # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.14 # 阿里云
|
||||
image: ghcr.io/labring/fastgpt-sandbox:v4.8.15 # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.15 # 阿里云
|
||||
networks:
|
||||
- fastgpt
|
||||
restart: always
|
||||
fastgpt:
|
||||
container_name: fastgpt
|
||||
image: ghcr.io/labring/fastgpt:v4.8.14-milvus-fix # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.14-milvus-fix # 阿里云
|
||||
image: ghcr.io/labring/fastgpt:v4.8.15-fix2 # git
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix2 # 阿里云
|
||||
ports:
|
||||
- 3000:3000
|
||||
networks:
|
||||
|
||||
@@ -12,7 +12,8 @@ export enum DatasetErrEnum {
|
||||
unLinkCollection = 'unLinkCollection',
|
||||
invalidVectorModelOrQAModel = 'invalidVectorModelOrQAModel',
|
||||
notSupportSync = 'notSupportSync',
|
||||
sameApiCollection = 'sameApiCollection'
|
||||
sameApiCollection = 'sameApiCollection',
|
||||
noApiServer = 'noApiServer'
|
||||
}
|
||||
const datasetErr = [
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ export const ERROR_RESPONSE: Record<
|
||||
[ERROR_ENUM.tooManyRequest]: {
|
||||
code: 429,
|
||||
statusText: ERROR_ENUM.tooManyRequest,
|
||||
message: 'Too many request',
|
||||
message: i18nT('common:error.too_many_request'),
|
||||
data: null
|
||||
},
|
||||
[ERROR_ENUM.insufficientQuota]: {
|
||||
|
||||
7
packages/global/common/middle/tracks/constants.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export enum TrackEnum {
|
||||
login = 'login',
|
||||
createApp = 'createApp',
|
||||
useAppTemplate = 'useAppTemplate',
|
||||
createDataset = 'createDataset',
|
||||
appNodes = 'appNodes'
|
||||
}
|
||||
18
packages/global/common/middle/tracks/type.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { TrackEnum } from './constants';
|
||||
import { OAuthEnum } from '../../../support/user/constant';
|
||||
import { AppTypeEnum } from '../../../core/app/constants';
|
||||
|
||||
export type PushTrackCommonType = {
|
||||
uid: string;
|
||||
teamId: string;
|
||||
tmbId: string;
|
||||
};
|
||||
|
||||
export type TrackSchemaType = {
|
||||
event: TrackEnum;
|
||||
createTime: Date;
|
||||
uid?: string;
|
||||
teamId?: string;
|
||||
tmbId?: string;
|
||||
data: Record<string, any>;
|
||||
};
|
||||
@@ -29,7 +29,7 @@ export const simpleText = (text = '') => {
|
||||
replace {{variable}} to value
|
||||
*/
|
||||
export function replaceVariable(text: any, obj: Record<string, string | number>) {
|
||||
if (!(typeof text === 'string')) return text;
|
||||
if (typeof text !== 'string') return text;
|
||||
|
||||
for (const key in obj) {
|
||||
const val = obj[key];
|
||||
|
||||
@@ -58,11 +58,13 @@ export type FastGPTFeConfigsType = {
|
||||
icon?: string;
|
||||
title?: string;
|
||||
url?: string;
|
||||
autoLogin?: boolean;
|
||||
};
|
||||
oauth?: {
|
||||
github?: string;
|
||||
google?: string;
|
||||
wechat?: string;
|
||||
dingtalk?: string;
|
||||
microsoft?: {
|
||||
clientId?: string;
|
||||
tenantId?: string;
|
||||
|
||||
@@ -65,3 +65,13 @@ export const Prompt_CQJson = `请帮我执行一个“问题分类”任务,
|
||||
问题:"{{question}}"
|
||||
类型ID=
|
||||
`;
|
||||
|
||||
export const PROMPT_QUESTION_GUIDE = `You are an AI assistant tasked with predicting the user's next question based on the conversation history. Your goal is to generate 3 potential questions that will guide the user to continue the conversation. When generating these questions, adhere to the following rules:
|
||||
|
||||
1. Use the same language as the user's last question in the conversation history.
|
||||
2. Keep each question under 20 characters in length.
|
||||
|
||||
Analyze the conversation history provided to you and use it as context to generate relevant and engaging follow-up questions. Your predictions should be logical extensions of the current topic or related areas that the user might be interested in exploring further.
|
||||
|
||||
Remember to maintain consistency in tone and style with the existing conversation while providing diverse options for the user to choose from. Your goal is to keep the conversation flowing naturally and help the user delve deeper into the subject matter or explore related topics.`;
|
||||
export const PROMPT_QUESTION_GUIDE_FOOTER = `Please strictly follow the format rules: \nReturn questions in JSON format: ['Question 1', 'Question 2', 'Question 3']. Your output: `;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { PROMPT_QUESTION_GUIDE } from '../ai/prompt/agent';
|
||||
import {
|
||||
AppTTSConfigType,
|
||||
AppFileSelectConfigType,
|
||||
AppWhisperConfigType,
|
||||
AppAutoExecuteConfigType
|
||||
AppAutoExecuteConfigType,
|
||||
AppQGConfigType
|
||||
} from './type';
|
||||
|
||||
export enum AppTypeEnum {
|
||||
@@ -28,6 +30,12 @@ export const defaultWhisperConfig: AppWhisperConfigType = {
|
||||
autoTTSResponse: false
|
||||
};
|
||||
|
||||
export const defaultQGConfig: AppQGConfigType = {
|
||||
open: false,
|
||||
model: 'gpt-4o-mini',
|
||||
customPrompt: PROMPT_QUESTION_GUIDE
|
||||
};
|
||||
|
||||
export const defaultChatInputGuideConfig = {
|
||||
open: false,
|
||||
textList: [],
|
||||
|
||||
10
packages/global/core/app/type.d.ts
vendored
@@ -97,7 +97,7 @@ export type AppChatConfigType = {
|
||||
welcomeText?: string;
|
||||
variables?: VariableItemType[];
|
||||
autoExecute?: AppAutoExecuteConfigType;
|
||||
questionGuide?: boolean;
|
||||
questionGuide?: AppQGConfigType;
|
||||
ttsConfig?: AppTTSConfigType;
|
||||
whisperConfig?: AppWhisperConfigType;
|
||||
scheduledTriggerConfig?: AppScheduledTriggerConfigType;
|
||||
@@ -148,6 +148,14 @@ export type AppWhisperConfigType = {
|
||||
autoSend: boolean;
|
||||
autoTTSResponse: boolean;
|
||||
};
|
||||
|
||||
// question guide
|
||||
export type AppQGConfigType = {
|
||||
open: boolean;
|
||||
model?: string;
|
||||
customPrompt?: string;
|
||||
};
|
||||
|
||||
// question guide text
|
||||
export type ChatInputGuideConfigType = {
|
||||
open: boolean;
|
||||
|
||||
@@ -33,6 +33,7 @@ export enum ChatSourceEnum {
|
||||
online = 'online',
|
||||
share = 'share',
|
||||
api = 'api',
|
||||
cronJob = 'cronJob',
|
||||
team = 'team',
|
||||
feishu = 'feishu',
|
||||
official_account = 'official_account',
|
||||
@@ -52,6 +53,9 @@ export const ChatSourceMap = {
|
||||
[ChatSourceEnum.api]: {
|
||||
name: i18nT('common:core.chat.logs.api')
|
||||
},
|
||||
[ChatSourceEnum.cronJob]: {
|
||||
name: i18nT('chat:source_cronJob')
|
||||
},
|
||||
[ChatSourceEnum.team]: {
|
||||
name: i18nT('common:core.chat.logs.team')
|
||||
},
|
||||
|
||||
2
packages/global/core/chat/type.d.ts
vendored
@@ -16,6 +16,7 @@ import { DatasetSearchModeEnum } from '../dataset/constants';
|
||||
import { DispatchNodeResponseType } from '../workflow/runtime/type.d';
|
||||
import { ChatBoxInputType } from '../../../../projects/app/src/components/core/chat/ChatContainer/ChatBox/type';
|
||||
import { WorkflowInteractiveResponseType } from '../workflow/template/system/interactive/type';
|
||||
import { FlowNodeInputItemType } from '../workflow/type/io';
|
||||
|
||||
export type ChatSchema = {
|
||||
_id: string;
|
||||
@@ -35,6 +36,7 @@ export type ChatSchema = {
|
||||
variableList?: VariableItemType[];
|
||||
welcomeText?: string;
|
||||
variables: Record<string, any>;
|
||||
pluginInputs?: FlowNodeInputItemType[];
|
||||
metadata?: Record<string, any>;
|
||||
};
|
||||
|
||||
|
||||
7
packages/global/core/dataset/api.d.ts
vendored
@@ -17,6 +17,11 @@ export type DatasetUpdateBody = {
|
||||
externalReadUrl?: DatasetSchemaType['externalReadUrl'];
|
||||
defaultPermission?: DatasetSchemaType['defaultPermission'];
|
||||
apiServer?: DatasetSchemaType['apiServer'];
|
||||
yuqueServer?: DatasetSchemaType['yuqueServer'];
|
||||
feishuServer?: DatasetSchemaType['feishuServer'];
|
||||
|
||||
// sync schedule
|
||||
autoSync?: boolean;
|
||||
};
|
||||
|
||||
/* ================= collection ===================== */
|
||||
@@ -47,6 +52,8 @@ export type CreateDatasetCollectionParams = DatasetCollectionChunkMetadataType &
|
||||
tags?: string[];
|
||||
|
||||
createTime?: Date;
|
||||
updateTime?: Date;
|
||||
nextSyncTime?: Date;
|
||||
};
|
||||
|
||||
export type ApiCreateDatasetCollectionParams = DatasetCollectionChunkMetadataType & {
|
||||
|
||||
11
packages/global/core/dataset/apiDataset.d.ts
vendored
@@ -22,3 +22,14 @@ export type APIFileContentResponse = {
|
||||
export type APIFileReadResponse = {
|
||||
url: string;
|
||||
};
|
||||
|
||||
export type FeishuServer = {
|
||||
appId: string;
|
||||
appSecret: string;
|
||||
folderToken: string;
|
||||
};
|
||||
|
||||
export type YuqueServer = {
|
||||
userId: string;
|
||||
token: string;
|
||||
};
|
||||
|
||||
@@ -6,7 +6,9 @@ export enum DatasetTypeEnum {
|
||||
dataset = 'dataset',
|
||||
websiteDataset = 'websiteDataset', // depp link
|
||||
externalFile = 'externalFile',
|
||||
apiDataset = 'apiDataset'
|
||||
apiDataset = 'apiDataset',
|
||||
feishu = 'feishu',
|
||||
yuque = 'yuque'
|
||||
}
|
||||
export const DatasetTypeMap = {
|
||||
[DatasetTypeEnum.folder]: {
|
||||
@@ -33,6 +35,16 @@ export const DatasetTypeMap = {
|
||||
icon: 'core/dataset/externalDatasetOutline',
|
||||
label: 'api_file',
|
||||
collectionLabel: 'common.File'
|
||||
},
|
||||
[DatasetTypeEnum.feishu]: {
|
||||
icon: 'core/dataset/feishuDatasetOutline',
|
||||
label: 'feishu_dataset',
|
||||
collectionLabel: 'common.File'
|
||||
},
|
||||
[DatasetTypeEnum.yuque]: {
|
||||
icon: 'core/dataset/yuqueDatasetOutline',
|
||||
label: 'yuque_dataset',
|
||||
collectionLabel: 'common.File'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -82,7 +94,8 @@ export const DatasetCollectionTypeMap = {
|
||||
|
||||
export enum DatasetCollectionSyncResultEnum {
|
||||
sameRaw = 'sameRaw',
|
||||
success = 'success'
|
||||
success = 'success',
|
||||
failed = 'failed'
|
||||
}
|
||||
export const DatasetCollectionSyncResultMap = {
|
||||
[DatasetCollectionSyncResultEnum.sameRaw]: {
|
||||
@@ -90,6 +103,9 @@ export const DatasetCollectionSyncResultMap = {
|
||||
},
|
||||
[DatasetCollectionSyncResultEnum.success]: {
|
||||
label: i18nT('common:core.dataset.collection.sync.result.success')
|
||||
},
|
||||
[DatasetCollectionSyncResultEnum.failed]: {
|
||||
label: i18nT('dataset:sync_collection_failed')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
13
packages/global/core/dataset/type.d.ts
vendored
@@ -10,7 +10,7 @@ import {
|
||||
} from './constants';
|
||||
import { DatasetPermission } from '../../support/permission/dataset/controller';
|
||||
import { Permission } from '../../support/permission/controller';
|
||||
import { APIFileServer } from './apiDataset';
|
||||
import { APIFileServer, FeishuServer, YuqueServer } from './apiDataset';
|
||||
|
||||
export type DatasetSchemaType = {
|
||||
_id: string;
|
||||
@@ -33,9 +33,10 @@ export type DatasetSchemaType = {
|
||||
};
|
||||
inheritPermission: boolean;
|
||||
apiServer?: APIFileServer;
|
||||
feishuServer?: FeishuServer;
|
||||
yuqueServer?: YuqueServer;
|
||||
|
||||
syncSchedule?: { cronString: string; timezone: string };
|
||||
syncNextTime?: Date;
|
||||
autoSync?: boolean;
|
||||
|
||||
// abandon
|
||||
externalReadUrl?: string;
|
||||
@@ -65,11 +66,13 @@ export type DatasetCollectionSchemaType = {
|
||||
fileId?: string; // local file id
|
||||
rawLink?: string; // link url
|
||||
externalFileId?: string; //external file id
|
||||
apiFileId?: string; // api file id
|
||||
externalFileUrl?: string; // external import url
|
||||
|
||||
nextSyncTime?: Date;
|
||||
|
||||
rawTextLength?: number;
|
||||
hashRawText?: string;
|
||||
externalFileUrl?: string; // external import url
|
||||
apiFileId?: string; // api file id
|
||||
metadata?: {
|
||||
webPageSelector?: string;
|
||||
relatedImgId?: string; // The id of the associated image collections
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ChatCompletionRequestMessageRoleEnum } from '../../ai/constants';
|
||||
import { NodeInputKeyEnum, NodeOutputKeyEnum } from '../constants';
|
||||
import { NodeInputKeyEnum, NodeOutputKeyEnum, WorkflowIOValueTypeEnum } from '../constants';
|
||||
import { FlowNodeTypeEnum } from '../node/constant';
|
||||
import { StoreNodeItemType } from '../type/node';
|
||||
import { StoreEdgeItemType } from '../type/edge';
|
||||
@@ -251,6 +251,7 @@ export const getReferenceVariableValue = ({
|
||||
return variables[outputId];
|
||||
}
|
||||
|
||||
// 避免 value 刚好就是二个元素的字符串数组
|
||||
const node = nodes.find((node) => node.nodeId === sourceNodeId);
|
||||
if (!node) {
|
||||
return value;
|
||||
@@ -279,6 +280,31 @@ export const getReferenceVariableValue = ({
|
||||
return value;
|
||||
};
|
||||
|
||||
export const formatVariableValByType = (val: any, valueType?: WorkflowIOValueTypeEnum) => {
|
||||
if (!valueType) return val;
|
||||
// Value type check, If valueType invalid, return undefined
|
||||
if (valueType.startsWith('array') && !Array.isArray(val)) return undefined;
|
||||
if (valueType === WorkflowIOValueTypeEnum.boolean) return Boolean(val);
|
||||
if (valueType === WorkflowIOValueTypeEnum.number) return Number(val);
|
||||
if (valueType === WorkflowIOValueTypeEnum.string) {
|
||||
if (val === undefined) return 'undefined';
|
||||
if (val === null) return 'null';
|
||||
return typeof val === 'object' ? JSON.stringify(val) : String(val);
|
||||
}
|
||||
if (
|
||||
[
|
||||
WorkflowIOValueTypeEnum.object,
|
||||
WorkflowIOValueTypeEnum.chatHistory,
|
||||
WorkflowIOValueTypeEnum.datasetQuote,
|
||||
WorkflowIOValueTypeEnum.selectApp,
|
||||
WorkflowIOValueTypeEnum.selectDataset
|
||||
].includes(valueType) &&
|
||||
typeof val !== 'object'
|
||||
)
|
||||
return undefined;
|
||||
|
||||
return val;
|
||||
};
|
||||
// replace {{$xx.xx$}} variables for text
|
||||
export function replaceEditorVariable({
|
||||
text,
|
||||
@@ -308,7 +334,7 @@ export function replaceEditorVariable({
|
||||
if (!node) return;
|
||||
|
||||
const output = node.outputs.find((output) => output.id === id);
|
||||
if (output) return output.value;
|
||||
if (output) return formatVariableValByType(output.value, output.valueType);
|
||||
|
||||
const input = node.inputs.find((input) => input.key === id);
|
||||
if (input) return getReferenceVariableValue({ value: input.value, nodes, variables });
|
||||
|
||||
@@ -26,12 +26,14 @@ import type {
|
||||
AppScheduledTriggerConfigType,
|
||||
ChatInputGuideConfigType,
|
||||
AppChatConfigType,
|
||||
AppAutoExecuteConfigType
|
||||
AppAutoExecuteConfigType,
|
||||
AppQGConfigType
|
||||
} from '../app/type';
|
||||
import { EditorVariablePickerType } from '../../../web/components/common/Textarea/PromptEditor/type';
|
||||
import {
|
||||
defaultAutoExecuteConfig,
|
||||
defaultChatInputGuideConfig,
|
||||
defaultQGConfig,
|
||||
defaultTTSConfig,
|
||||
defaultWhisperConfig
|
||||
} from '../app/constants';
|
||||
@@ -76,9 +78,14 @@ export const splitGuideModule = (guideModules?: StoreNodeItemType) => {
|
||||
const variables: VariableItemType[] =
|
||||
guideModules?.inputs.find((item) => item.key === NodeInputKeyEnum.variables)?.value ?? [];
|
||||
|
||||
const questionGuide: boolean =
|
||||
!!guideModules?.inputs?.find((item) => item.key === NodeInputKeyEnum.questionGuide)?.value ??
|
||||
false;
|
||||
// Adapt old version
|
||||
const questionGuideVal = guideModules?.inputs?.find(
|
||||
(item) => item.key === NodeInputKeyEnum.questionGuide
|
||||
)?.value;
|
||||
const questionGuide: AppQGConfigType =
|
||||
typeof questionGuideVal === 'boolean'
|
||||
? { ...defaultQGConfig, open: questionGuideVal }
|
||||
: questionGuideVal ?? defaultQGConfig;
|
||||
|
||||
const ttsConfig: AppTTSConfigType =
|
||||
guideModules?.inputs?.find((item) => item.key === NodeInputKeyEnum.tts)?.value ??
|
||||
|
||||
@@ -3,6 +3,7 @@ export enum PublishChannelEnum {
|
||||
iframe = 'iframe',
|
||||
apikey = 'apikey',
|
||||
feishu = 'feishu',
|
||||
dingtalk = 'dingtalk',
|
||||
wecom = 'wecom',
|
||||
officialAccount = 'official_account'
|
||||
}
|
||||
|
||||
12
packages/global/support/outLink/type.d.ts
vendored
@@ -14,6 +14,11 @@ export interface FeishuAppType {
|
||||
verificationToken?: string;
|
||||
}
|
||||
|
||||
export interface DingtalkAppType {
|
||||
clientId: string;
|
||||
clientSecret: string;
|
||||
}
|
||||
|
||||
export interface WecomAppType {
|
||||
AgentId: string;
|
||||
CorpId: string;
|
||||
@@ -36,7 +41,12 @@ export interface OffiAccountAppType {
|
||||
// because we can not reply anything in 15s. Thus, the wechat server will treat this request as a failed request.
|
||||
}
|
||||
|
||||
export type OutlinkAppType = FeishuAppType | WecomAppType | OffiAccountAppType | undefined;
|
||||
export type OutlinkAppType =
|
||||
| FeishuAppType
|
||||
| WecomAppType
|
||||
| OffiAccountAppType
|
||||
| DingtalkAppType
|
||||
| undefined;
|
||||
|
||||
export type OutLinkSchema<T extends OutlinkAppType = undefined> = {
|
||||
_id: string;
|
||||
|
||||
4
packages/global/support/user/api.d.ts
vendored
@@ -1,4 +1,5 @@
|
||||
import { OAuthEnum } from './constant';
|
||||
import { TrackRegisterParams } from './login/api';
|
||||
|
||||
export type PostLoginProps = {
|
||||
username: string;
|
||||
@@ -9,8 +10,7 @@ export type OauthLoginProps = {
|
||||
type: `${OAuthEnum}`;
|
||||
code: string;
|
||||
callbackUrl: string;
|
||||
inviterId?: string;
|
||||
};
|
||||
} & TrackRegisterParams;
|
||||
|
||||
export type WxLoginProps = {
|
||||
inviterId?: string;
|
||||
|
||||
@@ -16,5 +16,6 @@ export enum OAuthEnum {
|
||||
google = 'google',
|
||||
wechat = 'wechat',
|
||||
microsoft = 'microsoft',
|
||||
dingtalk = 'dingtalk',
|
||||
sso = 'sso'
|
||||
}
|
||||
|
||||
14
packages/global/support/user/login/api.d.ts
vendored
@@ -2,3 +2,17 @@ export type GetWXLoginQRResponse = {
|
||||
code: string;
|
||||
codeUrl: string;
|
||||
};
|
||||
|
||||
export type TrackRegisterParams = {
|
||||
inviterId?: string;
|
||||
bd_vid?: string;
|
||||
fastgpt_sem?: {
|
||||
keyword: string;
|
||||
};
|
||||
sourceDomain?: string;
|
||||
};
|
||||
export type AccountRegisterBody = {
|
||||
username: string;
|
||||
code: string;
|
||||
password: string;
|
||||
} & TrackRegisterParams;
|
||||
|
||||
@@ -12,6 +12,7 @@ export type CreateTeamProps = {
|
||||
avatar?: string;
|
||||
defaultTeam?: boolean;
|
||||
lafAccount?: LafAccountType;
|
||||
memberName?: string;
|
||||
};
|
||||
export type UpdateTeamProps = {
|
||||
name?: string;
|
||||
|
||||
1
packages/global/support/user/team/type.d.ts
vendored
@@ -101,6 +101,7 @@ export type TeamInvoiceHeaderType = {
|
||||
bankName?: string;
|
||||
bankAccount?: string;
|
||||
needSpecialInvoice: boolean;
|
||||
contactPhone: string;
|
||||
emailAddress: string;
|
||||
};
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ export enum UsageSourceEnum {
|
||||
share = 'share',
|
||||
wecom = 'wecom',
|
||||
feishu = 'feishu',
|
||||
dingtalk = 'dingtalk',
|
||||
official_account = 'official_account'
|
||||
}
|
||||
|
||||
@@ -39,5 +40,8 @@ export const UsageSourceMap = {
|
||||
},
|
||||
[UsageSourceEnum.wecom]: {
|
||||
label: i18nT('user:usage.wecom')
|
||||
},
|
||||
[UsageSourceEnum.dingtalk]: {
|
||||
label: i18nT('user:usage.dingtalk')
|
||||
}
|
||||
};
|
||||
|
||||
@@ -37,6 +37,8 @@ export const getUsageSourceByPublishChannel = (publishchannel: PublishChannelEnu
|
||||
return UsageSourceEnum.wecom;
|
||||
case PublishChannelEnum.officialAccount:
|
||||
return UsageSourceEnum.official_account;
|
||||
case PublishChannelEnum.dingtalk:
|
||||
return UsageSourceEnum.dingtalk;
|
||||
default:
|
||||
return UsageSourceEnum.fastgpt;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"cheerio": "1.0.0-rc.12",
|
||||
"@types/pg": "^8.6.6",
|
||||
"axios": "^1.5.1",
|
||||
"duck-duck-scrape": "^2.2.5",
|
||||
|
||||
@@ -5,7 +5,15 @@ import { cloneDeep } from 'lodash';
|
||||
import { WorkerNameEnum, runWorker } from '@fastgpt/service/worker/utils';
|
||||
|
||||
// Run in main thread
|
||||
const staticPluginList = ['getTime', 'fetchUrl', 'feishu', 'google', 'bing'];
|
||||
const staticPluginList = [
|
||||
'getTime',
|
||||
'fetchUrl',
|
||||
'feishu',
|
||||
'DingTalkWebhook',
|
||||
'WeWorkWebhook',
|
||||
'google',
|
||||
'bing'
|
||||
];
|
||||
// Run in worker thread (Have npm packages)
|
||||
const packagePluginList = [
|
||||
'mathExprVal',
|
||||
@@ -19,7 +27,8 @@ const packagePluginList = [
|
||||
'wiki',
|
||||
'databaseConnection',
|
||||
'Doc2X',
|
||||
'Doc2X/PDF2text'
|
||||
'Doc2X/PDF2text',
|
||||
'searchXNG'
|
||||
];
|
||||
|
||||
export const list = [...staticPluginList, ...packagePluginList];
|
||||
|
||||
536
packages/plugins/src/DingTalkWebhook/template.json
Normal file
@@ -0,0 +1,536 @@
|
||||
{
|
||||
"author": "",
|
||||
"version": "4816",
|
||||
"name": "钉钉 webhook",
|
||||
"avatar": "plugins/dingding",
|
||||
"intro": "向钉钉机器人发起 webhook 请求。",
|
||||
"courseUrl": "https://open.dingtalk.com/document/robots/custom-robot-access",
|
||||
"showStatus": false,
|
||||
"weight": 10,
|
||||
"isTool": true,
|
||||
"templateType": "communication",
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "pluginInput",
|
||||
"name": "插件开始",
|
||||
"intro": "自定义配置外部输入,使用插件时,仅暴露自定义配置的输入",
|
||||
"avatar": "core/workflow/template/workflowStart",
|
||||
"flowNodeType": "pluginInput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 557.4542421888484,
|
||||
"y": -131.2827008898969
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"inputType": "input",
|
||||
"valueType": "string",
|
||||
"key": "钉钉机器人地址",
|
||||
"label": "钉钉机器人地址",
|
||||
"description": "",
|
||||
"isToolInput": false,
|
||||
"defaultValue": "",
|
||||
"editField": {
|
||||
"key": true
|
||||
},
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
"valueType": "string",
|
||||
"required": true
|
||||
},
|
||||
"renderTypeList": ["input"],
|
||||
"required": true,
|
||||
"canEdit": true,
|
||||
"value": "",
|
||||
"list": []
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["input", "reference"],
|
||||
"selectedTypeIndex": 0,
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "加签值",
|
||||
"label": "加签值",
|
||||
"description": "钉钉机器人加签值",
|
||||
"defaultValue": "",
|
||||
"list": [
|
||||
{
|
||||
"label": "",
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"maxFiles": 5,
|
||||
"canSelectFile": true,
|
||||
"canSelectImg": true,
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["input", "reference"],
|
||||
"selectedTypeIndex": 0,
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "发送的消息",
|
||||
"label": "发送的消息",
|
||||
"description": "发送的消息",
|
||||
"defaultValue": "",
|
||||
"list": [
|
||||
{
|
||||
"label": "",
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"maxFiles": 5,
|
||||
"canSelectFile": true,
|
||||
"canSelectImg": true,
|
||||
"required": true,
|
||||
"toolDescription": "发送的消息"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "mv52BrPVE6bm",
|
||||
"key": "钉钉机器人地址",
|
||||
"valueType": "string",
|
||||
"label": "钉钉机器人地址",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "srcret",
|
||||
"valueType": "string",
|
||||
"key": "加签值",
|
||||
"label": "加签值",
|
||||
"type": "hidden"
|
||||
},
|
||||
{
|
||||
"id": "发送的消息",
|
||||
"valueType": "string",
|
||||
"key": "发送的消息",
|
||||
"label": "发送的消息",
|
||||
"type": "hidden"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "pluginOutput",
|
||||
"name": "插件输出",
|
||||
"intro": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
"avatar": "core/workflow/template/pluginOutput",
|
||||
"flowNodeType": "pluginOutput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 2420.0305926489386,
|
||||
"y": -106.28270088989689
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "rKBYGQuYefae",
|
||||
"name": "HTTP 请求",
|
||||
"intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
|
||||
"avatar": "core/workflow/template/httpRequest",
|
||||
"flowNodeType": "httpRequest468",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1645.779103978597,
|
||||
"y": -431.7827008898969
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "common:core.module.input.description.HTTP Dynamic Input",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpMethod",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"value": "POST",
|
||||
"required": true,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpTimeout",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "number",
|
||||
"label": "",
|
||||
"value": 30,
|
||||
"min": 5,
|
||||
"max": 600,
|
||||
"required": true,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpReqUrl",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Url",
|
||||
"placeholder": "https://api.ai.com/getInventory",
|
||||
"required": false,
|
||||
"value": "{{$a5qdMS7ECNYE.qLUQfhG0ILRX$}}",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpHeader",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Header",
|
||||
"placeholder": "common:core.module.input.description.Http Request Header",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpParams",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpJsonBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": "{\r\n \"msgtype\": \"text\",\r\n \"text\": {\r\n \"content\": \"{{$pluginInput.发送的消息$}}\"\r\n }\r\n}",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpFormBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpContentType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"value": "json",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "workflow:request_error",
|
||||
"description": "HTTP请求错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "httpRawResponse",
|
||||
"key": "httpRawResponse",
|
||||
"required": true,
|
||||
"label": "workflow:raw_response",
|
||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
||||
"valueType": "any",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "q3ccNXiZIHoS",
|
||||
"name": "系统配置",
|
||||
"intro": "",
|
||||
"avatar": "core/workflow/template/systemConfig",
|
||||
"flowNodeType": "pluginConfig",
|
||||
"position": {
|
||||
"x": 99.73879703925843,
|
||||
"y": -201.26482361861054
|
||||
},
|
||||
"version": "4811",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "a5qdMS7ECNYE",
|
||||
"name": "代码运行",
|
||||
"intro": "执行一段简单的脚本代码,通常用于进行复杂的数据处理。",
|
||||
"avatar": "core/workflow/template/codeRun",
|
||||
"flowNodeType": "code",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1106.1011901190363,
|
||||
"y": -407.7827008898969
|
||||
},
|
||||
"version": "482",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "workflow:these_variables_will_be_input_parameters_for_code_execution",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"valueDesc": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "codeType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"label": "",
|
||||
"value": "js",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "code",
|
||||
"renderTypeList": ["custom"],
|
||||
"label": "",
|
||||
"value": "function main({url, secret}){\n const {sign,timestamp} = createHmac('sha256',secret)\n\n return {\n result: `${url}×tamp=${timestamp}&sign=${sign}`\n }\n}",
|
||||
"valueDesc": "",
|
||||
"description": "",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "url",
|
||||
"label": "url",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"required": true,
|
||||
"value": ["pluginInput", "mv52BrPVE6bm"]
|
||||
},
|
||||
{
|
||||
"renderTypeList": ["reference"],
|
||||
"valueType": "string",
|
||||
"canEdit": true,
|
||||
"key": "secret",
|
||||
"label": "secret",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"required": true,
|
||||
"value": ["pluginInput", "srcret"]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "system_rawResponse",
|
||||
"key": "system_rawResponse",
|
||||
"label": "workflow:full_response_data",
|
||||
"valueType": "object",
|
||||
"type": "static",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "workflow:execution_error",
|
||||
"description": "代码运行错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"customFieldConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": false
|
||||
},
|
||||
"description": "将代码中 return 的对象作为输出,传递给后续的节点。变量名需要对应 return 的 key",
|
||||
"valueDesc": ""
|
||||
},
|
||||
{
|
||||
"id": "qLUQfhG0ILRX",
|
||||
"type": "dynamic",
|
||||
"key": "result",
|
||||
"valueType": "string",
|
||||
"label": "result",
|
||||
"valueDesc": "",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "rKBYGQuYefae",
|
||||
"target": "pluginOutput",
|
||||
"sourceHandle": "rKBYGQuYefae-source-right",
|
||||
"targetHandle": "pluginOutput-target-left"
|
||||
},
|
||||
{
|
||||
"source": "pluginInput",
|
||||
"target": "a5qdMS7ECNYE",
|
||||
"sourceHandle": "pluginInput-source-right",
|
||||
"targetHandle": "a5qdMS7ECNYE-target-left"
|
||||
},
|
||||
{
|
||||
"source": "a5qdMS7ECNYE",
|
||||
"target": "rKBYGQuYefae",
|
||||
"sourceHandle": "a5qdMS7ECNYE-source-right",
|
||||
"targetHandle": "rKBYGQuYefae-target-left"
|
||||
}
|
||||
],
|
||||
"chatConfig": {
|
||||
"welcomeText": "",
|
||||
"variables": [],
|
||||
"questionGuide": false,
|
||||
"ttsConfig": {
|
||||
"type": "web"
|
||||
},
|
||||
"whisperConfig": {
|
||||
"open": false,
|
||||
"autoSend": false,
|
||||
"autoTTSResponse": false
|
||||
},
|
||||
"chatInputGuide": {
|
||||
"open": false,
|
||||
"textList": [],
|
||||
"customUrl": ""
|
||||
},
|
||||
"instruction": "",
|
||||
"autoExecute": {
|
||||
"open": false,
|
||||
"defaultPrompt": ""
|
||||
},
|
||||
"_id": "6710a5619c45325525326719"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -439,7 +439,9 @@
|
||||
}
|
||||
],
|
||||
"chatConfig": {
|
||||
"questionGuide": false,
|
||||
"questionGuide": {
|
||||
"open": false
|
||||
},
|
||||
"ttsConfig": {
|
||||
"type": "web"
|
||||
},
|
||||
|
||||
386
packages/plugins/src/WeWorkWebhook/template.json
Normal file
@@ -0,0 +1,386 @@
|
||||
{
|
||||
"author": "",
|
||||
"version": "4816",
|
||||
"name": "企业微信 webhook",
|
||||
"avatar": "plugins/qiwei",
|
||||
"intro": "向企业微信机器人发起 webhook 请求。只能内部群使用。",
|
||||
"courseUrl": "https://developer.work.weixin.qq.com/document/path/91770",
|
||||
"showStatus": false,
|
||||
"weight": 10,
|
||||
"isTool": true,
|
||||
"templateType": "communication",
|
||||
"workflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"nodeId": "pluginInput",
|
||||
"name": "插件开始",
|
||||
"intro": "自定义配置外部输入,使用插件时,仅暴露自定义配置的输入",
|
||||
"avatar": "core/workflow/template/workflowStart",
|
||||
"flowNodeType": "pluginInput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 537.6357458754286,
|
||||
"y": -201.26482361861054
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"inputType": "input",
|
||||
"valueType": "string",
|
||||
"key": "企微机器人地址",
|
||||
"label": "企微机器人地址",
|
||||
"description": "",
|
||||
"isToolInput": false,
|
||||
"defaultValue": "",
|
||||
"editField": {
|
||||
"key": true
|
||||
},
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
"valueType": "string",
|
||||
"required": true
|
||||
},
|
||||
"renderTypeList": ["input"],
|
||||
"required": true,
|
||||
"canEdit": true,
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "发送的消息",
|
||||
"valueType": "string",
|
||||
"label": "发送的消息",
|
||||
"renderTypeList": ["input", "reference"],
|
||||
"required": true,
|
||||
"description": "发送的消息",
|
||||
"canEdit": true,
|
||||
"value": "",
|
||||
"editField": {
|
||||
"key": true
|
||||
},
|
||||
"dynamicParamDefaultValue": {
|
||||
"inputType": "reference",
|
||||
"valueType": "string",
|
||||
"required": true
|
||||
},
|
||||
"list": [],
|
||||
"defaultValue": "",
|
||||
"toolDescription": "发送的消息"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "mv52BrPVE6bm",
|
||||
"key": "企微机器人地址",
|
||||
"valueType": "string",
|
||||
"label": "企微机器人地址",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "p0m68Dv5KaIp",
|
||||
"key": "发送的消息",
|
||||
"valueType": "string",
|
||||
"label": "发送的消息",
|
||||
"type": "static"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "pluginOutput",
|
||||
"name": "插件输出",
|
||||
"intro": "自定义配置外部输出,使用插件时,仅暴露自定义配置的输出",
|
||||
"avatar": "core/workflow/template/pluginOutput",
|
||||
"flowNodeType": "pluginOutput",
|
||||
"showStatus": false,
|
||||
"position": {
|
||||
"x": 1776.027569211593,
|
||||
"y": -58.264823618610535
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"nodeId": "rKBYGQuYefae",
|
||||
"name": "HTTP 请求",
|
||||
"intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
|
||||
"avatar": "core/workflow/template/httpRequest",
|
||||
"flowNodeType": "httpRequest468",
|
||||
"showStatus": true,
|
||||
"position": {
|
||||
"x": 1069.7228495148624,
|
||||
"y": -392.26482361861054
|
||||
},
|
||||
"version": "481",
|
||||
"inputs": [
|
||||
{
|
||||
"key": "system_addInputParam",
|
||||
"renderTypeList": ["addInputParam"],
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"description": "common:core.module.input.description.HTTP Dynamic Input",
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
},
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpMethod",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"value": "POST",
|
||||
"required": true,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpTimeout",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "number",
|
||||
"label": "",
|
||||
"value": 30,
|
||||
"min": 5,
|
||||
"max": 600,
|
||||
"required": true,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpReqUrl",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Url",
|
||||
"placeholder": "https://api.ai.com/getInventory",
|
||||
"required": false,
|
||||
"value": "{{url}}",
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpHeader",
|
||||
"renderTypeList": ["custom"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"description": "common:core.module.input.description.Http Request Header",
|
||||
"placeholder": "common:core.module.input.description.Http Request Header",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpParams",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpJsonBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": "{\r\n \"msgtype\": \"text\",\r\n \"text\": {\r\n \"content\": \"{{text}}\"\r\n }\r\n}",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpFormBody",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "any",
|
||||
"value": [],
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "system_httpContentType",
|
||||
"renderTypeList": ["hidden"],
|
||||
"valueType": "string",
|
||||
"value": "json",
|
||||
"label": "",
|
||||
"required": false,
|
||||
"debugLabel": "",
|
||||
"toolDescription": ""
|
||||
},
|
||||
{
|
||||
"key": "text",
|
||||
"valueType": "string",
|
||||
"label": "text",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["pluginInput", "p0m68Dv5KaIp"],
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "url",
|
||||
"valueType": "string",
|
||||
"label": "url",
|
||||
"renderTypeList": ["reference"],
|
||||
"description": "",
|
||||
"canEdit": true,
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
},
|
||||
"value": ["pluginInput", "mv52BrPVE6bm"],
|
||||
"customInputConfig": {
|
||||
"selectValueTypeList": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"object",
|
||||
"arrayString",
|
||||
"arrayNumber",
|
||||
"arrayBoolean",
|
||||
"arrayObject",
|
||||
"arrayAny",
|
||||
"any",
|
||||
"chatHistory",
|
||||
"datasetQuote",
|
||||
"dynamic",
|
||||
"selectApp",
|
||||
"selectDataset"
|
||||
],
|
||||
"showDescription": false,
|
||||
"showDefaultValue": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "error",
|
||||
"key": "error",
|
||||
"label": "workflow:request_error",
|
||||
"description": "HTTP请求错误信息,成功时返回空",
|
||||
"valueType": "object",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "httpRawResponse",
|
||||
"key": "httpRawResponse",
|
||||
"required": true,
|
||||
"label": "workflow:raw_response",
|
||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
||||
"valueType": "any",
|
||||
"type": "static"
|
||||
},
|
||||
{
|
||||
"id": "system_addOutputParam",
|
||||
"key": "system_addOutputParam",
|
||||
"type": "dynamic",
|
||||
"valueType": "dynamic",
|
||||
"label": "",
|
||||
"editField": {
|
||||
"key": true,
|
||||
"valueType": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nodeId": "q3ccNXiZIHoS",
|
||||
"name": "系统配置",
|
||||
"intro": "",
|
||||
"avatar": "core/workflow/template/systemConfig",
|
||||
"flowNodeType": "pluginConfig",
|
||||
"position": {
|
||||
"x": 99.73879703925843,
|
||||
"y": -201.26482361861054
|
||||
},
|
||||
"version": "4811",
|
||||
"inputs": [],
|
||||
"outputs": []
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "pluginInput",
|
||||
"target": "rKBYGQuYefae",
|
||||
"sourceHandle": "pluginInput-source-right",
|
||||
"targetHandle": "rKBYGQuYefae-target-left"
|
||||
},
|
||||
{
|
||||
"source": "rKBYGQuYefae",
|
||||
"target": "pluginOutput",
|
||||
"sourceHandle": "rKBYGQuYefae-source-right",
|
||||
"targetHandle": "pluginOutput-target-left"
|
||||
}
|
||||
],
|
||||
"chatConfig": {
|
||||
"welcomeText": "",
|
||||
"variables": [],
|
||||
"questionGuide": false,
|
||||
"ttsConfig": {
|
||||
"type": "web"
|
||||
},
|
||||
"whisperConfig": {
|
||||
"open": false,
|
||||
"autoSend": false,
|
||||
"autoTTSResponse": false
|
||||
},
|
||||
"chatInputGuide": {
|
||||
"open": false,
|
||||
"textList": [],
|
||||
"customUrl": ""
|
||||
},
|
||||
"instruction": "",
|
||||
"autoExecute": {
|
||||
"open": false,
|
||||
"defaultPrompt": ""
|
||||
},
|
||||
"_id": "6710a5619c45325525326719"
|
||||
}
|
||||
}
|
||||
}
|
||||