Skip to content

Commit 13b7e0a

Browse files
c121914yucolniinewfish-cmykxqvvu
authored
V4.11.0 features (#5270)
* feat: workflow catch error (#5220) * feat: error catch * feat: workflow catch error * perf: add catch error to node * feat: system tool error catch * catch error * fix: ts * update doc * perf: training queue code (#5232) * doc * perf: training queue code * Feat: 优化错误提示与重试逻辑 (#5192) * feat: 批量重试异常数据 & 报错信息国际化 - 新增“全部重试”按钮,支持批量重试所有训练异常数据 - 报错信息支持国际化,常见错误自动映射为 i18n key - 相关文档和 i18n 资源已同步更新 * feat: enhance error message and retry mechanism * feat: enhance error message and retry mechanism * feat: add retry_failed i18n key * feat: enhance error message and retry mechanism * feat: enhance error message and retry mechanism * feat: enhance error message and retry mechanism : 5 * feat: enhance error message and retry mechanism : 6 * feat: enhance error message and retry mechanism : 7 * feat: enhance error message and retry mechanism : 8 * perf: catch chat error * perf: copy hook (#5246) * perf: copy hook * doc * doc * add app evaluation (#5083) * add app evaluation * fix * usage * variables * editing condition * var ui * isplus filter * migrate code * remove utils * name * update type * build * fix * fix * fix * delete comment * fix * perf: eval code * eval code * eval code * feat: ttfb time in model log * Refactor chat page (#5253) * feat: update side bar layout; add login and logout logic at chat page * refactor: encapsulate login logic and reuse it in `LoginModal` and `Login` page * chore: improve some logics and comments * chore: improve some logics * chore: remove redundant side effect; add translations --------- Co-authored-by: Archer <[email protected]> * perf: chat page code * doc * perf: provider redirect * chore: ui improvement (#5266) * Fix: SSE * Fix: SSE * eval pagination (#5264) * eval scroll pagination * change eval list to manual pagination * number * fix build * fix * version doc (#5267) * version doc * version doc * doc * feat: eval model select * config eval model * perf: eval detail modal ui * doc * doc * fix: chat store reload * doc --------- Co-authored-by: colnii <[email protected]> Co-authored-by: heheer <[email protected]> Co-authored-by: 酒川户 <[email protected]>
1 parent de208d6 commit 13b7e0a

File tree

212 files changed

+5820
-3380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+5820
-3380
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: false
5+
---
6+
这是一个工作流节点报错捕获的设计文档。
7+
8+
# 背景
9+
10+
现在工作流运行节点若其中有一个报错,则整个工作流中断,无法继续运行,只有红色英文toast,不太友好。对于对工作流可控性要求高的用户,愿意通过编排为报错兜底。现有编排较麻烦。
11+
12+
这类似于代码里的 try catch 机制,用户可以获得 catch 的错误,而不是直接抛错并结束工作流。
13+
14+
# 实现效果
15+
16+
1. 部分节点可以拥有报错捕获选项,也就是 node 里 catchError 不为 undefined 的节点,catchError=true 代表启用报错捕获,catchError=false 代表不启用报错捕获。
17+
2. 支持报错捕获节点,在输出栏右侧会有一个“错误捕获”的开关。
18+
3. node 的 output 属性种,有一个`errorField`的字段,标识该输出是开启报错捕获时候,才会拥有的输出。
19+
4. 开启报错捕获的节点,在运行错误时,不会阻塞后续节点运行,而是输出报错信息,并继续向下执行。
20+
5. 开启报错捕获的节点,会多出一个“错误输出”的分支连线,错误时候会走错误的分支提示。
21+
22+
# 实现方案
23+
24+
1. FlowNodeCommonType 属性上增加一个`catchError`的可选 boolean 值。如果需要报错捕获的节点,则设置 true/false,标识启用报错捕获,并且设置默认是否启用报错捕获。
25+
2. FlowNodeOutputTypeEnume增加一个 error 枚举值,表示该字段是错误时候才展示的输出。
26+
3. IOTitle 组件里接收 catchError 字段,如果为 true,则在右侧展示“错误捕获”的开关。
27+
4. 所有现有的 RenderOutput 的组件,都需要改造。传入的 flowOutputList 都不包含 hidden 和 error类型的。
28+
5. 单独在`FastGPT/projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/RenderOutput`下新建一个`CatchError`的组件,用于专门渲染错误类型输出,同时有一个 SourceHandler。

README.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,40 +47,41 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
4747
## 💡 RoadMap
4848

4949
`1` 应用编排能力
50-
- [x] 对话工作流、插件工作流
51-
- [x] 工具调用
52-
- [x] Code sandbox
53-
- [x] 循环调用
54-
- [x] 用户选择
55-
- [x] 表单输入
56-
57-
`2` 知识库能力
50+
- [x] 对话工作流、插件工作流,包含基础的 RPA 节点。
51+
- [x] Agent 调用
52+
- [x] 用户交互节点
53+
- [x] 双向 MCP
54+
- [ ] 上下文管理
55+
- [ ] AI 生成工作流
56+
57+
`2` 应用调试能力
58+
- [x] 知识库单点搜索测试
59+
- [x] 对话时反馈引用并可修改与删除
60+
- [x] 完整调用链路日志
61+
- [ ] 应用评测
62+
- [ ] 高级编排 DeBug 调试模式
63+
- [ ] 应用节点日志
64+
65+
`3` 知识库能力
5866
- [x] 多库复用,混用
5967
- [x] chunk 记录修改和删除
6068
- [x] 支持手动输入,直接分段,QA 拆分导入
6169
- [x] 支持 txt,md,html,pdf,docx,pptx,csv,xlsx (有需要更多可 PR file loader),支持 url 读取、CSV 批量导入
6270
- [x] 混合检索 & 重排
6371
- [x] API 知识库
64-
- [ ] 自定义文件读取服务
65-
- [ ] 自定义分块服务
66-
67-
`3` 应用调试能力
68-
- [x] 知识库单点搜索测试
69-
- [x] 对话时反馈引用并可修改与删除
70-
- [x] 完整上下文呈现
71-
- [x] 完整模块中间值呈现
72-
- [ ] 高级编排 DeBug 模式
72+
- [ ] RAG 模块热插拔
7373

7474
`4` OpenAPI 接口
7575
- [x] completions 接口 (chat 模式对齐 GPT 接口)
7676
- [x] 知识库 CRUD
7777
- [x] 对话 CRUD
78+
- [ ] 完整 API Documents
7879

7980
`5` 运营能力
8081
- [x] 免登录分享窗口
8182
- [x] Iframe 一键嵌入
82-
- [x] 聊天窗口嵌入支持自定义 Icon,默认打开,拖拽等功能
8383
- [x] 统一查阅对话记录,并对数据进行标注
84+
- [ ] 应用运营日志
8485

8586
`6` 其他
8687
- [x] 可视化模型配置。
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: 'V4.11.0(进行中)'
3+
description: 'FastGPT V4.11.0 更新说明'
4+
icon: 'upgrade'
5+
draft: false
6+
toc: true
7+
weight: 783
8+
---
9+
10+
<!-- ## 升级说明
11+
12+
### 1. 修改环境变量
13+
14+
FastGPT 商业版用户,可以增加评估相关环境变量,并在更新后,在管理端点击一次保存。
15+
16+
```
17+
EVAL_CONCURRENCY=3 # 评估单节点并发数
18+
EVAL_LINE_LIMIT=1000 # 评估文件最大行数
19+
```
20+
21+
### 2. 更新镜像:
22+
23+
- 更新 FastGPT 镜像tag: v4.11.0
24+
- 更新 FastGPT 商业版镜像tag: v4.11.0
25+
- 更新 fastgpt-plugin 镜像 tag: v0.1.4
26+
- mcp_server 无需更新
27+
- Sandbox 无需更新
28+
- AIProxy 无需更新 -->
29+
30+
## 项目调整
31+
32+
1. 移除所有**开源功能**的限制,包括:应用数量和知识库数量上限。
33+
2. 调整 RoadMap,增加`上下文管理`,`AI 生成工作流`,`高级编排 DeBug 调试模式`等计划。
34+
35+
## 🚀 新增内容
36+
37+
1. 商业版增加**应用评测(Beta 版)**,可对应用进行有监督评分。
38+
2. 工作流部分节点支持报错捕获分支。
39+
3. 对话页独立 tab 页面UX。
40+
4. 支持 Signoz traces 和 logs 系统追踪。
41+
5. 新增 Gemini2.5, grok4, kimi 模型配置。
42+
6. 模型调用日志增加首字响应时长和请求 IP。
43+
44+
## ⚙️ 优化
45+
46+
1. 优化代码,避免递归造成的内存堆积。
47+
2. 知识库训练:支持全部重试当前集合异常数据。
48+
3. 工作流 valueTypeFormat,避免数据类型不一致。
49+
50+
## 🐛 修复
51+
52+
1. 问题分类和内容提取节点,默认模型无法通过前端校验,导致工作流无法运行和保存发布。
53+
54+
## 🔨 工具更新
55+
56+
1. Markdown 文本转 Docx 和 Xlsx 文件。

docSite/content/zh-cn/docs/shopping_cart/intro.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,18 @@ FastGPT 商业版是基于 FastGPT 开源版的增强版本,增加了一些独
2020
| 文档知识库 ||||
2121
| 外部使用 ||||
2222
| API 知识库 ||||
23-
| 最大应用数量 | 500 | 无限制 | 由付费套餐决定 |
24-
| 最大知识库数量(单个知识库内容无限制) | 30 | 无限制 | 由付费套餐决定 |
2523
| 自定义版权信息 ||| 设计中 |
2624
| 多租户与支付 ||||
2725
| 团队空间 & 权限 ||||
2826
| 应用发布安全配置 ||||
2927
| 内容审核 ||||
28+
| 应用评测 ||||
3029
| web站点同步 ||||
31-
| 增强训练模式 ||||
30+
| 图片知识库 ||||
31+
| 知识库索引增强 ||||
3232
| 第三方应用快速接入(飞书、公众号) ||||
3333
| 管理后台 ||| 不需要 |
3434
| SSO 登录(可自定义,也可使用内置:Github、公众号、钉钉、谷歌等) ||| 不需要 |
35-
| 图片知识库 || 设计中 | 设计中 |
3635
| 对话日志运营分析 || 设计中 | 设计中 |
3736
| 完整商业授权 ||||
3837
{{< /table >}}

env.d.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,8 @@
11
declare global {
22
namespace NodeJS {
33
interface ProcessEnv {
4-
LOG_DEPTH: string;
54
DEFAULT_ROOT_PSW: string;
6-
DB_MAX_LINK: string;
7-
FILE_TOKEN_KEY: string;
8-
AES256_SECRET_KEY: string;
9-
ROOT_KEY: string;
10-
OPENAI_BASE_URL: string;
11-
CHAT_API_KEY: string;
12-
AIPROXY_API_ENDPOINT: string;
13-
AIPROXY_API_TOKEN: string;
14-
MULTIPLE_DATA_TO_BASE64: string;
15-
MONGODB_URI: string;
16-
MONGODB_LOG_URI?: string;
17-
PG_URL: string;
18-
OCEANBASE_URL: string;
19-
MILVUS_ADDRESS: string;
20-
MILVUS_TOKEN: string;
21-
SANDBOX_URL: string;
225
PRO_URL: string;
23-
FE_DOMAIN: string;
24-
FILE_DOMAIN: string;
25-
NEXT_PUBLIC_BASE_URL: string;
26-
LOG_LEVEL?: string;
27-
STORE_LOG_LEVEL?: string;
28-
USE_IP_LIMIT?: string;
29-
WORKFLOW_MAX_RUN_TIMES?: string;
30-
WORKFLOW_MAX_LOOP_TIMES?: string;
31-
CHECK_INTERNAL_IP?: string;
32-
CHAT_LOG_URL?: string;
33-
CHAT_LOG_INTERVAL?: string;
34-
CHAT_LOG_SOURCE_ID_PREFIX?: string;
35-
ALLOWED_ORIGINS?: string;
36-
SHOW_COUPON?: string;
37-
CONFIG_JSON_PATH?: string;
38-
PASSWORD_LOGIN_LOCK_SECONDS?: string;
39-
PASSWORD_EXPIRED_MONTH?: string;
40-
MAX_LOGIN_SESSION?: string;
416
}
427
}
438
}

packages/global/common/error/code/user.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export enum UserErrEnum {
66
userExist = 'userExist',
77
unAuthRole = 'unAuthRole',
88
account_psw_error = 'account_psw_error',
9-
balanceNotEnough = 'balanceNotEnough',
109
unAuthSso = 'unAuthSso'
1110
}
1211
const errList = [
@@ -22,10 +21,6 @@ const errList = [
2221
statusText: UserErrEnum.account_psw_error,
2322
message: i18nT('common:code_error.account_error')
2423
},
25-
{
26-
statusText: UserErrEnum.balanceNotEnough,
27-
message: i18nT('common:code_error.user_error.balance_not_enough')
28-
},
2924
{
3025
statusText: UserErrEnum.unAuthSso,
3126
message: i18nT('user:sso_auth_failed')

packages/global/common/error/utils.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { replaceSensitiveText } from '../string/tools';
2+
import { ERROR_RESPONSE } from './errorCode';
23

34
export const getErrText = (err: any, def = ''): any => {
45
const msg: string =
@@ -12,6 +13,11 @@ export const getErrText = (err: any, def = ''): any => {
1213
err?.msg ||
1314
err?.error ||
1415
def;
16+
17+
if (ERROR_RESPONSE[msg]) {
18+
return ERROR_RESPONSE[msg].message;
19+
}
20+
1521
// msg && console.log('error =>', msg);
1622
return replaceSensitiveText(msg);
1723
};

packages/global/common/system/types/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export type FastGPTFeConfigsType = {
5151
bind_notification_method?: ['email' | 'phone'];
5252
googleClientVerKey?: string;
5353
mcpServerProxyEndpoint?: string;
54+
chineseRedirectUrl?: string;
5455

5556
show_emptyChat?: boolean;
5657
show_appStore?: boolean;
@@ -82,7 +83,6 @@ export type FastGPTFeConfigsType = {
8283
customSharePageDomain?: string;
8384

8485
systemTitle?: string;
85-
systemDescription?: string;
8686
scripts?: { [key: string]: string }[];
8787
favicon?: string;
8888

@@ -109,6 +109,7 @@ export type FastGPTFeConfigsType = {
109109

110110
uploadFileMaxAmount?: number;
111111
uploadFileMaxSize?: number;
112+
evalFileMaxLines?: number;
112113

113114
// Compute by systemEnv.customPdfParse
114115
showCustomPdfParse?: boolean;

packages/global/common/system/utils.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ export const delay = (ms: number) =>
55
}, ms);
66
});
77

8-
export const retryFn = async <T>(fn: () => Promise<T>, retryTimes = 3): Promise<T> => {
9-
try {
10-
return fn();
11-
} catch (error) {
12-
if (retryTimes > 0) {
8+
export const retryFn = async <T>(fn: () => Promise<T>, attempts = 3): Promise<T> => {
9+
while (true) {
10+
try {
11+
return fn();
12+
} catch (error) {
13+
if (attempts <= 0) {
14+
return Promise.reject(error);
15+
}
1316
await delay(500);
14-
return retryFn(fn, retryTimes - 1);
17+
attempts--;
1518
}
16-
return Promise.reject(error);
1719
}
1820
};
1921

packages/global/core/ai/model.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export type LLMModelItemType = PriceType &
4747
usedInClassify?: boolean; // classify
4848
usedInExtractFields?: boolean; // extract fields
4949
usedInToolCall?: boolean; // tool call
50+
useInEvaluation?: boolean; // evaluation
5051

5152
functionCall: boolean;
5253
toolChoice: boolean;

0 commit comments

Comments
 (0)