fix: loop interactive (#5714)

* fix: loop interactive

* add buffer time
This commit is contained in:
Archer
2025-09-26 16:01:20 +08:00
committed by GitHub
parent c66c2ad8f9
commit 53907af9f7
6 changed files with 29 additions and 5 deletions

View File

@@ -108,6 +108,7 @@ description: FastGPT 文档目录
- [/docs/upgrading/4-12/4123](/docs/upgrading/4-12/4123)
- [/docs/upgrading/4-12/4124](/docs/upgrading/4-12/4124)
- [/docs/upgrading/4-13/4130](/docs/upgrading/4-13/4130)
- [/docs/upgrading/4-13/4131](/docs/upgrading/4-13/4131)
- [/docs/upgrading/4-8/40](/docs/upgrading/4-8/40)
- [/docs/upgrading/4-8/41](/docs/upgrading/4-8/41)
- [/docs/upgrading/4-8/42](/docs/upgrading/4-8/42)

View File

@@ -0,0 +1,19 @@
---
title: 'V4.13.1(进行中)'
description: 'FastGPT V4.13.1 更新说明'
---
## 🚀 新增内容
## ⚙️ 优化
## 🐛 修复
1. 循环节点中,每轮结束,未清除上一轮交互响应值。
## 🔨 插件更新

View File

@@ -1,5 +1,5 @@
{
"title": "4.13.x",
"description": "",
"pages": ["4130"]
"pages": ["4131", "4130"]
}

View File

@@ -111,7 +111,7 @@
"document/content/docs/upgrading/4-12/4122.mdx": "2025-09-07T14:41:48+08:00",
"document/content/docs/upgrading/4-12/4123.mdx": "2025-09-07T20:55:14+08:00",
"document/content/docs/upgrading/4-12/4124.mdx": "2025-09-17T22:29:56+08:00",
"document/content/docs/upgrading/4-13/4130.mdx": "2025-09-25T21:02:34+08:00",
"document/content/docs/upgrading/4-13/4130.mdx": "2025-09-26T13:23:01+08:00",
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",

View File

@@ -44,9 +44,9 @@ export const dispatchLoop = async (props: Props): Promise<Response> => {
return Promise.reject(`Input array length cannot be greater than ${maxLength}`);
}
const interactiveData =
let interactiveData =
lastInteractive?.type === 'loopInteractive' ? lastInteractive?.params : undefined;
const lastIndex = interactiveData?.currentIndex;
let lastIndex = interactiveData?.currentIndex;
const outputValueArr = interactiveData ? interactiveData.loopResult : [];
const loopResponseDetail: ChatHistoryItemResType[] = [];
@@ -127,6 +127,10 @@ export const dispatchLoop = async (props: Props): Promise<Response> => {
interactiveResponse = response.workflowInteractiveResponse;
break;
}
// Clear last interactive data, avoid being influenced by the previous round of interaction
interactiveData = undefined;
lastIndex = undefined;
}
return {

View File

@@ -926,7 +926,7 @@ const ChatBox = ({
chatBoxData?.app?.chatConfig?.autoExecute
],
{
wait: 500
wait: 1000
}
);