diff --git a/packages/global/core/chat/utils.ts b/packages/global/core/chat/utils.ts index 4b7eba63c..f33e00007 100644 --- a/packages/global/core/chat/utils.ts +++ b/packages/global/core/chat/utils.ts @@ -77,6 +77,13 @@ export const getHistoryPreview = ( }); }; +export const filterModuleTypeList: any[] = [ + FlowNodeTypeEnum.pluginModule, + FlowNodeTypeEnum.datasetSearchNode, + FlowNodeTypeEnum.tools, + FlowNodeTypeEnum.pluginOutput +]; + export const filterPublicNodeResponseData = ({ flowResponses = [], responseDetail = false @@ -87,12 +94,6 @@ export const filterPublicNodeResponseData = ({ const filedList = responseDetail ? ['quoteList', 'moduleType', 'pluginOutput', 'runningTime'] : ['moduleType', 'pluginOutput', 'runningTime']; - const filterModuleTypeList: any[] = [ - FlowNodeTypeEnum.pluginModule, - FlowNodeTypeEnum.datasetSearchNode, - FlowNodeTypeEnum.tools, - FlowNodeTypeEnum.pluginOutput - ]; return flowResponses .filter((item) => filterModuleTypeList.includes(item.moduleType)) diff --git a/packages/global/core/workflow/runtime/type.d.ts b/packages/global/core/workflow/runtime/type.d.ts index 80a4c0897..c750ca2cd 100644 --- a/packages/global/core/workflow/runtime/type.d.ts +++ b/packages/global/core/workflow/runtime/type.d.ts @@ -61,6 +61,7 @@ export type ChatDispatchProps = { workflowStreamResponse?: WorkflowResponseType; workflowDispatchDeep?: number; version?: 'v1' | 'v2'; + responseDetail?: boolean; }; export type ModuleDispatchProps = ChatDispatchProps & { diff --git a/packages/service/core/workflow/dispatch/index.ts b/packages/service/core/workflow/dispatch/index.ts index 1d30e8cc9..9a550b036 100644 --- a/packages/service/core/workflow/dispatch/index.ts +++ b/packages/service/core/workflow/dispatch/index.ts @@ -73,6 +73,7 @@ import { dispatchLoopStart } from './loop/runLoopStart'; import { dispatchFormInput } from './interactive/formInput'; import { dispatchToolParams } from './agent/runTool/toolParams'; import { getErrText } from '@fastgpt/global/common/error/utils'; +import { filterModuleTypeList } from '@fastgpt/global/core/chat/utils'; const callbackMap: Record = { [FlowNodeTypeEnum.workflowStart]: dispatchWorkflowStart, @@ -632,7 +633,8 @@ export async function dispatchWorkFlow(data: Props): Promise