Compare commits

..

No commits in common. "main" and "test-tool" have entirely different histories.

468 changed files with 5879 additions and 12034 deletions

View File

@ -21,7 +21,7 @@
"i18n-ally.namespace": true, "i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{locale}/{namespaces}.json", "i18n-ally.pathMatcher": "{locale}/{namespaces}.json",
"i18n-ally.extract.targetPickingStrategy": "most-similar-by-key", "i18n-ally.extract.targetPickingStrategy": "most-similar-by-key",
"i18n-ally.translate.engines": ["deepl","google"], "i18n-ally.translate.engines": ["google"],
"[typescript]": { "[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },

View File

@ -132,15 +132,15 @@ services:
# fastgpt # fastgpt
sandbox: sandbox:
container_name: sandbox container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt-sandbox:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.7-fix2 # 阿里云
networks: networks:
- fastgpt - fastgpt
restart: always restart: always
fastgpt-mcp-server: fastgpt-mcp-server:
container_name: fastgpt-mcp-server container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt-mcp_server:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.7-fix2 # 阿里云
ports: ports:
- 3005:3000 - 3005:3000
networks: networks:
@ -150,8 +150,8 @@ services:
- FASTGPT_ENDPOINT=http://fastgpt:3000 - FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt: fastgpt:
container_name: fastgpt container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.7-fix2 # 阿里云
ports: ports:
- 3000:3000 - 3000:3000
networks: networks:

View File

@ -109,15 +109,15 @@ services:
# fastgpt # fastgpt
sandbox: sandbox:
container_name: sandbox container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt-sandbox:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.7-fix2 # 阿里云
networks: networks:
- fastgpt - fastgpt
restart: always restart: always
fastgpt-mcp-server: fastgpt-mcp-server:
container_name: fastgpt-mcp-server container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt-mcp_server:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.7-fix2 # 阿里云
ports: ports:
- 3005:3000 - 3005:3000
networks: networks:
@ -127,8 +127,8 @@ services:
- FASTGPT_ENDPOINT=http://fastgpt:3000 - FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt: fastgpt:
container_name: fastgpt container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.7-fix2 # 阿里云
ports: ports:
- 3000:3000 - 3000:3000
networks: networks:

View File

@ -23,7 +23,7 @@ services:
volumes: volumes:
- ./pg/data:/var/lib/postgresql/data - ./pg/data:/var/lib/postgresql/data
healthcheck: healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'postgres'] test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'aiproxy']
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 10 retries: 10
@ -96,15 +96,15 @@ services:
# fastgpt # fastgpt
sandbox: sandbox:
container_name: sandbox container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt-sandbox:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.7-fix2 # 阿里云
networks: networks:
- fastgpt - fastgpt
restart: always restart: always
fastgpt-mcp-server: fastgpt-mcp-server:
container_name: fastgpt-mcp-server container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt-mcp_server:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.7-fix2 # 阿里云
ports: ports:
- 3005:3000 - 3005:3000
networks: networks:
@ -114,8 +114,8 @@ services:
- FASTGPT_ENDPOINT=http://fastgpt:3000 - FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt: fastgpt:
container_name: fastgpt container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.7-fix2 # 阿里云
ports: ports:
- 3000:3000 - 3000:3000
networks: networks:

View File

@ -72,15 +72,15 @@ services:
sandbox: sandbox:
container_name: sandbox container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt-sandbox:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.7-fix2 # 阿里云
networks: networks:
- fastgpt - fastgpt
restart: always restart: always
fastgpt-mcp-server: fastgpt-mcp-server:
container_name: fastgpt-mcp-server container_name: fastgpt-mcp-server
image: ghcr.io/labring/fastgpt-mcp_server:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt-mcp_server:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server:v4.9.7-fix2 # 阿里云
ports: ports:
- 3005:3000 - 3005:3000
networks: networks:
@ -90,8 +90,8 @@ services:
- FASTGPT_ENDPOINT=http://fastgpt:3000 - FASTGPT_ENDPOINT=http://fastgpt:3000
fastgpt: fastgpt:
container_name: fastgpt container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.9.10-fix2 # git image: ghcr.io/labring/fastgpt:v4.9.7-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.10-fix2 # 阿里云 # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.7-fix2 # 阿里云
ports: ports:
- 3000:3000 - 3000:3000
networks: networks:

232
dev.md
View File

@ -1,118 +1,114 @@
## Premise ## Premise
Since FastGPT is managed in the same way as monorepo, it is recommended to install make first during development. Since FastGPT is managed in the same way as monorepo, it is recommended to install make first during development.
monorepo Project Name: monorepo Project Name:
- app: main project - app: main project
-...... -......
## Dev ## Dev
```sh ```sh
# Give automatic script code execution permission (on non-Linux systems, you can manually execute the postinstall.sh file content) # Give automatic script code execution permission (on non-Linux systems, you can manually execute the postinstall.sh file content)
chmod -R +x ./scripts/ chmod -R +x ./scripts/
# Executing under the code root directory installs all dependencies within the root package, projects, and packages # Executing under the code root directory installs all dependencies within the root package, projects, and packages
pnpm i pnpm i
# Not make cmd # Not make cmd
cd projects/app cd projects/app
pnpm dev pnpm dev
# Make cmd # Make cmd
make dev name=app make dev name=app
``` ```
Note: If the Node version is >= 20, you need to pass the `--no-node-snapshot` parameter to Node when running `pnpm i` Note: If the Node version is >= 20, you need to pass the `--no-node-snapshot` parameter to Node when running `pnpm i`
```sh ```sh
NODE_OPTIONS=--no-node-snapshot pnpm i NODE_OPTIONS=--no-node-snapshot pnpm i
``` ```
### Jest ### Jest
https://fael3z0zfze.feishu.cn/docx/ZOI1dABpxoGhS7xzhkXcKPxZnDL https://fael3z0zfze.feishu.cn/docx/ZOI1dABpxoGhS7xzhkXcKPxZnDL
## I18N ## I18N
### Install i18n-ally Plugin ### Install i18n-ally Plugin
1. Open the Extensions Marketplace in VSCode, search for and install the `i18n Ally` plugin. 1. Open the Extensions Marketplace in VSCode, search for and install the `i18n Ally` plugin.
### Code Optimization Examples ### Code Optimization Examples
#### Fetch Specific Namespace Translations in `getServerSideProps` #### Fetch Specific Namespace Translations in `getServerSideProps`
```typescript ```typescript
// pages/yourPage.tsx // pages/yourPage.tsx
export async function getServerSideProps(context: any) { export async function getServerSideProps(context: any) {
return { return {
props: { props: {
currentTab: context?.query?.currentTab || TabEnum.info, currentTab: context?.query?.currentTab || TabEnum.info,
...(await serverSideTranslations(context.locale, ['publish', 'user'])) ...(await serverSideTranslations(context.locale, ['publish', 'user']))
} }
}; };
} }
``` ```
#### Use useTranslation Hook in Page #### Use useTranslation Hook in Page
```typescript ```typescript
// pages/yourPage.tsx // pages/yourPage.tsx
import { useTranslation } from 'next-i18next'; import { useTranslation } from 'next-i18next';
const YourComponent = () => { const YourComponent = () => {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<Button <Button
variant="outline" variant="outline"
size="sm" size="sm"
mr={2} mr={2}
onClick={() => setShowSelected(false)} onClick={() => setShowSelected(false)}
> >
{t('common:close')} {t('common:close')}
</Button> </Button>
); );
}; };
export default YourComponent; export default YourComponent;
``` ```
#### Handle Static File Translations #### Handle Static File Translations
```typescript ```typescript
// utils/i18n.ts // utils/i18n.ts
import { i18nT } from '@fastgpt/web/i18n/utils'; import { i18nT } from '@fastgpt/web/i18n/utils';
const staticContent = { const staticContent = {
id: 'simpleChat', id: 'simpleChat',
avatar: 'core/workflow/template/aiChat', avatar: 'core/workflow/template/aiChat',
name: i18nT('app:template.simple_robot'), name: i18nT('app:template.simple_robot'),
}; };
export default staticContent; export default staticContent;
``` ```
### Standardize Translation Format ### Standardize Translation Format
- Use the t(namespace:key) format to ensure consistent naming. - Use the t(namespace:key) format to ensure consistent naming.
- Translation keys should use lowercase letters and underscores, e.g., common.close. - Translation keys should use lowercase letters and underscores, e.g., common.close.
## audit ## Build
Please fill the OperationLogEventEnum and operationLog/audit function is added to the ts, and on the corresponding position to fill i18n, at the same time to add the location of the log using addOpearationLog function add function ```sh
# Docker cmd: Build image, not proxy
## Build docker build -f ./projects/app/Dockerfile -t registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 . --build-arg name=app
# Make cmd: Build image, not proxy
```sh make build name=app image=registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1
# Docker cmd: Build image, not proxy
docker build -f ./projects/app/Dockerfile -t registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 . --build-arg name=app # Docker cmd: Build image with proxy
# Make cmd: Build image, not proxy docker build -f ./projects/app/Dockerfile -t registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 . --build-arg name=app --build-arg proxy=taobao
make build name=app image=registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 # Make cmd: Build image with proxy
make build name=app image=registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 proxy=taobao
# Docker cmd: Build image with proxy ```
docker build -f ./projects/app/Dockerfile -t registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 . --build-arg name=app --build-arg proxy=taobao
# Make cmd: Build image with proxy
make build name=app image=registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 proxy=taobao
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 KiB

View File

@ -959,16 +959,10 @@ curl --location --request POST 'http://localhost:3000/api/core/chat/getHistories
{{< markdownify >}} {{< markdownify >}}
{{% alert icon=" " context="success" %}} {{% alert icon=" " context="success" %}}
目前仅能获取到当前 API key 的创建者的对话。
- appId - 应用 Id - appId - 应用 Id
- offset - 偏移量,即从第几条数据开始取 - offset - 偏移量,即从第几条数据开始取
- pageSize - 记录数量 - pageSize - 记录数量
- source - 对话源。source=api表示获取通过 API 创建的对话(不会获取到页面上的对话记录) - source - 对话源。source=api表示获取通过 API 创建的对话(不会获取到页面上的对话记录)
- startCreateTime - 开始创建时间(可选)
- endCreateTime - 结束创建时间(可选)
- startUpdateTime - 开始更新时间(可选)
- endUpdateTime - 结束更新时间(可选)
{{% /alert %}} {{% /alert %}}
{{< /markdownify >}} {{< /markdownify >}}

View File

@ -645,7 +645,7 @@ data 为集合的 ID。
{{< /tab >}} {{< /tab >}}
{{< /tabs >}} {{< /tabs >}}
### 创建一个外部文件库集合(弃用 ### 创建一个外部文件库集合(商业版
{{< tabs tabTotal="3" >}} {{< tabs tabTotal="3" >}}
{{< tab tabName="请求示例" >}} {{< tab tabName="请求示例" >}}

View File

@ -1,50 +0,0 @@
---
title: 'V4.9.10'
description: 'FastGPT V4.9.10 更新说明'
icon: 'upgrade'
draft: false
toc: true
weight: 790
---
## 升级指南
重要提示本次更新会重新构建全文索引构建期间全文检索结果会为空4c16g 700 万组全文索引大致消耗 25 分钟。如需无缝升级,需自行做表同步工程。
### 1. 做好数据备份
### 2. 更新镜像 tag
- 更新 FastGPT 镜像 tag: v4.9.10-fix2
- 更新 FastGPT 商业版镜像 tag: v4.9.10-fix2
- mcp_server 无需更新
- Sandbox 无需更新
- AIProxy 无需更新
## 🚀 新增内容
1. 支持 PG 设置`systemEnv.hnswMaxScanTuples`参数,提高迭代搜索的数据总量。
2. 知识库预处理参数增加 “分块条件”,可控制某些情况下不进行分块处理。
3. 知识库预处理参数增加 “段落优先” 模式,可控制最大段落深度。原“长度优先”模式,不再内嵌段落优先逻辑。
4. 工作流调整为单向接入和接出,支持快速的添加下一步节点。
5. 开放飞书和语雀知识库到开源版。
6. gemini 和 claude 最新模型预设。
## ⚙️ 优化
1. LLM stream调用默认超时调大。
2. 部分确认交互优化。
3. 纠正原先知识库的“表格数据集”名称,改成“备份导入”。同时支持知识库索引的导出和导入。
4. 工作流知识库引用上限,如果工作流中没有相关 AI 节点,则交互模式改成纯手动输入,并且上限为 1000万。
5. 语音输入,移动端判断逻辑,准确判断是否为手机,而不是小屏。
6. 优化上下文截取算法,至少保证留下一组 Human 信息。
## 🐛 修复
1. 全文检索多知识库时排序得分排序不正确。
2. 流响应捕获 finish_reason 可能不正确。
3. 工具调用模式,未保存思考输出。
4. 知识库 indexSize 参数未生效。
5. 工作流嵌套 2 层后,获取预览引用、上下文不正确。
6. xlsx 转成 Markdown 时候,前面会多出一个空格。
7. 读取 Markdown 文件时Base64 图片未进行额外抓换保存。

View File

@ -1,25 +0,0 @@
---
title: 'V4.9.11(进行中)'
description: 'FastGPT V4.9.11 更新说明'
icon: 'upgrade'
draft: false
toc: true
weight: 789
---
## 🚀 新增内容
1. 工作流中增加节点搜索功能。
2. 工作流中,子流程版本控制,可选择“保持最新版本”,无需手动更新。
## ⚙️ 优化
1. 原文缓存改用 gridfs 存储,提高上限。
## 🐛 修复
1. 工作流中,管理员声明的全局系统工具,无法进行版本管理。
2. 工具调用节点前,有交互节点时,上下文异常。
3. 修复备份导入,小于 1000 字时,无法分块问题。
4. 自定义 PDF 解析,无法保存 base64 图片。

View File

@ -1,5 +1,5 @@
--- ---
title: 'V4.9.8' title: 'V4.9.8(进行中)'
description: 'FastGPT V4.9.8 更新说明' description: 'FastGPT V4.9.8 更新说明'
icon: 'upgrade' icon: 'upgrade'
draft: false draft: false
@ -7,17 +7,6 @@ toc: true
weight: 792 weight: 792
--- ---
## 升级指南
### 1. 做好数据备份
### 2. 更新镜像 tag
- 更新 FastGPT 镜像 tag: v4.9.8
- 更新 FastGPT 商业版镜像 tag: v4.9.8
- mcp_server 无需更新
- Sandbox 无需更新
- AIProxy 无需更新
## 🚀 新增内容 ## 🚀 新增内容
@ -25,25 +14,14 @@ weight: 792
2. 将所有内置任务,从非 stream 模式调整成 stream 模式,避免部分模型不支持非 stream 模式。如需覆盖,则可以在模型`额外 Body`参数中,强制指定`stream=false` 2. 将所有内置任务,从非 stream 模式调整成 stream 模式,避免部分模型不支持非 stream 模式。如需覆盖,则可以在模型`额外 Body`参数中,强制指定`stream=false`
3. qwen3 模型预设 3. qwen3 模型预设
4. 语雀知识库支持设置根目录。 4. 语雀知识库支持设置根目录。
5. 可配置密码过期时间,过期后下次登录会强制要求修改密码。
6. 密码登录增加 preLogin 临时密钥校验。
7. 支持 Admin 后台配置发布渠道和第三方知识库的显示隐藏。
## ⚙️ 优化 ## ⚙️ 优化
1. Chat log list 优化,避免大数据时超出内存限制。 1. Chat log list 优化,避免大数据时超出内存限制。
2. 预加载 token 计算 worker避免主任务中并发创建导致线程阻塞。 2. 预加载 token 计算 worker避免主任务中并发创建导致线程阻塞。
3. 工作流节点版本控制交互优化。
4. 网络获取以及 html2md 优化,支持视频和音频标签的转换。
## 🐛 修复 ## 🐛 修复
1. 应用列表/知识库列表,删除行权限展示问题。 1. 应用列表/知识库列表,删除行权限展示问题。
2. 打开知识库搜索参数后,重排选项自动被打开。 2. 打开知识库搜索参数后,重排选项自动被打开。
3. LLM json_schema 模式 API 请求格式错误。
4. 重新训练时,图片过期索引未成功清除,导致图片会丢失。
5. 重新训练权限问题。
6. 文档链接地址。
7. Claude 工具调用,由于 index 为空,导致工具调用失败。
8. 嵌套工作流,工具调用下包含交互节点时,流程异常。

View File

