diff --git a/packages/service/core/workflow/dispatch/index.ts b/packages/service/core/workflow/dispatch/index.ts index 73097fc6d..43f54d0c1 100644 --- a/packages/service/core/workflow/dispatch/index.ts +++ b/packages/service/core/workflow/dispatch/index.ts @@ -47,6 +47,7 @@ import { rewriteRuntimeWorkFlow, removeSystemVariable } from './utils'; import { getHandleId } from '@fastgpt/global/core/workflow/utils'; import { callbackMap } from './constants'; import { anyValueDecrypt } from '../../../common/secret/utils'; +import { result } from 'lodash'; type Props = Omit & { runtimeNodes: RuntimeNodeItemType[]; @@ -164,7 +165,7 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise 0) || + (!Array.isArray(toolResponses) && typeof toolResponses === 'object' && - Object.keys(toolResponses).length === 0 - ) - return; + Object.keys(toolResponses).length > 0) + ) { this.toolRunResponse = toolResponses; } @@ -609,6 +609,8 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise