Skip to content

Commit 48c0c15

Browse files
c121914yunewfish-cmykYYH211xxyyh
authored
V4.14.2 fearured (#5922)
* fix: chat agent template create (#5912) * doc * template market ui (#5917) * Compress tool (#5919) * Compress tool (#5914) * rename file * feat: agent call request * perf: Agent call (#5916) * fix: interactive in tool call * doc * fix: merge node response * fix: test * fix:修改 message 对话中的压缩提示词 (#5918) Co-authored-by: xxyyh <2289112474@qq> * perf: compress code * perf: agent call comment --------- Co-authored-by: YeYuheng <57035043+YYH211@users.noreply.github.com> Co-authored-by: xxyyh <2289112474@qq> * remove pr * feat: auto password * perf: app template cache * fix template market ui (#5921) --------- Co-authored-by: heheer <heheer@sealos.io> Co-authored-by: YeYuheng <57035043+YYH211@users.noreply.github.com> Co-authored-by: xxyyh <2289112474@qq>
1 parent 21de152 commit 48c0c15

File tree

51 files changed

+1822
-667
lines changed

Some content is hidden

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

51 files changed

+1822
-667
lines changed

document/content/docs/introduction/development/openapi/chat.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ description: FastGPT OpenAPI 对话接口
1616

1717
{/* * 对话现在有`v1`和`v2`两个接口,可以按需使用,v2 自 4.9.4 版本新增,v1 接口同时不再维护 */}
1818

19-
## 请求简易应用和工作流
19+
## 请求对话 Agent 和工作流
2020

2121
`v1`对话接口兼容`GPT`的接口!如果你的项目使用的是标准的`GPT`官方接口,可以直接通过修改`BaseUrl``Authorization`来访问 FastGpt 应用,不过需要注意下面几个规则:
2222

document/content/docs/toc.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ description: FastGPT 文档目录
112112
- [/docs/upgrading/4-13/4132](/docs/upgrading/4-13/4132)
113113
- [/docs/upgrading/4-14/4140](/docs/upgrading/4-14/4140)
114114
- [/docs/upgrading/4-14/4141](/docs/upgrading/4-14/4141)
115+
- [/docs/upgrading/4-14/4142](/docs/upgrading/4-14/4142)
115116
- [/docs/upgrading/4-8/40](/docs/upgrading/4-8/40)
116117
- [/docs/upgrading/4-8/41](/docs/upgrading/4-8/41)
117118
- [/docs/upgrading/4-8/42](/docs/upgrading/4-8/42)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: 'V4.14.2(进行中)'
3+
description: 'FastGPT V4.14.2 更新说明'
4+
---
5+
6+
7+
8+
## 🚀 新增内容
9+
10+
1. 封装底层 Agent Call 方式,支持工具连续调用时上下文的压缩,以及单个工具长响应的压缩。
11+
2. 模板市场新 UI。
12+
13+
## ⚙️ 优化
14+
15+
1. 30 分钟模板市场缓存时长。
16+
17+
## 🐛 修复
18+
19+
1. 简易应用模板未正常转化。
20+
2. 工具调用中,包含两个以上连续用户选择时候,第二个用户选择异常。
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"title": "4.14.x",
33
"description": "",
4-
"pages": ["4141", "4140"]
4+
"pages": ["4142", "4141", "4140"]
55
}

document/data/doc-last-modified.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"document/content/docs/protocol/terms.en.mdx": "2025-08-03T22:37:45+08:00",
102102
"document/content/docs/protocol/terms.mdx": "2025-08-03T22:37:45+08:00",
103103
"document/content/docs/toc.en.mdx": "2025-08-04T13:42:36+08:00",
104-
"document/content/docs/toc.mdx": "2025-11-06T14:47:55+08:00",
104+
"document/content/docs/toc.mdx": "2025-11-13T13:36:41+08:00",
105105
"document/content/docs/upgrading/4-10/4100.mdx": "2025-08-02T19:38:37+08:00",
106106
"document/content/docs/upgrading/4-10/4101.mdx": "2025-09-08T20:07:20+08:00",
107107
"document/content/docs/upgrading/4-11/4110.mdx": "2025-08-05T23:20:39+08:00",
@@ -115,7 +115,8 @@
115115
"document/content/docs/upgrading/4-13/4131.mdx": "2025-09-30T15:47:06+08:00",
116116
"document/content/docs/upgrading/4-13/4132.mdx": "2025-10-21T11:46:53+08:00",
117117
"document/content/docs/upgrading/4-14/4140.mdx": "2025-11-06T15:43:00+08:00",
118-
"document/content/docs/upgrading/4-14/4141.mdx": "2025-11-11T14:05:02+08:00",
118+
"document/content/docs/upgrading/4-14/4141.mdx": "2025-11-12T12:19:02+08:00",
119+
"document/content/docs/upgrading/4-14/4142.mdx": "2025-11-13T20:49:04+08:00",
119120
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
120121
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
121122
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",

packages/global/common/string/tools.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,7 @@ export const getRegQueryStr = (text: string, flags = 'i') => {
143143

144144
/* slice json str */
145145
export const sliceJsonStr = (str: string) => {
146-
str = str
147-
.trim()
148-
.replace(/(\\n|\\)/g, '')
149-
.replace(/ /g, '');
146+
str = str.trim();
150147

151148
// Find first opening bracket
152149
let start = -1;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ export type CompletionFinishReason =
8080
| 'tool_calls'
8181
| 'content_filter'
8282
| 'function_call'
83-
| null;
83+
| null
84+
| undefined;
8485

8586
export default openai;
8687
export * from 'openai';

packages/global/core/app/type.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,16 @@ export type AppTemplateSchemaType = {
230230
type: string;
231231
author?: string;
232232
isActive?: boolean;
233+
isPromoted?: boolean;
234+
recommendText?: string;
233235
userGuide?: {
234236
type: 'markdown' | 'link';
235237
content?: string;
236238
link?: string;
237239
};
238240
isQuickTemplate?: boolean;
239241
order?: number;
242+
// TODO: 对于建议应用,是另一个格式
240243
workflow: WorkflowTemplateBasicType;
241244
};
242245

packages/global/core/chat/utils.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -213,21 +213,10 @@ export const getChatSourceByPublishChannel = (publishChannel: PublishChannelEnum
213213
export const mergeChatResponseData = (
214214
responseDataList: ChatHistoryItemResType[]
215215
): ChatHistoryItemResType[] => {
216-
// Merge children reponse data(Children has interactive response)
217-
const responseWithMergedPlugins = responseDataList.map((item) => {
218-
if (item.pluginDetail && item.pluginDetail.length > 1) {
219-
return {
220-
...item,
221-
pluginDetail: mergeChatResponseData(item.pluginDetail)
222-
};
223-
}
224-
return item;
225-
});
226-
227216
const result: ChatHistoryItemResType[] = [];
228217
const mergeMap = new Map<string, number>(); // mergeSignId -> result index
229218

230-
for (const item of responseWithMergedPlugins) {
219+
for (const item of responseDataList) {
231220
if (item.mergeSignId && mergeMap.has(item.mergeSignId)) {
232221
// Merge with existing item
233222
const existingIndex = mergeMap.get(item.mergeSignId)!;
@@ -238,9 +227,18 @@ export const mergeChatResponseData = (
238227
runningTime: +((existing.runningTime || 0) + (item.runningTime || 0)).toFixed(2),
239228
totalPoints: (existing.totalPoints || 0) + (item.totalPoints || 0),
240229
childTotalPoints: (existing.childTotalPoints || 0) + (item.childTotalPoints || 0),
241-
toolDetail: [...(existing.toolDetail || []), ...(item.toolDetail || [])],
242-
loopDetail: [...(existing.loopDetail || []), ...(item.loopDetail || [])],
243-
pluginDetail: [...(existing.pluginDetail || []), ...(item.pluginDetail || [])]
230+
toolDetail: mergeChatResponseData([
231+
...(existing.toolDetail || []),
232+
...(item.toolDetail || [])
233+
]),
234+
loopDetail: mergeChatResponseData([
235+
...(existing.loopDetail || []),
236+
...(item.loopDetail || [])
237+
]),
238+
pluginDetail: mergeChatResponseData([
239+
...(existing.pluginDetail || []),
240+
...(item.pluginDetail || [])
241+
])
244242
};
245243
} else {
246244
// Add new item

packages/global/core/workflow/runtime/type.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type { ChatNodeUsageType } from '../../../support/wallet/bill/type';
22
import type {
33
ChatItemType,
44
ToolRunResponseItemType,
5-
AIChatItemValueItemType
5+
AIChatItemValueItemType,
6+
ChatHistoryItemResType
67
} from '../../chat/type';
7-
import { NodeOutputItemType } from '../../chat/type';
88
import type { FlowNodeInputItemType, FlowNodeOutputItemType } from '../type/io.d';
99
import type { NodeToolConfigType, StoreNodeItemType } from '../type/node';
1010
import type { DispatchNodeResponseKeyEnum } from './constants';
@@ -112,7 +112,6 @@ export type RuntimeNodeItemType = {
112112
flowNodeType: StoreNodeItemType['flowNodeType'];
113113
showStatus?: StoreNodeItemType['showStatus'];
114114
isEntry?: boolean;
115-
isStart?: boolean;
116115
version?: string;
117116

118117
inputs: FlowNodeInputItemType[];

0 commit comments

Comments
 (0)