@ -1,43 +0,0 @@
---
title: 'V4.9.9'
description: 'FastGPT V4.9.9 更新说明'
icon: 'upgrade'
draft: false
toc: true
weight: 791
---
## 升级指南
### 1. 做好数据备份
### 2. 商业版用户替换新 License
商业版用户可以联系 FastGPT 团队支持同学,获取 License 替换方案。替换后,可以直接升级系统,管理后台会提示输入新 License。
### 3. 更新镜像 tag
- 更新 FastGPT 镜像 tag: v4.9.9
- 更新 FastGPT 商业版镜像 tag: v4.9.9
- mcp_server 无需更新
- Sandbox 无需更新
- AIProxy 无需更新
## 🚀 新增内容
1. 切换 SessionId 来替代 JWT 实现登录鉴权,可控制最大登录客户端数量。
2. 新的商业版 License 管理模式。
3. 公众号调用,显示记录 chat 对话错误,方便排查。
4. API 知识库支持 BasePath 选择,需增加 API 接口,具体可见[API 知识库介绍](/docs/guide/knowledge_base/api_dataset/#4-获取文件详细信息用于获取文件信息)
## ⚙️ 优化
1. 优化工具调用,新工具的判断逻辑。
2. 调整 Cite 引用提示词。
## 🐛 修复
1. 无法正常获取应用历史保存/发布记录。
2. 成员创建 MCP 工具权限问题。
3. 来源引用展示,存在 ID 传递错误,导致提示无权操作该文件。
4. 回答标注前端数据报错。

View File

@ -43,7 +43,7 @@ type ResponseType = {
// 文件列表中,单项的文件类型 // 文件列表中,单项的文件类型
type FileListItem = { type FileListItem = {
id: string; id: string;
parentId: string //也可能为 null 或者 undefined 类型; parentId: string | null;
name: string; name: string;
type: 'file' | 'folder'; type: 'file' | 'folder';
updateTime: Date; updateTime: Date;
@ -59,7 +59,7 @@ type FileListItem = {
{{< markdownify >}} {{< markdownify >}}
{{% alert icon=" " context="success" %}} {{% alert icon=" " context="success" %}}
- parentId - 父级 id可选或者 null | undefined - parentId - 父级 id可选或者 null。
- searchKey - 检索词,可选 - searchKey - 检索词,可选
{{% /alert %}} {{% /alert %}}
@ -68,7 +68,7 @@ curl --location --request POST '{{baseURL}}/v1/file/list' \
--header 'Authorization: Bearer {{authorization}}' \ --header 'Authorization: Bearer {{authorization}}' \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--data-raw '{ --data-raw '{
"parentId": "", "parentId": null,
"searchKey": "" "searchKey": ""
}' }'
``` ```
@ -185,40 +185,3 @@ curl --location --request GET '{{baseURL}}/v1/file/read?id=xx' \
{{< /tabs >}} {{< /tabs >}}
### 4. 获取文件详细信息(用于获取文件信息)
{{< tabs tabTotal="2" >}}
{{< tab tabName="请求示例" >}}
{{< markdownify >}}
id 为文件的 id。
```bash
curl --location --request GET '{{baseURL}}/v1/file/detail?id=xx' \
--header 'Authorization: Bearer {{authorization}}'
```
{{< /markdownify >}}
{{< /tab >}}
{{< tab tabName="响应示例" >}}
{{< markdownify >}}
```json
{
"code": 200,
"success": true,
"message": "",
"data": {
"id": "docs",
"parentId": "",
"name": "docs"
}
}
```
{{< /markdownify >}}
{{< /tab >}}
{{< /tabs >}}

View File

@ -28,6 +28,7 @@ FastGPT 商业版是基于 FastGPT 开源版的增强版本,增加了一些独
| 应用发布安全配置 | ❌ | ✅ | ✅ | | 应用发布安全配置 | ❌ | ✅ | ✅ |
| 内容审核 | ❌ | ✅ | ✅ | | 内容审核 | ❌ | ✅ | ✅ |
| web站点同步 | ❌ | ✅ | ✅ | | web站点同步 | ❌ | ✅ | ✅ |
| 主流文档库接入(目前支持:语雀、飞书) | ❌ | ✅ | ✅ |
| 增强训练模式 | ❌ | ✅ | ✅ | | 增强训练模式 | ❌ | ✅ | ✅ |
| 第三方应用快速接入(飞书、公众号) | ❌ | ✅ | ✅ | | 第三方应用快速接入(飞书、公众号) | ❌ | ✅ | ✅ |
| 管理后台 | ❌ | ✅ | 不需要 | | 管理后台 | ❌ | ✅ | 不需要 |

View File

@ -95,10 +95,6 @@ weight: 506
121.196.228.45 121.196.228.45
121.43.126.202 121.43.126.202
120.26.144.37 120.26.144.37
47.98.196.113
47.97.204.90
118.31.41.236
118.178.185.61
``` ```
## 4. 获取AES Key选择加密方式 ## 4. 获取AES Key选择加密方式
@ -129,13 +125,6 @@ weight: 506
## FAQ ## FAQ
### 公众号没响应
检查应用对话日志,如果有对话日志,但是微信公众号无响应,则是白名单 IP未成功。
添加白名单IP 后,通常需要等待几分钟微信更新。可以在对话日志中,找点错误日志。
![](/imgs/official_account_faq.png)
### 如何新开一个聊天记录 ### 如何新开一个聊天记录
如果你想重置你的聊天记录,可以给机器人发送 `Reset` 消息(注意大小写),机器人会新开一个聊天记录。 如果你想重置你的聊天记录,可以给机器人发送 `Reset` 消息(注意大小写),机器人会新开一个聊天记录。

3
env.d.ts vendored
View File

@ -4,6 +4,7 @@ declare global {
LOG_DEPTH: string; LOG_DEPTH: string;
DEFAULT_ROOT_PSW: string; DEFAULT_ROOT_PSW: string;
DB_MAX_LINK: string; DB_MAX_LINK: string;
TOKEN_KEY: string;
FILE_TOKEN_KEY: string; FILE_TOKEN_KEY: string;
ROOT_KEY: string; ROOT_KEY: string;
OPENAI_BASE_URL: string; OPENAI_BASE_URL: string;
@ -35,8 +36,6 @@ declare global {
SHOW_COUPON?: string; SHOW_COUPON?: string;
CONFIG_JSON_PATH?: string; CONFIG_JSON_PATH?: string;
PASSWORD_LOGIN_LOCK_SECONDS?: string; PASSWORD_LOGIN_LOCK_SECONDS?: string;
PASSWORD_EXPIRED_MONTH?: string;
MAX_LOGIN_SESSION?: string;
} }
} }
} }

View File

@ -27,7 +27,7 @@ const datasetErr = [
}, },
{ {
statusText: DatasetErrEnum.unExist, statusText: DatasetErrEnum.unExist,
message: i18nT('common:core.dataset.error.unExistDataset') message: 'core.dataset.error.unExistDataset'
}, },
{ {
statusText: DatasetErrEnum.unExistCollection, statusText: DatasetErrEnum.unExistCollection,

View File

@ -2,28 +2,13 @@ import { type ErrType } from '../errorCode';
import { i18nT } from '../../../../web/i18n/utils'; import { i18nT } from '../../../../web/i18n/utils';
/* dataset: 509000 */ /* dataset: 509000 */
export enum SystemErrEnum { export enum SystemErrEnum {
communityVersionNumLimit = 'communityVersionNumLimit', communityVersionNumLimit = 'communityVersionNumLimit'
licenseAppAmountLimit = 'licenseAppAmountLimit',
licenseDatasetAmountLimit = 'licenseDatasetAmountLimit',
licenseUserAmountLimit = 'licenseUserAmountLimit'
} }
const systemErr = [ const systemErr = [
{ {
statusText: SystemErrEnum.communityVersionNumLimit, statusText: SystemErrEnum.communityVersionNumLimit,
message: i18nT('common:code_error.system_error.community_version_num_limit') message: i18nT('common:code_error.system_error.community_version_num_limit')
},
{
statusText: SystemErrEnum.licenseAppAmountLimit,
message: i18nT('common:code_error.system_error.license_app_amount_limit')
},
{
statusText: SystemErrEnum.licenseDatasetAmountLimit,
message: i18nT('common:code_error.system_error.license_dataset_amount_limit')
},
{
statusText: SystemErrEnum.licenseUserAmountLimit,
message: i18nT('common:code_error.system_error.license_user_amount_limit')
} }
]; ];

View File

@ -5,7 +5,7 @@ export const checkPasswordRule = (password: string) => {
/[A-Z]/, // Contains uppercase letters /[A-Z]/, // Contains uppercase letters
/[!@#$%^&*()_+=-]/ // Contains special characters /[!@#$%^&*()_+=-]/ // Contains special characters
]; ];
const validChars = /^[\dA-Za-z!@#$%^&*()_+=-]{8,100}$/; const validChars = /^[\dA-Za-z!@#$%^&*()_+=-]{6,100}$/;
// Check length and valid characters // Check length and valid characters
if (!validChars.test(password)) return false; if (!validChars.test(password)) return false;

View File

@ -7,10 +7,6 @@ export const CUSTOM_SPLIT_SIGN = '-----CUSTOM_SPLIT_SIGN-----';
type SplitProps = { type SplitProps = {
text: string; text: string;
chunkSize: number; chunkSize: number;
paragraphChunkDeep?: number; // Paragraph deep
paragraphChunkMinSize?: number; // Paragraph min size, if too small, it will merge
maxSize?: number; maxSize?: number;
overlapRatio?: number; overlapRatio?: number;
customReg?: string[]; customReg?: string[];
@ -112,8 +108,6 @@ const commonSplit = (props: SplitProps): SplitResponse => {
let { let {
text = '', text = '',
chunkSize, chunkSize,
paragraphChunkDeep = 5,
paragraphChunkMinSize = 100,
maxSize = defaultMaxChunkSize, maxSize = defaultMaxChunkSize,
overlapRatio = 0.15, overlapRatio = 0.15,
customReg = [] customReg = []
@ -129,7 +123,7 @@ const commonSplit = (props: SplitProps): SplitResponse => {
text = text.replace(/(```[\s\S]*?```|~~~[\s\S]*?~~~)/g, function (match) { text = text.replace(/(```[\s\S]*?```|~~~[\s\S]*?~~~)/g, function (match) {
return match.replace(/\n/g, codeBlockMarker); return match.replace(/\n/g, codeBlockMarker);
}); });
// 2. Markdown 表格处理 - 单独提取表格出来,进行表头合并 // 2. 表格处理 - 单独提取表格出来,进行表头合并
const tableReg = const tableReg =
/(\n\|(?:(?:[^\n|]+\|){1,})\n\|(?:[:\-\s]+\|){1,}\n(?:\|(?:[^\n|]+\|)*\n?)*)(?:\n|$)/g; /(\n\|(?:(?:[^\n|]+\|){1,})\n\|(?:[:\-\s]+\|){1,}\n(?:\|(?:[^\n|]+\|)*\n?)*)(?:\n|$)/g;
const tableDataList = text.match(tableReg); const tableDataList = text.match(tableReg);
@ -149,40 +143,25 @@ const commonSplit = (props: SplitProps): SplitResponse => {
text = text.replace(/(\r?\n|\r){3,}/g, '\n\n\n'); text = text.replace(/(\r?\n|\r){3,}/g, '\n\n\n');
// The larger maxLen is, the next sentence is less likely to trigger splitting // The larger maxLen is, the next sentence is less likely to trigger splitting
const customRegLen = customReg.length; const markdownIndex = 4;
const markdownIndex = paragraphChunkDeep - 1; const forbidOverlapIndex = 8;
const forbidOverlapIndex = customRegLen + markdownIndex + 4;
const markdownHeaderRules = ((deep?: number): { reg: RegExp; maxLen: number }[] => {
if (!deep || deep === 0) return [];
const maxDeep = Math.min(deep, 8); // Maximum 8 levels
const rules: { reg: RegExp; maxLen: number }[] = [];
for (let i = 1; i <= maxDeep; i++) {
const hashSymbols = '#'.repeat(i);
rules.push({
reg: new RegExp(`^(${hashSymbols}\\s[^\\n]+\\n)`, 'gm'),
maxLen: chunkSize
});
}
return rules;
})(paragraphChunkDeep);
const stepReges: { reg: RegExp | string; maxLen: number }[] = [ const stepReges: { reg: RegExp | string; maxLen: number }[] = [
...customReg.map((text) => ({ ...customReg.map((text) => ({
reg: text.replaceAll('\\n', '\n'), reg: text.replaceAll('\\n', '\n'),
maxLen: chunkSize maxLen: chunkSize
})), })),
...markdownHeaderRules, { reg: /^(#\s[^\n]+\n)/gm, maxLen: chunkSize },
{ reg: /^(##\s[^\n]+\n)/gm, maxLen: chunkSize },
{ reg: /^(###\s[^\n]+\n)/gm, maxLen: chunkSize },
{ reg: /^(####\s[^\n]+\n)/gm, maxLen: chunkSize },
{ reg: /^(#####\s[^\n]+\n)/gm, maxLen: chunkSize },
{ reg: /([\n](```[\s\S]*?```|~~~[\s\S]*?~~~))/g, maxLen: maxSize }, // code block { reg: /([\n](```[\s\S]*?```|~~~[\s\S]*?~~~))/g, maxLen: maxSize }, // code block
// HTML Table tag 尽可能保障完整
{ {
reg: /(\n\|(?:(?:[^\n|]+\|){1,})\n\|(?:[:\-\s]+\|){1,}\n(?:\|(?:[^\n|]+\|)*\n)*)/g, reg: /(\n\|(?:(?:[^\n|]+\|){1,})\n\|(?:[:\-\s]+\|){1,}\n(?:\|(?:[^\n|]+\|)*\n)*)/g,
maxLen: chunkSize maxLen: Math.min(chunkSize * 1.5, maxSize)
}, // Markdown Table 尽可能保证完整性 }, // Table 尽可能保证完整性
{ reg: /(\n{2,})/g, maxLen: chunkSize }, { reg: /(\n{2,})/g, maxLen: chunkSize },
{ reg: /([\n])/g, maxLen: chunkSize }, { reg: /([\n])/g, maxLen: chunkSize },
// ------ There's no overlap on the top // ------ There's no overlap on the top
@ -193,10 +172,12 @@ const commonSplit = (props: SplitProps): SplitResponse => {
{ reg: /([]|,\s)/g, maxLen: chunkSize } { reg: /([]|,\s)/g, maxLen: chunkSize }
]; ];
const customRegLen = customReg.length;
const checkIsCustomStep = (step: number) => step < customRegLen; const checkIsCustomStep = (step: number) => step < customRegLen;
const checkIsMarkdownSplit = (step: number) => const checkIsMarkdownSplit = (step: number) =>
step >= customRegLen && step <= markdownIndex + customRegLen; step >= customRegLen && step <= markdownIndex + customRegLen;
const checkForbidOverlap = (step: number) => step <= forbidOverlapIndex;
const checkForbidOverlap = (step: number) => step <= forbidOverlapIndex + customRegLen;
// if use markdown title split, Separate record title // if use markdown title split, Separate record title
const getSplitTexts = ({ text, step }: { text: string; step: number }) => { const getSplitTexts = ({ text, step }: { text: string; step: number }) => {
@ -320,7 +301,6 @@ const commonSplit = (props: SplitProps): SplitResponse => {
const splitTexts = getSplitTexts({ text, step }); const splitTexts = getSplitTexts({ text, step });
const chunks: string[] = []; const chunks: string[] = [];
for (let i = 0; i < splitTexts.length; i++) { for (let i = 0; i < splitTexts.length; i++) {
const item = splitTexts[i]; const item = splitTexts[i];
@ -463,6 +443,7 @@ const commonSplit = (props: SplitProps): SplitResponse => {
*/ */
export const splitText2Chunks = (props: SplitProps): SplitResponse => { export const splitText2Chunks = (props: SplitProps): SplitResponse => {
let { text = '' } = props; let { text = '' } = props;
const start = Date.now();
const splitWithCustomSign = text.split(CUSTOM_SPLIT_SIGN); const splitWithCustomSign = text.split(CUSTOM_SPLIT_SIGN);
const splitResult = splitWithCustomSign.map((item) => { const splitResult = splitWithCustomSign.map((item) => {

View File

@ -1,8 +1,7 @@
export enum SystemConfigsTypeEnum { export enum SystemConfigsTypeEnum {
fastgpt = 'fastgpt', fastgpt = 'fastgpt',
fastgptPro = 'fastgptPro', fastgptPro = 'fastgptPro',
systemMsgModal = 'systemMsgModal', systemMsgModal = 'systemMsgModal'
license = 'license'
} }
export const SystemConfigsTypeMap = { export const SystemConfigsTypeMap = {
@ -14,8 +13,5 @@ export const SystemConfigsTypeMap = {
}, },
[SystemConfigsTypeEnum.systemMsgModal]: { [SystemConfigsTypeEnum.systemMsgModal]: {
label: 'systemMsgModal' label: 'systemMsgModal'
},
[SystemConfigsTypeEnum.license]: {
label: 'license'
} }
}; };

View File

@ -64,15 +64,6 @@ export type FastGPTFeConfigsType = {
show_coupon?: boolean; show_coupon?: boolean;
concatMd?: string; concatMd?: string;
show_dataset_feishu?: boolean;
show_dataset_yuque?: boolean;
show_publish_feishu?: boolean;
show_publish_dingtalk?: boolean;
show_publish_offiaccount?: boolean;
show_dataset_enhance?: boolean;
show_batch_eval?: boolean;
concatMd?: string; concatMd?: string;
docUrl?: string; docUrl?: string;
openAPIDocUrl?: string; openAPIDocUrl?: string;
@ -130,10 +121,8 @@ export type SystemEnvType = {
vectorMaxProcess: number; vectorMaxProcess: number;
qaMaxProcess: number; qaMaxProcess: number;
vlmMaxProcess: number; vlmMaxProcess: number;
tokenWorkers: number; // token count max worker
hnswEfSearch: number; hnswEfSearch: number;
hnswMaxScanTuples: number; tokenWorkers: number; // token count max worker
oneapiUrl?: string; oneapiUrl?: string;
chatApiKey?: string; chatApiKey?: string;
@ -147,21 +136,3 @@ export type customPdfParseType = {
doc2xKey?: string; doc2xKey?: string;
price?: number; price?: number;
}; };
export type LicenseDataType = {
startTime: string;
expiredTime: string;
company: string;
description?: string; // 描述
hosts?: string[]; // 管理端有效域名
maxUsers?: number; // 最大用户数,不填默认不上限
maxApps?: number; // 最大应用数,不填默认不上限
maxDatasets?: number; // 最大数据集数,不填默认不上限
functions: {
sso: boolean;
pay: boolean;
customTemplates: boolean;
datasetEnhance: boolean;
batchEval: boolean;
};
};

View File

@ -2,248 +2,6 @@ import { type PromptTemplateItem } from '../type.d';
import { i18nT } from '../../../../web/i18n/utils'; import { i18nT } from '../../../../web/i18n/utils';
import { getPromptByVersion } from './utils'; import { getPromptByVersion } from './utils';
export const Prompt_userQuotePromptList: PromptTemplateItem[] = [
{
title: i18nT('app:template.standard_template'),
desc: '',
value: {
['4.9.7']: `## 任务描述
使 <Cites></Cites>
使
##
- 使 [id](CITE) <Cites></Cites> CITE , id id
- **** : "Nginx是一款轻量级的Web服务器、反向代理服务器[67e517e74767063e882d6861](CITE)。"
- ****"Nginx是一款轻量级的Web服务器、反向代理服务器[67e517e74767063e882d6861](CITE)[67e517e74767063e882d6862](CITE)。\n 它的特点是非常轻量[67e517e74767063e882d6863](CITE)。"
-
- id id <Cites></Cites>
##
-
- <Cites></Cites>
- <Cites></Cites>
- 使 Markdown
- 使
<Cites>
{{quote}}
</Cites>
##
{{question}}
##
`
}
},
{
title: i18nT('app:template.qa_template'),
desc: '',
value: {
['4.9.7']: `## 任务描述
使 <QA></QA>
##
-
- <Answer></Answer>
-
- <QA></QA>
- 使
<QA>
{{quote}}
</QA>
##
{{question}}
##
`
}
},
{
title: i18nT('app:template.standard_strict'),
desc: '',
value: {
['4.9.7']: `## 任务描述
使 <Cites></Cites>
使
##
- 使 [id](CITE) <Cites></Cites> CITE , id id
- **** : "Nginx是一款轻量级的Web服务器、反向代理服务器[67e517e74767063e882d6861](CITE)。"
- ****"Nginx是一款轻量级的Web服务器、反向代理服务器[67e517e74767063e882d6861](CITE)[67e517e74767063e882d6862](CITE)。\n 它的特点是非常轻量[67e517e74767063e882d6863](CITE)。"
-
- id id <Cites></Cites>
##
-
- <Cites></Cites>
- <Cites></Cites>
- 使 Markdown
- 使
##
使 <Cites></Cites> 使 <Cites></Cites>
<Cites>
{{quote}}
</Cites>
##
{{question}}
##
`
}
},
{
title: i18nT('app:template.hard_strict'),
desc: '',
value: {
['4.9.7']: `## 任务描述
使 <QA></QA>
##
-
- <Answer></Answer>
-
- <QA></QA>
- 使
##
使 <QA></QA> 使 <QA></QA>
<QA>
{{quote}}
</QA>
##
{{question}}
##
`
}
}
];
export const Prompt_systemQuotePromptList: PromptTemplateItem[] = [
{
title: i18nT('app:template.standard_template'),
desc: '',
value: {
['4.9.7']: `## 任务描述
使 <Cites></Cites>
使
##
- 使 [id](CITE) <Cites></Cites> CITE , id id
- **** : "Nginx是一款轻量级的Web服务器、反向代理服务器[67e517e74767063e882d6861](CITE)。"
- ****"Nginx是一款轻量级的Web服务器、反向代理服务器[67e517e74767063e882d6861](CITE)[67e517e74767063e882d6862](CITE)。\n 它的特点是非常轻量[67e517e74767063e882d6863](CITE)。"
-
- id id <Cites></Cites>
##
-
- <Cites></Cites>
- <Cites></Cites>
- 使 Markdown
- 使
<Cites>
{{quote}}
</Cites>`
}
},
{
title: i18nT('app:template.qa_template'),
desc: '',
value: {
['4.9.8']: `## 任务描述
使 <QA></QA>
##
-
- <Answer></Answer>
-
- <QA></QA>
- 使
<QA>
{{quote}}
</QA>`
}
},
{
title: i18nT('app:template.standard_strict'),
desc: '',
value: {
['4.9.7']: `## 任务描述
使 <Cites></Cites>
使
##
- 使 [id](CITE) <Cites></Cites> CITE , id id
- **** : "Nginx是一款轻量级的Web服务器、反向代理服务器[67e517e74767063e882d6861](CITE)。"
- ****"Nginx是一款轻量级的Web服务器、反向代理服务器[67e517e74767063e882d6861](CITE)[67e517e74767063e882d6862](CITE)。\n 它的特点是非常轻量[67e517e74767063e882d6863](CITE)。"
-
- id id <Cites></Cites>
##
-
- <Cites></Cites>
- <Cites></Cites>
- 使 Markdown
- 使
##
使 <Cites></Cites> 使 <Cites></Cites>
<Cites>
{{quote}}
</Cites>`
}
},
{
title: i18nT('app:template.hard_strict'),
desc: '',
value: {
['4.9.7']: `## 任务描述
使 <QA></QA>
##
-
- <Answer></Answer>
-
- <QA></QA>
- 使
##
使 <QA></QA> 使 <QA></QA>
<QA>
{{quote}}
</QA>`
}
}
];
export const Prompt_QuoteTemplateList: PromptTemplateItem[] = [ export const Prompt_QuoteTemplateList: PromptTemplateItem[] = [
{ {
title: i18nT('app:template.standard_template'), title: i18nT('app:template.standard_template'),
@ -252,6 +10,11 @@ export const Prompt_QuoteTemplateList: PromptTemplateItem[] = [
['4.9.7']: `{ ['4.9.7']: `{
"id": "{{id}}", "id": "{{id}}",
"sourceName": "{{source}}", "sourceName": "{{source}}",
"content": "{{q}}\n{{a}}"
}
`,
['4.9.2']: `{
"sourceName": "{{source}}",
"updateTime": "{{updateTime}}", "updateTime": "{{updateTime}}",
"content": "{{q}}\n{{a}}" "content": "{{q}}\n{{a}}"
} }
@ -262,7 +25,7 @@ export const Prompt_QuoteTemplateList: PromptTemplateItem[] = [
title: i18nT('app:template.qa_template'), title: i18nT('app:template.qa_template'),
desc: i18nT('app:template.qa_template_des'), desc: i18nT('app:template.qa_template_des'),
value: { value: {
['4.9.7']: `<Question> ['4.9.2']: `<Question>
{{q}} {{q}}
</Question> </Question>
<Answer> <Answer>
@ -277,6 +40,11 @@ export const Prompt_QuoteTemplateList: PromptTemplateItem[] = [
['4.9.7']: `{ ['4.9.7']: `{
"id": "{{id}}", "id": "{{id}}",
"sourceName": "{{source}}", "sourceName": "{{source}}",
"content": "{{q}}\n{{a}}"
}
`,
['4.9.2']: `{
"sourceName": "{{source}}",
"updateTime": "{{updateTime}}", "updateTime": "{{updateTime}}",
"content": "{{q}}\n{{a}}" "content": "{{q}}\n{{a}}"
} }
@ -287,7 +55,7 @@ export const Prompt_QuoteTemplateList: PromptTemplateItem[] = [
title: i18nT('app:template.hard_strict'), title: i18nT('app:template.hard_strict'),
desc: i18nT('app:template.hard_strict_des'), desc: i18nT('app:template.hard_strict_des'),
value: { value: {
['4.9.7']: `<Question> ['4.9.2']: `<Question>
{{q}} {{q}}
</Question> </Question>
<Answer> <Answer>
@ -296,12 +64,263 @@ export const Prompt_QuoteTemplateList: PromptTemplateItem[] = [
} }
} }
]; ];
export const getQuoteTemplate = (version?: string) => { export const getQuoteTemplate = (version?: string) => {
const defaultTemplate = Prompt_QuoteTemplateList[0].value; const defaultTemplate = Prompt_QuoteTemplateList[0].value;
return getPromptByVersion(version, defaultTemplate); return getPromptByVersion(version, defaultTemplate);
}; };
export const Prompt_userQuotePromptList: PromptTemplateItem[] = [
{
title: i18nT('app:template.standard_template'),
desc: '',
value: {
['4.9.7']: `使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Reference>
{{quote}}
</Reference>
-
- <Reference></Reference>
- <Reference></Reference>
- 使 Markdown
- 使
- 使 [id](CITE) <Reference></Reference> CITE , id id
- : "FastGPT 是一个基于大语言模型(LLM)的知识库问答系统[67e517e74767063e882d6861](CITE)。"
- `,
['4.9.2']: `使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Reference>
{{quote}}
</Reference>
-
- <Reference></Reference>
- <Reference></Reference>
- 使 Markdown
- 使
:"""{{question}}"""`
}
},
{
title: i18nT('app:template.qa_template'),
desc: '',
value: {
['4.9.2']: `使用 <QA></QA> 标记中的问答对进行回答。
<QA>
{{quote}}
</QA>
-
- <答案></答案>
-
- QA
:"""{{question}}"""`
}
},
{
title: i18nT('app:template.standard_strict'),
desc: '',
value: {
['4.9.7']: `忘记你已有的知识,仅使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Reference>
{{quote}}
</Reference>
1. <Reference></Reference>
2.
3.
- <Reference></Reference>
- <Reference></Reference>
- 使 Markdown
- 使
- 使 [id](CITE) <Reference></Reference> CITE , id id
- : "FastGPT 是一个基于大语言模型(LLM)的知识库问答系统[67e517e74767063e882d6861](CITE)。"
-
:"""{{question}}"""`,
['4.9.2']: `忘记你已有的知识,仅使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Reference>
{{quote}}
</Reference>
1. <Reference></Reference>
2.
3.
- <Reference></Reference>
- <Reference></Reference>
- 使 Markdown
- 使
:"""{{question}}"""`
}
},
{
title: i18nT('app:template.hard_strict'),
desc: '',
value: {
['4.9.2']: `忘记你已有的知识,仅使用 <QA></QA> 标记中的问答对进行回答。
<QA>
{{quote}}
</QA>
1. <QA></QA>
2.
3.
4.
5.
-
- <QA></QA>
- QA
- 使 Markdown
- 使
:"""{{question}}"""`
}
}
];
export const Prompt_systemQuotePromptList: PromptTemplateItem[] = [
{
title: i18nT('app:template.standard_template'),
desc: '',
value: {
['4.9.7']: `使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Reference>
{{quote}}
</Reference>
-
- <Reference></Reference>
- <Reference></Reference>
- 使 Markdown
- 使
- 使 [id](CITE) <Reference></Reference> CITE , id id
- : "FastGPT 是一个基于大语言模型(LLM)的知识库问答系统[67e517e74767063e882d6861](CITE)。"
- `,
['4.9.2']: `使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Reference>
{{quote}}
</Reference>
-
- <Reference></Reference>
- <Reference></Reference>
- 使 Markdown
- 使`
}
},
{
title: i18nT('app:template.qa_template'),
desc: '',
value: {
['4.9.2']: `使用 <QA></QA> 标记中的问答对进行回答。
<QA>
{{quote}}
</QA>
-
- <答案></答案>
-
- QA `
}
},
{
title: i18nT('app:template.standard_strict'),
desc: '',
value: {
['4.9.7']: `忘记你已有的知识,仅使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Reference>
{{quote}}
</Reference>
1. <Reference></Reference>
2.
3.
- <Reference></Reference>
- <Reference></Reference>
- 使 Markdown
- 使
- 使 [id](CITE) <Reference></Reference> CITE , id id
- : "FastGPT 是一个基于大语言模型(LLM)的知识库问答系统[67e517e74767063e882d6861](CITE)。"
-
:"""{{question}}"""`,
['4.9.2']: `忘记你已有的知识,仅使用 <Reference></Reference> 标记中的内容作为本次对话的参考:
<Reference>
{{quote}}
</Reference>
1. <Reference></Reference>
2.
3.
- <Reference></Reference>
- <Reference></Reference>
- 使 Markdown
- 使`
}
},
{
title: i18nT('app:template.hard_strict'),
desc: '',
value: {
['4.9.2']: `忘记你已有的知识,仅使用 <QA></QA> 标记中的问答对进行回答。
<QA>
{{quote}}
</QA>
1. <QA></QA>
2.
3.
4.
5.
-
- <QA></QA>
- QA
- 使 Markdown
- 使`
}
}
];
export const getQuotePrompt = (version?: string, role: 'user' | 'system' = 'user') => { export const getQuotePrompt = (version?: string, role: 'user' | 'system' = 'user') => {
const quotePromptTemplates = const quotePromptTemplates =
role === 'user' ? Prompt_userQuotePromptList : Prompt_systemQuotePromptList; role === 'user' ? Prompt_userQuotePromptList : Prompt_systemQuotePromptList;
@ -312,9 +331,9 @@ export const getQuotePrompt = (version?: string, role: 'user' | 'system' = 'user
}; };
// Document quote prompt // Document quote prompt
export const getDocumentQuotePrompt = (version?: string) => { export const getDocumentQuotePrompt = (version: string) => {
const promptMap = { const promptMap = {
['4.9.7']: `将 <FilesContent></FilesContent> 中的内容作为本次对话的参考: ['4.9.2']: `将 <FilesContent></FilesContent> 中的内容作为本次对话的参考:
<FilesContent> <FilesContent>
{{quote}} {{quote}}
</FilesContent> </FilesContent>

View File

@ -1,19 +1,14 @@
export const getDatasetSearchToolResponsePrompt = () => { export const getDatasetSearchToolResponsePrompt = () => {
return `## Role return `## Role
"cites" 使 "quotes" 使
## ## Rules
- 使 **[id](CITE)** "cites" CITE , id id
- **** : "Nginx是一款轻量级的Web服务器、反向代理服务器[67e517e74767063e882d6861](CITE)。"
- ****"Nginx是一款轻量级的Web服务器、反向代理服务器[67e517e74767063e882d6861](CITE)[67e517e74767063e882d6862](CITE)。\n 它的特点是非常轻量[67e517e74767063e882d6863](CITE)。"
-
- id id cites
##
- -
- "cites" - "quotes"
- "cites" - "quotes"
- 使 Markdown - 使 Markdown
- 使`; - 使
- 使 [id](CITE) "quotes" CITE , id id
- : "FastGPT 是一个基于大语言模型(LLM)的知识库问答系统[67e517e74767063e882d6861](CITE)。"
- `;
}; };

View File

@ -1,5 +1,4 @@
export const getPromptByVersion = (version?: string, promptMap: Record<string, string> = {}) => { export const getPromptByVersion = (version?: string, promptMap: Record<string, string> = {}) => {
// 版本号大的在前面
const versions = Object.keys(promptMap).sort((a, b) => { const versions = Object.keys(promptMap).sort((a, b) => {
const [majorA, minorA, patchA] = a.split('.').map(Number); const [majorA, minorA, patchA] = a.split('.').map(Number);
const [majorB, minorB, patchB] = b.split('.').map(Number); const [majorB, minorB, patchB] = b.split('.').map(Number);
@ -16,5 +15,5 @@ export const getPromptByVersion = (version?: string, promptMap: Record<string, s
if (version in promptMap) { if (version in promptMap) {
return promptMap[version]; return promptMap[version];
} }
return promptMap[versions[0]]; return promptMap[versions[versions.length - 1]];
}; };

View File

@ -60,3 +60,5 @@ export enum AppTemplateTypeEnum {
// special type // special type
contribute = 'contribute' contribute = 'contribute'
} }
export const defaultDatasetMaxTokens = 16000;

View File

@ -5,7 +5,7 @@ import {
FlowNodeTypeEnum FlowNodeTypeEnum
} from '../../workflow/node/constant'; } from '../../workflow/node/constant';
import { nanoid } from 'nanoid'; import { nanoid } from 'nanoid';
import { type McpToolConfigType } from '../type'; import { type ToolType } from '../type';
import { i18nT } from '../../../../web/i18n/utils'; import { i18nT } from '../../../../web/i18n/utils';
import { type RuntimeNodeItemType } from '../../workflow/runtime/type'; import { type RuntimeNodeItemType } from '../../workflow/runtime/type';
@ -16,7 +16,7 @@ export const getMCPToolSetRuntimeNode = ({
avatar avatar
}: { }: {
url: string; url: string;
toolList: McpToolConfigType[]; toolList: ToolType[];
name?: string; name?: string;
avatar?: string; avatar?: string;
}): RuntimeNodeItemType => { }): RuntimeNodeItemType => {
@ -45,7 +45,7 @@ export const getMCPToolRuntimeNode = ({
url, url,
avatar = 'core/app/type/mcpToolsFill' avatar = 'core/app/type/mcpToolsFill'
}: { }: {
tool: McpToolConfigType; tool: ToolType;
url: string; url: string;
avatar?: string; avatar?: string;
}): RuntimeNodeItemType => { }): RuntimeNodeItemType => {
@ -65,7 +65,7 @@ export const getMCPToolRuntimeNode = ({
...Object.entries(tool.inputSchema?.properties || {}).map(([key, value]) => ({ ...Object.entries(tool.inputSchema?.properties || {}).map(([key, value]) => ({
key, key,
label: key, label: key,
valueType: value.type as WorkflowIOValueTypeEnum, // TODO: 这里需要做一个映射 valueType: value.type as WorkflowIOValueTypeEnum,
description: value.description, description: value.description,
toolDescription: value.description || key, toolDescription: value.description || key,
required: tool.inputSchema?.required?.includes(key) || false, required: tool.inputSchema?.required?.includes(key) || false,

View File

@ -16,6 +16,16 @@ import { FlowNodeInputTypeEnum } from '../../core/workflow/node/constant';
import type { WorkflowTemplateBasicType } from '@fastgpt/global/core/workflow/type'; import type { WorkflowTemplateBasicType } from '@fastgpt/global/core/workflow/type';
import type { SourceMemberType } from '../../support/user/type'; import type { SourceMemberType } from '../../support/user/type';
export type ToolType = {
name: string;
description: string;
inputSchema: {
type: string;
properties?: Record<string, { type: string; description?: string }>;
required?: string[];
};
};
export type AppSchema = { export type AppSchema = {
_id: string; _id: string;
parentId?: ParentIdType; parentId?: ParentIdType;
@ -107,16 +117,6 @@ export type AppSimpleEditFormType = {
chatConfig: AppChatConfigType; chatConfig: AppChatConfigType;
}; };
export type McpToolConfigType = {
name: string;
description: string;
inputSchema: {
type: string;
properties?: Record<string, { type: string; description?: string }>;
required?: string[];
};
};
/* app chat config type */ /* app chat config type */
export type AppChatConfigType = { export type AppChatConfigType = {
welcomeText?: string; welcomeText?: string;

View File

@ -9,9 +9,6 @@ import { type WorkflowTemplateBasicType } from '../workflow/type';
import { AppTypeEnum } from './constants'; import { AppTypeEnum } from './constants';
import { AppErrEnum } from '../../common/error/code/app'; import { AppErrEnum } from '../../common/error/code/app';
import { PluginErrEnum } from '../../common/error/code/plugin'; import { PluginErrEnum } from '../../common/error/code/plugin';
import { i18nT } from '../../../web/i18n/utils';
import appErrList from '../../common/error/code/app';
import pluginErrList from '../../common/error/code/plugin';
export const getDefaultAppForm = (): AppSimpleEditFormType => { export const getDefaultAppForm = (): AppSimpleEditFormType => {
return { return {
@ -192,10 +189,17 @@ export const getAppType = (config?: WorkflowTemplateBasicType | AppSimpleEditFor
return ''; return '';
}; };
export const formatToolError = (error?: any) => { export const checkAppUnExistError = (error?: string) => {
if (!error || typeof error !== 'string') return; const unExistError: Array<string> = [
AppErrEnum.unAuthApp,
AppErrEnum.unExist,
PluginErrEnum.unAuth,
PluginErrEnum.unExist
];
const errorText = appErrList[error]?.message || pluginErrList[error]?.message; if (!!error && unExistError.includes(error)) {
return error;
return errorText || error; } else {
return undefined;
}
}; };

View File

@ -26,7 +26,6 @@ export type ChatSchema = {
teamId: string; teamId: string;
tmbId: string; tmbId: string;
appId: string; appId: string;
createTime: Date;
updateTime: Date; updateTime: Date;
title: string; title: string;
customTitle: string; customTitle: string;
@ -113,7 +112,6 @@ export type ChatItemSchema = (UserChatItemType | SystemChatItemType | AIChatItem
appId: string; appId: string;
time: Date; time: Date;
durationSeconds?: number; durationSeconds?: number;
errorMsg?: string;
}; };
export type AdminFbkType = { export type AdminFbkType = {
@ -145,7 +143,6 @@ export type ChatSiteItemType = (UserChatItemType | SystemChatItemType | AIChatIt
responseData?: ChatHistoryItemResType[]; responseData?: ChatHistoryItemResType[];
time?: Date; time?: Date;
durationSeconds?: number; durationSeconds?: number;
errorMsg?: string;
} & ChatBoxInputType & } & ChatBoxInputType &
ResponseTagItemType; ResponseTagItemType;

View File

@ -1,11 +1,9 @@
import type { ChunkSettingsType, DatasetDataIndexItemType, DatasetSchemaType } from './type'; import type { DatasetDataIndexItemType, DatasetSchemaType } from './type';
import type { import type {
DatasetCollectionTypeEnum, DatasetCollectionTypeEnum,
DatasetCollectionDataProcessModeEnum, DatasetCollectionDataProcessModeEnum,
ChunkSettingModeEnum, ChunkSettingModeEnum,
DataChunkSplitModeEnum, DataChunkSplitModeEnum
ChunkTriggerConfigTypeEnum,
ParagraphChunkAIModeEnum
} from './constants'; } from './constants';
import type { LLMModelItemType } from '../ai/model.d'; import type { LLMModelItemType } from '../ai/model.d';
import type { ParentIdType } from 'common/parentFolder/type'; import type { ParentIdType } from 'common/parentFolder/type';
@ -34,16 +32,26 @@ export type DatasetUpdateBody = {
}; };
/* ================= collection ===================== */ /* ================= collection ===================== */
// Input + store params export type DatasetCollectionChunkMetadataType = {
type DatasetCollectionStoreDataType = ChunkSettingsType & {
parentId?: string; parentId?: string;
metadata?: Record<string, any>;
customPdfParse?: boolean; customPdfParse?: boolean;
trainingType?: DatasetCollectionDataProcessModeEnum;
imageIndex?: boolean;
autoIndexes?: boolean;
chunkSettingMode?: ChunkSettingModeEnum;
chunkSplitMode?: DataChunkSplitModeEnum;
chunkSize?: number;
indexSize?: number;
chunkSplitter?: string;
qaPrompt?: string;
metadata?: Record<string, any>;
}; };
// create collection params // create collection params
export type CreateDatasetCollectionParams = DatasetCollectionStoreDataType & { export type CreateDatasetCollectionParams = DatasetCollectionChunkMetadataType & {
datasetId: string; datasetId: string;
name: string; name: string;
type: DatasetCollectionTypeEnum; type: DatasetCollectionTypeEnum;
@ -64,7 +72,7 @@ export type CreateDatasetCollectionParams = DatasetCollectionStoreDataType & {
nextSyncTime?: Date; nextSyncTime?: Date;
}; };
export type ApiCreateDatasetCollectionParams = DatasetCollectionStoreDataType & { export type ApiCreateDatasetCollectionParams = DatasetCollectionChunkMetadataType & {
datasetId: string; datasetId: string;
tags?: string[]; tags?: string[];
}; };
@ -82,7 +90,7 @@ export type ApiDatasetCreateDatasetCollectionParams = ApiCreateDatasetCollection
export type FileIdCreateDatasetCollectionParams = ApiCreateDatasetCollectionParams & { export type FileIdCreateDatasetCollectionParams = ApiCreateDatasetCollectionParams & {
fileId: string; fileId: string;
}; };
export type reTrainingDatasetFileCollectionParams = DatasetCollectionStoreDataType & { export type reTrainingDatasetFileCollectionParams = DatasetCollectionChunkMetadataType & {
datasetId: string; datasetId: string;
collectionId: string; collectionId: string;
}; };
@ -139,7 +147,6 @@ export type PushDatasetDataProps = {
collectionId: string; collectionId: string;
data: PushDatasetDataChunkProps[]; data: PushDatasetDataChunkProps[];
trainingType?: DatasetCollectionDataProcessModeEnum; trainingType?: DatasetCollectionDataProcessModeEnum;
indexSize?: number;
autoIndexes?: boolean; autoIndexes?: boolean;
imageIndex?: boolean; imageIndex?: boolean;
prompt?: string; prompt?: string;

View File

@ -120,8 +120,6 @@ export const DatasetCollectionSyncResultMap = {
export enum DatasetCollectionDataProcessModeEnum { export enum DatasetCollectionDataProcessModeEnum {
chunk = 'chunk', chunk = 'chunk',
qa = 'qa', qa = 'qa',
backup = 'backup',
auto = 'auto' // abandon auto = 'auto' // abandon
} }
export const DatasetCollectionDataProcessModeMap = { export const DatasetCollectionDataProcessModeMap = {
@ -133,35 +131,21 @@ export const DatasetCollectionDataProcessModeMap = {
label: i18nT('common:core.dataset.training.QA mode'), label: i18nT('common:core.dataset.training.QA mode'),
tooltip: i18nT('common:core.dataset.import.QA Import Tip') tooltip: i18nT('common:core.dataset.import.QA Import Tip')
}, },
[DatasetCollectionDataProcessModeEnum.backup]: {
label: i18nT('dataset:backup_mode'),
tooltip: i18nT('dataset:backup_mode')
},
[DatasetCollectionDataProcessModeEnum.auto]: { [DatasetCollectionDataProcessModeEnum.auto]: {
label: i18nT('common:core.dataset.training.Auto mode'), label: i18nT('common:core.dataset.training.Auto mode'),
tooltip: i18nT('common:core.dataset.training.Auto mode Tip') tooltip: i18nT('common:core.dataset.training.Auto mode Tip')
} }
}; };
export enum ChunkTriggerConfigTypeEnum {
minSize = 'minSize',
forceChunk = 'forceChunk',
maxSize = 'maxSize'
}
export enum ChunkSettingModeEnum { export enum ChunkSettingModeEnum {
auto = 'auto', auto = 'auto',
custom = 'custom' custom = 'custom'
} }
export enum DataChunkSplitModeEnum { export enum DataChunkSplitModeEnum {
paragraph = 'paragraph',
size = 'size', size = 'size',
char = 'char' char = 'char'
} }
export enum ParagraphChunkAIModeEnum {
auto = 'auto',
force = 'force'
}
/* ------------ data -------------- */ /* ------------ data -------------- */
@ -170,6 +154,7 @@ export enum ImportDataSourceEnum {
fileLocal = 'fileLocal', fileLocal = 'fileLocal',
fileLink = 'fileLink', fileLink = 'fileLink',
fileCustom = 'fileCustom', fileCustom = 'fileCustom',
csvTable = 'csvTable',
externalFile = 'externalFile', externalFile = 'externalFile',
apiDataset = 'apiDataset', apiDataset = 'apiDataset',
reTraining = 'reTraining' reTraining = 'reTraining'

View File

@ -32,7 +32,7 @@ export const DatasetDataIndexMap: Record<
color: 'red' color: 'red'
}, },
[DatasetDataIndexTypeEnum.image]: { [DatasetDataIndexTypeEnum.image]: {
label: i18nT('dataset:data_index_image'), label: i18nT('common:data_index_image'),
color: 'purple' color: 'purple'
} }
}; };

View File

@ -118,8 +118,9 @@ export const computeChunkSize = (params: {
return getLLMMaxChunkSize(params.llmModel); return getLLMMaxChunkSize(params.llmModel);
} }
return Math.min(params.chunkSize ?? chunkAutoChunkSize, getLLMMaxChunkSize(params.llmModel)); return Math.min(params.chunkSize || chunkAutoChunkSize, getLLMMaxChunkSize(params.llmModel));
}; };
export const computeChunkSplitter = (params: { export const computeChunkSplitter = (params: {
chunkSettingMode?: ChunkSettingModeEnum; chunkSettingMode?: ChunkSettingModeEnum;
chunkSplitMode?: DataChunkSplitModeEnum; chunkSplitMode?: DataChunkSplitModeEnum;
@ -128,21 +129,8 @@ export const computeChunkSplitter = (params: {
if (params.chunkSettingMode === ChunkSettingModeEnum.auto) { if (params.chunkSettingMode === ChunkSettingModeEnum.auto) {
return undefined; return undefined;
} }
if (params.chunkSplitMode !== DataChunkSplitModeEnum.char) { if (params.chunkSplitMode === DataChunkSplitModeEnum.size) {
return undefined; return undefined;
} }
return params.chunkSplitter; return params.chunkSplitter;
}; };
export const computeParagraphChunkDeep = (params: {
chunkSettingMode?: ChunkSettingModeEnum;
chunkSplitMode?: DataChunkSplitModeEnum;
paragraphChunkDeep?: number;
}) => {
if (params.chunkSettingMode === ChunkSettingModeEnum.auto) {
return 5;
}
if (params.chunkSplitMode === DataChunkSplitModeEnum.paragraph) {
return params.paragraphChunkDeep;
}
return 0;
};

View File

@ -8,42 +8,26 @@ import type {
DatasetStatusEnum, DatasetStatusEnum,
DatasetTypeEnum, DatasetTypeEnum,
SearchScoreTypeEnum, SearchScoreTypeEnum,
TrainingModeEnum, TrainingModeEnum
ChunkSettingModeEnum,
ChunkTriggerConfigTypeEnum
} from './constants'; } from './constants';
import type { DatasetPermission } from '../../support/permission/dataset/controller'; import type { DatasetPermission } from '../../support/permission/dataset/controller';
import { Permission } from '../../support/permission/controller';
import type { APIFileServer, FeishuServer, YuqueServer } from './apiDataset'; import type { APIFileServer, FeishuServer, YuqueServer } from './apiDataset';
import type { SourceMemberType } from 'support/user/type'; import type { SourceMemberType } from 'support/user/type';
import type { DatasetDataIndexTypeEnum } from './data/constants'; import type { DatasetDataIndexTypeEnum } from './data/constants';
import type { ChunkSettingModeEnum } from './constants';
export type ChunkSettingsType = { export type ChunkSettingsType = {
trainingType?: DatasetCollectionDataProcessModeEnum; trainingType: DatasetCollectionDataProcessModeEnum;
// Chunk trigger
chunkTriggerType?: ChunkTriggerConfigTypeEnum;
chunkTriggerMinSize?: number; // maxSize from agent model, not store
// Data enhance
dataEnhanceCollectionName?: boolean; // Auto add collection name to data
// Index enhance
imageIndex?: boolean;
autoIndexes?: boolean; autoIndexes?: boolean;
imageIndex?: boolean;
// Chunk setting chunkSettingMode?: ChunkSettingModeEnum;
chunkSettingMode?: ChunkSettingModeEnum; // 系统参数/自定义参数
chunkSplitMode?: DataChunkSplitModeEnum; chunkSplitMode?: DataChunkSplitModeEnum;
// Paragraph split
paragraphChunkAIMode?: ParagraphChunkAIModeEnum;
paragraphChunkDeep?: number; // Paragraph deep
paragraphChunkMinSize?: number; // Paragraph min size, if too small, it will merge
// Size split
chunkSize?: number; // chunk/qa chunk size, Paragraph max chunk size.
// Char split
chunkSplitter?: string; // chunk/qa chunk splitter
indexSize?: number;
chunkSize?: number;
indexSize?: number;
chunkSplitter?: string;
qaPrompt?: string; qaPrompt?: string;
}; };
@ -82,7 +66,7 @@ export type DatasetSchemaType = {
defaultPermission?: number; defaultPermission?: number;
}; };
export type DatasetCollectionSchemaType = ChunkSettingsType & { export type DatasetCollectionSchemaType = {
_id: string; _id: string;
teamId: string; teamId: string;
tmbId: string; tmbId: string;
@ -117,7 +101,18 @@ export type DatasetCollectionSchemaType = ChunkSettingsType & {
// Parse settings // Parse settings
customPdfParse?: boolean; customPdfParse?: boolean;
// Chunk settings
autoIndexes?: boolean;
imageIndex?: boolean;
trainingType: DatasetCollectionDataProcessModeEnum; trainingType: DatasetCollectionDataProcessModeEnum;
chunkSettingMode?: ChunkSettingModeEnum;
chunkSplitMode?: DataChunkSplitModeEnum;
chunkSize?: number;
indexSize?: number;
chunkSplitter?: string;
qaPrompt?: string;
}; };
export type DatasetCollectionTagsSchemaType = { export type DatasetCollectionTagsSchemaType = {
@ -180,7 +175,6 @@ export type DatasetTrainingSchemaType = {
q: string; q: string;
a: string; a: string;
chunkIndex: number; chunkIndex: number;
indexSize?: number;
weight: number; weight: number;
indexes: Omit<DatasetDataIndexItemType, 'dataId'>[]; indexes: Omit<DatasetDataIndexItemType, 'dataId'>[];
retryCount: number; retryCount: number;

View File

@ -40,6 +40,5 @@ export function getSourceNameIcon({
export const predictDataLimitLength = (mode: TrainingModeEnum, data: any[]) => { export const predictDataLimitLength = (mode: TrainingModeEnum, data: any[]) => {
if (mode === TrainingModeEnum.qa) return data.length * 20; if (mode === TrainingModeEnum.qa) return data.length * 20;
if (mode === TrainingModeEnum.auto) return data.length * 5; if (mode === TrainingModeEnum.auto) return data.length * 5;
if (mode === TrainingModeEnum.image) return data.length * 2;
return data.length; return data.length;
}; };

View File

@ -218,6 +218,7 @@ export const FlowValueTypeMap: Record<
}; };
export const EDGE_TYPE = 'default'; export const EDGE_TYPE = 'default';
export const defaultNodeVersion = '481';
export const chatHistoryValueDesc = `{ export const chatHistoryValueDesc = `{
obj: System | Human | AI; obj: System | Human | AI;
@ -235,10 +236,3 @@ export const datasetQuoteValueDesc = `{
export const datasetSelectValueDesc = `{ export const datasetSelectValueDesc = `{
datasetId: string; datasetId: string;
}[]`; }[]`;
export const AppNodeFlowNodeTypeMap: Record<any, boolean> = {
[FlowNodeTypeEnum.pluginModule]: true,
[FlowNodeTypeEnum.appModule]: true,
[FlowNodeTypeEnum.tool]: true,
[FlowNodeTypeEnum.toolSet]: true
};

View File

@ -7,7 +7,7 @@ import type {
} from '../../chat/type'; } from '../../chat/type';
import { NodeOutputItemType } from '../../chat/type'; import { NodeOutputItemType } from '../../chat/type';
import type { FlowNodeInputItemType, FlowNodeOutputItemType } from '../type/io.d'; import type { FlowNodeInputItemType, FlowNodeOutputItemType } from '../type/io.d';
import type { NodeToolConfigType, StoreNodeItemType } from '../type/node'; import type { StoreNodeItemType } from '../type/node';
import type { DispatchNodeResponseKeyEnum } from './constants'; import type { DispatchNodeResponseKeyEnum } from './constants';
import type { StoreEdgeItemType } from '../type/edge'; import type { StoreEdgeItemType } from '../type/edge';
import type { NodeInputKeyEnum } from '../constants'; import type { NodeInputKeyEnum } from '../constants';
@ -101,10 +101,7 @@ export type RuntimeNodeItemType = {
outputs: FlowNodeOutputItemType[]; outputs: FlowNodeOutputItemType[];
pluginId?: string; // workflow id / plugin id pluginId?: string; // workflow id / plugin id
version?: string; version: string;
// tool
toolConfig?: NodeToolConfigType;
}; };
export type RuntimeEdgeItemType = StoreEdgeItemType & { export type RuntimeEdgeItemType = StoreEdgeItemType & {
@ -117,7 +114,7 @@ export type DispatchNodeResponseType = {
runningTime?: number; runningTime?: number;
query?: string; query?: string;
textOutput?: string; textOutput?: string;
error?: Record<string, any> | string; error?: Record<string, any>;
customInputs?: Record<string, any>; customInputs?: Record<string, any>;
customOutputs?: Record<string, any>; customOutputs?: Record<string, any>;
nodeInputs?: Record<string, any>; nodeInputs?: Record<string, any>;

View File

@ -25,6 +25,7 @@ export const RunAppModule: FlowNodeTemplateType = {
name: i18nT('workflow:application_call'), name: i18nT('workflow:application_call'),
intro: i18nT('workflow:select_another_application_to_call'), intro: i18nT('workflow:select_another_application_to_call'),
showStatus: true, showStatus: true,
version: '481',
isTool: true, isTool: true,
inputs: [ inputs: [
{ {

View File

@ -19,6 +19,7 @@ import {
Input_Template_UserChatInput, Input_Template_UserChatInput,
Input_Template_File_Link Input_Template_File_Link
} from '../../input'; } from '../../input';
import { chatNodeSystemPromptTip, systemPromptTip } from '../../tip';
import { getHandleConfig } from '../../utils'; import { getHandleConfig } from '../../utils';
import { i18nT } from '../../../../../../web/i18n/utils'; import { i18nT } from '../../../../../../web/i18n/utils';
@ -53,7 +54,7 @@ export const AiChatModule: FlowNodeTemplateType = {
intro: i18nT('workflow:template.ai_chat_intro'), intro: i18nT('workflow:template.ai_chat_intro'),
showStatus: true, showStatus: true,
isTool: true, isTool: true,
courseUrl: '/docs/guide/dashboard/workflow/ai_chat/', courseUrl: '/docs/guide/workbench/workflow/ai_chat/',
version: '4.9.7', version: '4.9.7',
inputs: [ inputs: [
Input_Template_SettingAiModel, Input_Template_SettingAiModel,
@ -120,7 +121,12 @@ export const AiChatModule: FlowNodeTemplateType = {
valueType: WorkflowIOValueTypeEnum.string valueType: WorkflowIOValueTypeEnum.string
}, },
// settings modal --- // settings modal ---
Input_Template_System_Prompt, {
...Input_Template_System_Prompt,
label: i18nT('common:core.ai.Prompt'),
description: systemPromptTip,
placeholder: chatNodeSystemPromptTip
},
Input_Template_History, Input_Template_History,
Input_Template_Dataset_Quote, Input_Template_Dataset_Quote,
Input_Template_File_Link, Input_Template_File_Link,

View File

@ -17,7 +17,8 @@ export const AssignedAnswerModule: FlowNodeTemplateType = {
avatar: 'core/workflow/template/reply', avatar: 'core/workflow/template/reply',
name: i18nT('workflow:assigned_reply'), name: i18nT('workflow:assigned_reply'),
intro: i18nT('workflow:intro_assigned_reply'), intro: i18nT('workflow:intro_assigned_reply'),
courseUrl: '/docs/guide/dashboard/workflow/reply/', courseUrl: '/docs/guide/workbench/workflow/reply/',
version: '481',
isTool: true, isTool: true,
inputs: [ inputs: [
{ {

View File

@ -31,7 +31,7 @@ export const ClassifyQuestionModule: FlowNodeTemplateType = {
intro: i18nT('workflow:intro_question_classification'), intro: i18nT('workflow:intro_question_classification'),
showStatus: true, showStatus: true,
version: '4.9.2', version: '4.9.2',
courseUrl: '/docs/guide/dashboard/workflow/question_classify/', courseUrl: '/docs/guide/workbench/workflow/question_classify/',
inputs: [ inputs: [
{ {
...Input_Template_SelectAIModel, ...Input_Template_SelectAIModel,

View File

@ -26,7 +26,7 @@ export const ContextExtractModule: FlowNodeTemplateType = {
intro: i18nT('workflow:intro_text_content_extraction'), intro: i18nT('workflow:intro_text_content_extraction'),
showStatus: true, showStatus: true,
isTool: true, isTool: true,
courseUrl: '/docs/guide/dashboard/workflow/content_extract/', courseUrl: '/docs/guide/workbench/workflow/content_extract/',
version: '4.9.2', version: '4.9.2',
inputs: [ inputs: [
{ {

View File

@ -17,7 +17,8 @@ export const CustomFeedbackNode: FlowNodeTemplateType = {
avatar: 'core/workflow/template/customFeedback', avatar: 'core/workflow/template/customFeedback',
name: i18nT('workflow:custom_feedback'), name: i18nT('workflow:custom_feedback'),
intro: i18nT('workflow:intro_custom_feedback'), intro: i18nT('workflow:intro_custom_feedback'),
courseUrl: '/docs/guide/dashboard/workflow/custom_feedback/', courseUrl: '/docs/guide/workbench/workflow/custom_feedback/',
version: '486',
inputs: [ inputs: [
{ {
key: NodeInputKeyEnum.textareaInput, key: NodeInputKeyEnum.textareaInput,

View File

@ -42,7 +42,8 @@ export const DatasetConcatModule: FlowNodeTemplateType = {
intro: i18nT('workflow:intro_knowledge_base_search_merge'), intro: i18nT('workflow:intro_knowledge_base_search_merge'),
showStatus: false, showStatus: false,
courseUrl: '/docs/guide/dashboard/workflow/knowledge_base_search_merge/', version: '486',
courseUrl: '/docs/guide/workbench/workflow/knowledge_base_search_merge/',
inputs: [ inputs: [
{ {
key: NodeInputKeyEnum.datasetMaxTokens, key: NodeInputKeyEnum.datasetMaxTokens,

View File

@ -30,7 +30,7 @@ export const DatasetSearchModule: FlowNodeTemplateType = {
intro: Dataset_SEARCH_DESC, intro: Dataset_SEARCH_DESC,
showStatus: true, showStatus: true,
isTool: true, isTool: true,
courseUrl: '/docs/guide/dashboard/workflow/dataset_search/', courseUrl: '/docs/guide/workbench/workflow/dataset_search/',
version: '4.9.2', version: '4.9.2',
inputs: [ inputs: [
{ {

View File

@ -27,7 +27,8 @@ export const HttpNode468: FlowNodeTemplateType = {
intro: i18nT('workflow:intro_http_request'), intro: i18nT('workflow:intro_http_request'),
showStatus: true, showStatus: true,
isTool: true, isTool: true,
courseUrl: '/docs/guide/dashboard/workflow/http/', courseUrl: '/docs/guide/workbench/workflow/http/',
version: '481',
inputs: [ inputs: [
{ {
...Input_Template_DynamicInput, ...Input_Template_DynamicInput,

View File

@ -23,7 +23,8 @@ export const IfElseNode: FlowNodeTemplateType = {
name: i18nT('workflow:condition_checker'), name: i18nT('workflow:condition_checker'),
intro: i18nT('workflow:execute_different_branches_based_on_conditions'), intro: i18nT('workflow:execute_different_branches_based_on_conditions'),
showStatus: true, showStatus: true,
courseUrl: '/docs/guide/dashboard/workflow/tfswitch/', courseUrl: '/docs/guide/workbench/workflow/tfswitch/',
version: '481',
inputs: [ inputs: [
{ {
key: NodeInputKeyEnum.ifElseList, key: NodeInputKeyEnum.ifElseList,

View File

@ -23,6 +23,7 @@ export const FormInputNode: FlowNodeTemplateType = {
name: i18nT('app:workflow.form_input'), name: i18nT('app:workflow.form_input'),
intro: i18nT(`app:workflow.form_input_tip`), intro: i18nT(`app:workflow.form_input_tip`),
isTool: true, isTool: true,
version: '4811',
inputs: [ inputs: [
{ {
key: NodeInputKeyEnum.description, key: NodeInputKeyEnum.description,

View File

@ -24,7 +24,8 @@ export const UserSelectNode: FlowNodeTemplateType = {
name: i18nT('app:workflow.user_select'), name: i18nT('app:workflow.user_select'),
intro: i18nT(`app:workflow.user_select_tip`), intro: i18nT(`app:workflow.user_select_tip`),
isTool: true, isTool: true,
courseUrl: '/docs/guide/dashboard/workflow/user-selection/', version: '489',
courseUrl: '/docs/guide/workbench/workflow/user-selection/',
inputs: [ inputs: [
{ {
key: NodeInputKeyEnum.description, key: NodeInputKeyEnum.description,

View File

@ -32,7 +32,8 @@ export const LafModule: FlowNodeTemplateType = {
intro: i18nT('workflow:intro_laf_function_call'), intro: i18nT('workflow:intro_laf_function_call'),
showStatus: true, showStatus: true,
isTool: true, isTool: true,
courseUrl: '/docs/guide/dashboard/workflow/laf/', courseUrl: '/docs/guide/workbench/workflow/laf/',
version: '481',
inputs: [ inputs: [
{ {
...Input_Template_DynamicInput, ...Input_Template_DynamicInput,

View File

@ -29,7 +29,8 @@ export const LoopNode: FlowNodeTemplateType = {
name: i18nT('workflow:loop'), name: i18nT('workflow:loop'),
intro: i18nT('workflow:intro_loop'), intro: i18nT('workflow:intro_loop'),
showStatus: true, showStatus: true,
courseUrl: '/docs/guide/dashboard/workflow/loop/', version: '4811',
courseUrl: '/docs/guide/workbench/workflow/loop/',
inputs: [ inputs: [
{ {
key: NodeInputKeyEnum.loopInputArray, key: NodeInputKeyEnum.loopInputArray,

View File

@ -19,6 +19,7 @@ export const LoopEndNode: FlowNodeTemplateType = {
avatar: 'core/workflow/template/loopEnd', avatar: 'core/workflow/template/loopEnd',
name: i18nT('workflow:loop_end'), name: i18nT('workflow:loop_end'),
showStatus: false, showStatus: false,
version: '4811',
inputs: [ inputs: [
{ {
key: NodeInputKeyEnum.loopEndInput, key: NodeInputKeyEnum.loopEndInput,

View File

@ -24,6 +24,7 @@ export const LoopStartNode: FlowNodeTemplateType = {
unique: true, unique: true,
forbidDelete: true, forbidDelete: true,
showStatus: false, showStatus: false,
version: '4811',
inputs: [ inputs: [
{ {
key: NodeInputKeyEnum.loopStartInput, key: NodeInputKeyEnum.loopStartInput,

View File

@ -15,6 +15,7 @@ export const PluginConfigNode: FlowNodeTemplateType = {
intro: '', intro: '',
unique: true, unique: true,
forbidDelete: true, forbidDelete: true,
version: '4811',
inputs: [], inputs: [],
outputs: [] outputs: []
}; };

View File

@ -16,6 +16,7 @@ export const PluginInputModule: FlowNodeTemplateType = {
name: i18nT('workflow:plugin_input'), name: i18nT('workflow:plugin_input'),
intro: i18nT('workflow:intro_plugin_input'), intro: i18nT('workflow:intro_plugin_input'),
showStatus: false, showStatus: false,
version: '481',
inputs: [], inputs: [],
outputs: [] outputs: []
}; };

View File

@ -16,6 +16,7 @@ export const PluginOutputModule: FlowNodeTemplateType = {
name: i18nT('workflow:template.plugin_output'), name: i18nT('workflow:template.plugin_output'),
intro: i18nT('workflow:intro_custom_plugin_output'), intro: i18nT('workflow:intro_custom_plugin_output'),
showStatus: false, showStatus: false,
version: '481',
inputs: [], inputs: [],
outputs: [] outputs: []
}; };

View File

@ -13,6 +13,7 @@ export const RunAppNode: FlowNodeTemplateType = {
name: '', name: '',
showStatus: false, showStatus: false,
isTool: false, isTool: false,
version: '481',
inputs: [], // [{key:'pluginId'},...] inputs: [], // [{key:'pluginId'},...]
outputs: [] outputs: []
}; };

View File

@ -13,6 +13,7 @@ export const RunPluginModule: FlowNodeTemplateType = {
name: '', name: '',
showStatus: false, showStatus: false,
isTool: true, isTool: true,
version: '481',
inputs: [], // [{key:'pluginId'},...] inputs: [], // [{key:'pluginId'},...]
outputs: [] outputs: []
}; };

View File

@ -13,6 +13,7 @@ export const RunToolNode: FlowNodeTemplateType = {
name: '', name: '',
showStatus: false, showStatus: false,
isTool: true, isTool: true,
version: '4.9.6',
inputs: [], inputs: [],
outputs: [] outputs: []
}; };

View File

@ -13,6 +13,7 @@ export const RunToolSetNode: FlowNodeTemplateType = {
name: '', name: '',
showStatus: false, showStatus: false,
isTool: true, isTool: true,
version: '4.9.6',
inputs: [], inputs: [],
outputs: [] outputs: []
}; };

View File

@ -26,7 +26,8 @@ export const CodeNode: FlowNodeTemplateType = {
name: i18nT('workflow:code_execution'), name: i18nT('workflow:code_execution'),
intro: i18nT('workflow:execute_a_simple_script_code_usually_for_complex_data_processing'), intro: i18nT('workflow:execute_a_simple_script_code_usually_for_complex_data_processing'),
showStatus: true, showStatus: true,
courseUrl: '/docs/guide/dashboard/workflow/sandbox/', courseUrl: '/docs/guide/workbench/workflow/sandbox/',
version: '482',
inputs: [ inputs: [
{ {
...Input_Template_DynamicInput, ...Input_Template_DynamicInput,

View File

@ -13,6 +13,7 @@ export const StopToolNode: FlowNodeTemplateType = {
avatar: 'core/workflow/template/stopTool', avatar: 'core/workflow/template/stopTool',
name: i18nT('workflow:tool_call_termination'), name: i18nT('workflow:tool_call_termination'),
intro: i18nT('workflow:intro_tool_call_termination'), intro: i18nT('workflow:intro_tool_call_termination'),
version: '481',
inputs: [], inputs: [],
outputs: [] outputs: []
}; };

View File

@ -15,6 +15,7 @@ export const SystemConfigNode: FlowNodeTemplateType = {
intro: '', intro: '',
unique: true, unique: true,
forbidDelete: true, forbidDelete: true,
version: '481',
inputs: [], inputs: [],
outputs: [] outputs: []
}; };

View File

@ -23,7 +23,8 @@ export const TextEditorNode: FlowNodeTemplateType = {
avatar: 'core/workflow/template/textConcat', avatar: 'core/workflow/template/textConcat',
name: i18nT('workflow:text_concatenation'), name: i18nT('workflow:text_concatenation'),
intro: i18nT('workflow:intro_text_concatenation'), intro: i18nT('workflow:intro_text_concatenation'),
courseUrl: '/docs/guide/dashboard/workflow/text_editor/', courseUrl: '/docs/guide/workbench/workflow/text_editor/',
version: '4813',
inputs: [ inputs: [
{ {
key: NodeInputKeyEnum.textareaInput, key: NodeInputKeyEnum.textareaInput,

View File

@ -13,6 +13,7 @@ export const ToolParamsNode: FlowNodeTemplateType = {
avatar: 'core/workflow/template/toolParams', avatar: 'core/workflow/template/toolParams',
name: i18nT('workflow:tool_custom_field'), name: i18nT('workflow:tool_custom_field'),
intro: i18nT('workflow:intro_tool_params_config'), intro: i18nT('workflow:intro_tool_params_config'),
version: '4811',
isTool: true, isTool: true,
inputs: [], inputs: [],
outputs: [] outputs: []

View File

@ -32,7 +32,7 @@ export const ToolModule: FlowNodeTemplateType = {
name: i18nT('workflow:template.tool_call'), name: i18nT('workflow:template.tool_call'),
intro: i18nT('workflow:template.tool_call_intro'), intro: i18nT('workflow:template.tool_call_intro'),
showStatus: true, showStatus: true,
courseUrl: '/docs/guide/dashboard/workflow/tool/', courseUrl: '/docs/guide/workbench/workflow/tool/',
version: '4.9.2', version: '4.9.2',
inputs: [ inputs: [
{ {

View File

@ -19,7 +19,8 @@ export const VariableUpdateNode: FlowNodeTemplateType = {
intro: i18nT('workflow:update_specified_node_output_or_global_variable'), intro: i18nT('workflow:update_specified_node_output_or_global_variable'),
showStatus: false, showStatus: false,
isTool: true, isTool: true,
courseUrl: '/docs/guide/dashboard/workflow/variable_update/', version: '481',
courseUrl: '/docs/guide/workbench/workflow/variable_update/',
inputs: [ inputs: [
{ {
key: NodeInputKeyEnum.updateList, key: NodeInputKeyEnum.updateList,

View File

@ -30,6 +30,7 @@ export const WorkflowStart: FlowNodeTemplateType = {
intro: '', intro: '',
forbidDelete: true, forbidDelete: true,
unique: true, unique: true,
version: '481',
inputs: [{ ...Input_Template_UserChatInput, toolDescription: i18nT('workflow:user_question') }], inputs: [{ ...Input_Template_UserChatInput, toolDescription: i18nT('workflow:user_question') }],
outputs: [ outputs: [
{ {

View File

@ -37,10 +37,7 @@ export type WorkflowTemplateType = {
intro?: string; intro?: string;
author?: string; author?: string;
courseUrl?: string; courseUrl?: string;
version: string;
version?: string;
versionLabel?: string;
isLatestVersion?: boolean;
showStatus?: boolean; showStatus?: boolean;
weight?: number; weight?: number;

View File

@ -63,8 +63,6 @@ export type FlowNodeInputItemType = InputComponentPropsType & {
canSelectFile?: boolean; canSelectFile?: boolean;
canSelectImg?: boolean; canSelectImg?: boolean;
maxFiles?: number; maxFiles?: number;
deprecated?: boolean;
}; };
export type FlowNodeOutputItemType = { export type FlowNodeOutputItemType = {
@ -88,8 +86,6 @@ export type FlowNodeOutputItemType = {
// component params // component params
customFieldConfig?: CustomFieldConfigType; customFieldConfig?: CustomFieldConfigType;
deprecated?: boolean;
}; };
export type ReferenceItemValueType = [string, string | undefined]; export type ReferenceItemValueType = [string, string | undefined];

View File

@ -20,17 +20,11 @@ import { RuntimeNodeItemType } from '../runtime/type';
import { PluginTypeEnum } from '../../plugin/constants'; import { PluginTypeEnum } from '../../plugin/constants';
import { RuntimeEdgeItemType, StoreEdgeItemType } from './edge'; import { RuntimeEdgeItemType, StoreEdgeItemType } from './edge';
import { NextApiResponse } from 'next'; import { NextApiResponse } from 'next';
import type { AppDetailType, AppSchema, McpToolConfigType } from '../../app/type'; import { AppDetailType, AppSchema } from '../../app/type';
import type { ParentIdType } from 'common/parentFolder/type'; import type { ParentIdType } from 'common/parentFolder/type';
import { AppTypeEnum } from '../../app/constants'; import { AppTypeEnum } from 'core/app/constants';
import type { WorkflowInteractiveResponseType } from '../template/system/interactive/type'; import type { WorkflowInteractiveResponseType } from '../template/system/interactive/type';
export type NodeToolConfigType = {
mcpTool?: McpToolConfigType & {
url: string;
};
};
export type FlowNodeCommonType = { export type FlowNodeCommonType = {
parentNodeId?: string; parentNodeId?: string;
flowNodeType: FlowNodeTypeEnum; // render node card flowNodeType: FlowNodeTypeEnum; // render node card
@ -40,10 +34,7 @@ export type FlowNodeCommonType = {
name: string; name: string;
intro?: string; // template list intro intro?: string; // template list intro
showStatus?: boolean; // chatting response step status showStatus?: boolean; // chatting response step status
version: string;
version?: string;
versionLabel?: string; // Just ui show
isLatestVersion?: boolean; // Just ui show
// data // data
inputs: FlowNodeInputItemType[]; inputs: FlowNodeInputItemType[];
@ -52,13 +43,12 @@ export type FlowNodeCommonType = {
// plugin data // plugin data
pluginId?: string; pluginId?: string;
isFolder?: boolean; isFolder?: boolean;
// pluginType?: AppTypeEnum;
pluginData?: PluginDataType; pluginData?: PluginDataType;
// tool data
toolData?: NodeToolConfigType;
}; };
export type PluginDataType = { export type PluginDataType = {
version: string;
diagram?: string; diagram?: string;
userGuide?: string; userGuide?: string;
courseUrl?: string; courseUrl?: string;
@ -125,7 +115,6 @@ export type FlowNodeItemType = FlowNodeTemplateType & {
nodeId: string; nodeId: string;
parentNodeId?: string; parentNodeId?: string;
isError?: boolean; isError?: boolean;
searchedText?: string;
debugResult?: { debugResult?: {
status: 'running' | 'success' | 'skipped' | 'failed'; status: 'running' | 'success' | 'skipped' | 'failed';
message?: string; message?: string;

View File

@ -1,5 +1,4 @@
export enum OperationLogEventEnum { export enum OperationLogEventEnum {
//Team
LOGIN = 'LOGIN', LOGIN = 'LOGIN',
CREATE_INVITATION_LINK = 'CREATE_INVITATION_LINK', CREATE_INVITATION_LINK = 'CREATE_INVITATION_LINK',
JOIN_TEAM = 'JOIN_TEAM', JOIN_TEAM = 'JOIN_TEAM',
@ -12,52 +11,5 @@ export enum OperationLogEventEnum {
RELOCATE_DEPARTMENT = 'RELOCATE_DEPARTMENT', RELOCATE_DEPARTMENT = 'RELOCATE_DEPARTMENT',
CREATE_GROUP = 'CREATE_GROUP', CREATE_GROUP = 'CREATE_GROUP',
DELETE_GROUP = 'DELETE_GROUP', DELETE_GROUP = 'DELETE_GROUP',
ASSIGN_PERMISSION = 'ASSIGN_PERMISSION', ASSIGN_PERMISSION = 'ASSIGN_PERMISSION'
//APP
CREATE_APP = 'CREATE_APP',
UPDATE_APP_INFO = 'UPDATE_APP_INFO',
MOVE_APP = 'MOVE_APP',
DELETE_APP = 'DELETE_APP',
UPDATE_APP_COLLABORATOR = 'UPDATE_APP_COLLABORATOR',
DELETE_APP_COLLABORATOR = 'DELETE_APP_COLLABORATOR',
TRANSFER_APP_OWNERSHIP = 'TRANSFER_APP_OWNERSHIP',
CREATE_APP_COPY = 'CREATE_APP_COPY',
CREATE_APP_FOLDER = 'CREATE_APP_FOLDER',
UPDATE_PUBLISH_APP = 'UPDATE_PUBLISH_APP',
CREATE_APP_PUBLISH_CHANNEL = 'CREATE_APP_PUBLISH_CHANNEL',
UPDATE_APP_PUBLISH_CHANNEL = 'UPDATE_APP_PUBLISH_CHANNEL',
DELETE_APP_PUBLISH_CHANNEL = 'DELETE_APP_PUBLISH_CHANNEL',
EXPORT_APP_CHAT_LOG = 'EXPORT_APP_CHAT_LOG',
//Dataset
CREATE_DATASET = 'CREATE_DATASET',
UPDATE_DATASET = 'UPDATE_DATASET',
DELETE_DATASET = 'DELETE_DATASET',
MOVE_DATASET = 'MOVE_DATASET',
UPDATE_DATASET_COLLABORATOR = 'UPDATE_DATASET_COLLABORATOR',
DELETE_DATASET_COLLABORATOR = 'DELETE_DATASET_COLLABORATOR',
TRANSFER_DATASET_OWNERSHIP = 'TRANSFER_DATASET_OWNERSHIP',
EXPORT_DATASET = 'EXPORT_DATASET',
CREATE_DATASET_FOLDER = 'CREATE_DATASET_FOLDER',
//Collection
CREATE_COLLECTION = 'CREATE_COLLECTION',
UPDATE_COLLECTION = 'UPDATE_COLLECTION',
DELETE_COLLECTION = 'DELETE_COLLECTION',
RETRAIN_COLLECTION = 'RETRAIN_COLLECTION',
//Data
CREATE_DATA = 'CREATE_DATA',
UPDATE_DATA = 'UPDATE_DATA',
DELETE_DATA = 'DELETE_DATA',
//SearchTest
SEARCH_TEST = 'SEARCH_TEST',
//Account
CHANGE_PASSWORD = 'CHANGE_PASSWORD',
CHANGE_NOTIFICATION_SETTINGS = 'CHANGE_NOTIFICATION_SETTINGS',
CHANGE_MEMBER_NAME_ACCOUNT = 'CHANGE_MEMBER_NAME_ACCOUNT',
PURCHASE_PLAN = 'PURCHASE_PLAN',
EXPORT_BILL_RECORDS = 'EXPORT_BILL_RECORDS',
CREATE_INVOICE = 'CREATE_INVOICE',
SET_INVOICE_HEADER = 'SET_INVOICE_HEADER',
CREATE_API_KEY = 'CREATE_API_KEY',
UPDATE_API_KEY = 'UPDATE_API_KEY',
DELETE_API_KEY = 'DELETE_API_KEY'
} }

View File

@ -9,7 +9,6 @@ import type { TeamMemberItemType } from './team/type';
export type PostLoginProps = { export type PostLoginProps = {
username: string; username: string;
password: string; password: string;
code: string;
}; };
export type OauthLoginProps = { export type OauthLoginProps = {

View File

@ -3,8 +3,7 @@ export enum UserAuthTypeEnum {
findPassword = 'findPassword', findPassword = 'findPassword',
wxLogin = 'wxLogin', wxLogin = 'wxLogin',
bindNotification = 'bindNotification', bindNotification = 'bindNotification',
captcha = 'captcha', captcha = 'captcha'
login = 'login'
} }
export const userAuthTypeMap = { export const userAuthTypeMap = {
@ -12,6 +11,5 @@ export const userAuthTypeMap = {
[UserAuthTypeEnum.findPassword]: 'findPassword', [UserAuthTypeEnum.findPassword]: 'findPassword',
[UserAuthTypeEnum.wxLogin]: 'wxLogin', [UserAuthTypeEnum.wxLogin]: 'wxLogin',
[UserAuthTypeEnum.bindNotification]: 'bindNotification', [UserAuthTypeEnum.bindNotification]: 'bindNotification',
[UserAuthTypeEnum.captcha]: 'captcha', [UserAuthTypeEnum.captcha]: 'captcha'
[UserAuthTypeEnum.login]: 'login'
}; };

View File

@ -1,10 +0,0 @@
import type { UserAuthTypeEnum } from '@fastgpt/global/support/user/auth/constants';
export type UserAuthSchemaType = {
key: string;
type: `${UserAuthTypeEnum}`;
code?: string;
openid?: string;
createTime: Date;
expiredTime: Date;
};

View File

@ -14,7 +14,6 @@ export type UserModelSchema = {
timezone: string; timezone: string;
status: `${UserStatusEnum}`; status: `${UserStatusEnum}`;
lastLoginTmbId?: string; lastLoginTmbId?: string;
passwordUpdateTime?: Date;
fastgpt_sem?: { fastgpt_sem?: {
keyword: string; keyword: string;
}; };

View File

@ -13,7 +13,6 @@ const staticPluginList = [
'WeWorkWebhook', 'WeWorkWebhook',
'google', 'google',
'bing', 'bing',
'bocha',
'delay' 'delay'
]; ];
// Run in worker thread (Have npm packages) // Run in worker thread (Have npm packages)

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "4816",
"name": "钉钉 webhook", "name": "钉钉 webhook",
"avatar": "plugins/dingding", "avatar": "plugins/dingding",
"intro": "向钉钉机器人发起 webhook 请求。", "intro": "向钉钉机器人发起 webhook 请求。",

View File

@ -1,5 +1,6 @@
{ {
"author": "Menghuan1918", "author": "Menghuan1918",
"version": "488",
"name": "PDF识别", "name": "PDF识别",
"avatar": "plugins/doc2x", "avatar": "plugins/doc2x",
"intro": "将PDF文件发送至Doc2X进行解析返回结构化的LaTeX公式的文本(markdown)支持传入String类型的URL或者流程输出中的文件链接变量", "intro": "将PDF文件发送至Doc2X进行解析返回结构化的LaTeX公式的文本(markdown)支持传入String类型的URL或者流程输出中的文件链接变量",

View File

@ -1,5 +1,6 @@
{ {
"author": "Menghuan1918", "author": "Menghuan1918",
"version": "488",
"name": "Doc2X服务", "name": "Doc2X服务",
"avatar": "plugins/doc2x", "avatar": "plugins/doc2x",
"intro": "将传入的图片或PDF文件发送至Doc2X进行解析返回带LaTeX公式的markdown格式的文本。", "intro": "将传入的图片或PDF文件发送至Doc2X进行解析返回带LaTeX公式的markdown格式的文本。",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "4816",
"name": "企业微信 webhook", "name": "企业微信 webhook",
"avatar": "plugins/qiwei", "avatar": "plugins/qiwei",
"intro": "向企业微信机器人发起 webhook 请求。只能内部群使用。", "intro": "向企业微信机器人发起 webhook 请求。只能内部群使用。",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "4811",
"name": "Bing搜索", "name": "Bing搜索",
"avatar": "core/workflow/template/bing", "avatar": "core/workflow/template/bing",
"intro": "在Bing中搜索。", "intro": "在Bing中搜索。",

View File

@ -1,677 +0,0 @@
{
"author": "",
"name": "博查搜索",
"avatar": "core/workflow/template/bocha",
"intro": "使用博查AI搜索引擎进行网络搜索。",
"showStatus": true,
"weight": 10,
"courseUrl": "",
"isTool": true,
"templateType": "search",
"workflow": {
"nodes": [
{
"nodeId": "pluginInput",
"name": "workflow:template.plugin_start",
"intro": "workflow:intro_plugin_input",
"avatar": "core/workflow/template/workflowStart",
"flowNodeType": "pluginInput",
"showStatus": false,
"position": {
"x": 636.3048409085379,
"y": -238.61714728578016
},
"version": "481",
"inputs": [
{
"renderTypeList": [
"input"
],
"selectedTypeIndex": 0,
"valueType": "string",
"canEdit": true,
"key": "apiKey",
"label": "apiKey",
"description": "博查API密钥",
"defaultValue": "",
"required": true
},
{
"renderTypeList": [
"input",
"reference"
],
"selectedTypeIndex": 0,
"valueType": "string",
"canEdit": true,
"key": "query",
"label": "query",
"description": "搜索查询词",
"defaultValue": "",
"required": true,
"toolDescription": "搜索查询词"
},
{
"renderTypeList": [
"input",
"reference"
],
"selectedTypeIndex": 0,
"valueType": "string",
"canEdit": true,
"key": "freshness",
"label": "freshness",
"description": "搜索指定时间范围内的网页。可填值oneDay(一天内)、oneWeek(一周内)、oneMonth(一个月内)、oneYear(一年内)、noLimit(不限,默认)、YYYY-MM-DD..YYYY-MM-DD(日期范围)、YYYY-MM-DD(指定日期)",
"defaultValue": "noLimit",
"required": false,
"toolDescription": "搜索时间范围"
},
{
"renderTypeList": [
"input",
"reference"
],
"selectedTypeIndex": 0,
"valueType": "boolean",
"canEdit": true,
"key": "summary",
"label": "summary",
"description": "是否显示文本摘要。true显示false不显示(默认)",
"defaultValue": false,
"required": false,
"toolDescription": "是否显示文本摘要"
},
{
"renderTypeList": [
"input",
"reference"
],
"selectedTypeIndex": 0,
"valueType": "string",
"canEdit": true,
"key": "include",
"label": "include",
"description": "指定搜索的site范围。多个域名使用|或,分隔最多20个。例如qq.com|m.163.com",
"defaultValue": "",
"required": false,
"toolDescription": "指定搜索的site范围"
},
{
"renderTypeList": [
"input",
"reference"
],
"selectedTypeIndex": 0,
"valueType": "string",
"canEdit": true,
"key": "exclude",
"label": "exclude",
"description": "排除搜索的网站范围。多个域名使用|或,分隔最多20个。例如qq.com|m.163.com",
"defaultValue": "",
"required": false,
"toolDescription": "排除搜索的网站范围"
},
{
"renderTypeList": [
"input",
"reference"
],
"selectedTypeIndex": 0,
"valueType": "number",
"canEdit": true,
"key": "count",
"label": "count",
"description": "返回结果的条数。可填范围1-50默认为10",
"defaultValue": 10,
"required": false,
"min": 1,
"max": 50,
"toolDescription": "返回结果条数"
}
],
"outputs": [
{
"id": "apiKey",
"valueType": "string",
"key": "apiKey",
"label": "apiKey",
"type": "hidden"
},
{
"id": "query",
"valueType": "string",
"key": "query",
"label": "query",
"type": "hidden"
},
{
"id": "freshness",
"valueType": "string",
"key": "freshness",
"label": "freshness",
"type": "hidden"
},
{
"id": "summary",
"valueType": "boolean",
"key": "summary",
"label": "summary",
"type": "hidden"
},
{
"id": "include",
"valueType": "string",
"key": "include",
"label": "include",
"type": "hidden"
},
{
"id": "exclude",
"valueType": "string",
"key": "exclude",
"label": "exclude",
"type": "hidden"
},
{
"id": "count",
"valueType": "number",
"key": "count",
"label": "count",
"type": "hidden"
}
]
},
{
"nodeId": "pluginOutput",
"name": "common:core.module.template.self_output",
"intro": "workflow:intro_custom_plugin_output",
"avatar": "core/workflow/template/pluginOutput",
"flowNodeType": "pluginOutput",
"showStatus": false,
"position": {
"x": 2764.1105686698083,
"y": -30.617147285780163
},
"version": "481",
"inputs": [
{
"renderTypeList": [
"reference"
],
"valueType": "object",
"canEdit": true,
"key": "result",
"label": "result",
"isToolOutput": true,
"description": "",
"value": [
"nyA6oA8mF1iW",
"httpRawResponse"
]
}
],
"outputs": []
},
{
"nodeId": "pluginConfig",
"name": "common:core.module.template.system_config",
"intro": "",
"avatar": "core/workflow/template/systemConfig",
"flowNodeType": "pluginConfig",
"position": {
"x": 184.66337662472682,
"y": -216.05298493910115
},
"version": "4811",
"inputs": [],
"outputs": []
},
{
"nodeId": "nyA6oA8mF1iW",
"name": "HTTP 请求",
"intro": "调用博查搜索API",
"avatar": "core/workflow/template/httpRequest",
"flowNodeType": "httpRequest468",
"showStatus": true,
"position": {
"x": 1335.0647252518884,
"y": -455.9043948565971
},
"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",
"selectDataset",
"selectApp"
],
"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": "https://api.bochaai.com/v1/web-search",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "system_httpHeader",
"renderTypeList": [
"custom"
],
"valueType": "any",
"value": [
{
"key": "Authorization",
"type": "string",
"value": "Bearer {{$pluginInput.apiKey$}}"
},
{
"key": "Content-Type",
"type": "string",
"value": "application/json"
}
],
"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": "{\n \"query\": \"{{query}}\",\n \"freshness\": \"{{freshness}}\",\n \"summary\": {{summary}},\n \"include\": \"{{include}}\",\n \"exclude\": \"{{exclude}}\",\n \"count\": {{count}}\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": ""
},
{
"valueType": "string",
"renderTypeList": [
"reference"
],
"key": "query",
"label": "query",
"toolDescription": "博查搜索检索词",
"required": true,
"canEdit": true,
"editField": {
"key": true,
"description": true
},
"customInputConfig": {
"selectValueTypeList": [
"string",
"number",
"boolean",
"object",
"arrayString",
"arrayNumber",
"arrayBoolean",
"arrayObject",
"arrayAny",
"any",
"chatHistory",
"datasetQuote",
"dynamic",
"selectApp",
"selectDataset"
],
"showDescription": false,
"showDefaultValue": true
},
"value": [
"pluginInput",
"query"
]
},
{
"valueType": "string",
"renderTypeList": [
"reference"
],
"key": "freshness",
"label": "freshness",
"toolDescription": "搜索时间范围",
"required": false,
"canEdit": true,
"editField": {
"key": true,
"description": true
},
"customInputConfig": {
"selectValueTypeList": [
"string",
"number",
"boolean",
"object",
"arrayString",
"arrayNumber",
"arrayBoolean",
"arrayObject",
"arrayAny",
"any",
"chatHistory",
"datasetQuote",
"dynamic",
"selectApp",
"selectDataset"
],
"showDescription": false,
"showDefaultValue": true
},
"value": [
"pluginInput",
"freshness"
]
},
{
"valueType": "boolean",
"renderTypeList": [
"reference"
],
"key": "summary",
"label": "summary",
"toolDescription": "是否显示文本摘要",
"required": false,
"canEdit": true,
"editField": {
"key": true,
"description": true
},
"customInputConfig": {
"selectValueTypeList": [
"string",
"number",
"boolean",
"object",
"arrayString",
"arrayNumber",
"arrayBoolean",
"arrayObject",
"arrayAny",
"any",
"chatHistory",
"datasetQuote",
"dynamic",
"selectApp",
"selectDataset"
],
"showDescription": false,
"showDefaultValue": true
},
"value": [
"pluginInput",
"summary"
]
},
{
"valueType": "string",
"renderTypeList": [
"reference"
],
"key": "include",
"label": "include",
"toolDescription": "指定搜索的site范围",
"required": false,
"canEdit": true,
"editField": {
"key": true,
"description": true
},
"customInputConfig": {
"selectValueTypeList": [
"string",
"number",
"boolean",
"object",
"arrayString",
"arrayNumber",
"arrayBoolean",
"arrayObject",
"arrayAny",
"any",
"chatHistory",
"datasetQuote",
"dynamic",
"selectApp",
"selectDataset"
],
"showDescription": false,
"showDefaultValue": true
},
"value": [
"pluginInput",
"include"
]
},
{
"valueType": "string",
"renderTypeList": [
"reference"
],
"key": "exclude",
"label": "exclude",
"toolDescription": "排除搜索的网站范围",
"required": false,
"canEdit": true,
"editField": {
"key": true,
"description": true
},
"customInputConfig": {
"selectValueTypeList": [
"string",
"number",
"boolean",
"object",
"arrayString",
"arrayNumber",
"arrayBoolean",
"arrayObject",
"arrayAny",
"any",
"chatHistory",
"datasetQuote",
"dynamic",
"selectApp",
"selectDataset"
],
"showDescription": false,
"showDefaultValue": true
},
"value": [
"pluginInput",
"exclude"
]
},
{
"valueType": "number",
"renderTypeList": [
"reference"
],
"key": "count",
"label": "count",
"toolDescription": "返回结果条数",
"required": false,
"canEdit": true,
"editField": {
"key": true,
"description": true
},
"customInputConfig": {
"selectValueTypeList": [
"string",
"number",
"boolean",
"object",
"arrayString",
"arrayNumber",
"arrayBoolean",
"arrayObject",
"arrayAny",
"any",
"chatHistory",
"datasetQuote",
"dynamic",
"selectApp",
"selectDataset"
],
"showDescription": false,
"showDefaultValue": true
},
"value": [
"pluginInput",
"count"
]
}
],
"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
}
}
]
}
],
"edges": [
{
"source": "pluginInput",
"target": "nyA6oA8mF1iW",
"sourceHandle": "pluginInput-source-right",
"targetHandle": "nyA6oA8mF1iW-target-left"
},
{
"source": "nyA6oA8mF1iW",
"target": "pluginOutput",
"sourceHandle": "nyA6oA8mF1iW-source-right",
"targetHandle": "pluginOutput-target-left"
}
]
},
"chatConfig": {}
}

View File

@ -1,5 +1,6 @@
{ {
"author": "silencezhang", "author": "silencezhang",
"version": "4811",
"name": "数据库连接", "name": "数据库连接",
"avatar": "core/workflow/template/datasource", "avatar": "core/workflow/template/datasource",
"intro": "可连接常用数据库并执行sql", "intro": "可连接常用数据库并执行sql",

View File

@ -1,5 +1,6 @@
{ {
"author": "collin", "author": "collin",
"version": "4817",
"name": "流程等待", "name": "流程等待",
"avatar": "core/workflow/template/sleep", "avatar": "core/workflow/template/sleep",
"intro": "让工作流等待指定时间后运行", "intro": "让工作流等待指定时间后运行",

View File

@ -1,5 +1,6 @@
{ {
"author": "silencezhang", "author": "silencezhang",
"version": "4817",
"name": "基础图表", "name": "基础图表",
"avatar": "core/workflow/template/baseChart", "avatar": "core/workflow/template/baseChart",
"intro": "根据数据生成图表可根据chartType生成柱状图折线图饼图", "intro": "根据数据生成图表可根据chartType生成柱状图折线图饼图",

View File

@ -1,5 +1,6 @@
{ {
"author": "silencezhang", "author": "silencezhang",
"version": "486",
"name": "BI图表功能", "name": "BI图表功能",
"avatar": "core/workflow/template/BI", "avatar": "core/workflow/template/BI",
"intro": "BI图表功能可以生成一些常用的图表如饼图柱状图折线图等", "intro": "BI图表功能可以生成一些常用的图表如饼图柱状图折线图等",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "486",
"name": "DuckDuckGo 网络搜索", "name": "DuckDuckGo 网络搜索",
"avatar": "core/workflow/template/duckduckgo", "avatar": "core/workflow/template/duckduckgo",
"intro": "使用 DuckDuckGo 进行网络搜索", "intro": "使用 DuckDuckGo 进行网络搜索",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "486",
"name": "DuckDuckGo 图片搜索", "name": "DuckDuckGo 图片搜索",
"avatar": "core/workflow/template/duckduckgo", "avatar": "core/workflow/template/duckduckgo",
"intro": "使用 DuckDuckGo 进行图片搜索", "intro": "使用 DuckDuckGo 进行图片搜索",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "486",
"name": "DuckDuckGo 新闻检索", "name": "DuckDuckGo 新闻检索",
"avatar": "core/workflow/template/duckduckgo", "avatar": "core/workflow/template/duckduckgo",
"intro": "使用 DuckDuckGo 进行新闻检索", "intro": "使用 DuckDuckGo 进行新闻检索",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "486",
"name": "DuckDuckGo 视频搜索", "name": "DuckDuckGo 视频搜索",
"avatar": "core/workflow/template/duckduckgo", "avatar": "core/workflow/template/duckduckgo",
"intro": "使用 DuckDuckGo 进行视频搜索", "intro": "使用 DuckDuckGo 进行视频搜索",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "486",
"name": "DuckDuckGo服务", "name": "DuckDuckGo服务",
"avatar": "core/workflow/template/duckduckgo", "avatar": "core/workflow/template/duckduckgo",
"intro": "DuckDuckGo 服务,包含网络搜索、图片搜索、新闻搜索等。", "intro": "DuckDuckGo 服务,包含网络搜索、图片搜索、新闻搜索等。",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "488",
"name": "飞书 webhook", "name": "飞书 webhook",
"avatar": "core/app/templates/plugin-feishu", "avatar": "core/app/templates/plugin-feishu",
"intro": "向飞书机器人发起 webhook 请求。", "intro": "向飞书机器人发起 webhook 请求。",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "486",
"name": "网页内容抓取", "name": "网页内容抓取",
"avatar": "core/workflow/template/fetchUrl", "avatar": "core/workflow/template/fetchUrl",
"intro": "可获取一个网页链接内容,并以 Markdown 格式输出,仅支持获取静态网站。", "intro": "可获取一个网页链接内容,并以 Markdown 格式输出,仅支持获取静态网站。",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "481",
"templateType": "tools", "templateType": "tools",
"name": "获取当前时间", "name": "获取当前时间",
"avatar": "core/workflow/template/getTime", "avatar": "core/workflow/template/getTime",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "4811",
"name": "Google搜索", "name": "Google搜索",
"avatar": "core/workflow/template/google", "avatar": "core/workflow/template/google",
"intro": "在google中搜索。", "intro": "在google中搜索。",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "486",
"name": "数学公式执行", "name": "数学公式执行",
"avatar": "core/workflow/template/mathCall", "avatar": "core/workflow/template/mathCall",
"intro": "用于执行数学表达式的工具,通过 js 的 expr-eval 库运行表达式并返回结果。", "intro": "用于执行数学表达式的工具,通过 js 的 expr-eval 库运行表达式并返回结果。",

View File

@ -1,5 +1,6 @@
{ {
"author": "", "author": "",
"version": "4816",
"name": "Search XNG 搜索", "name": "Search XNG 搜索",
"avatar": "core/workflow/template/searxng", "avatar": "core/workflow/template/searxng",
"intro": "使用 Search XNG 服务进行搜索。", "intro": "使用 Search XNG 服务进行搜索。",

Some files were not shown because too many files have changed in this diff Show More