mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-14 15:11:13 +00:00
fix: loop interactive (#5714)
* fix: loop interactive * add buffer time
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user