({
nodeId,
reactFlowNode,
nodes,
edges,
graph,
reversedGraph,
incomingInput,
chatflow,
chatId,
sessionId,
apiMessageId,
evaluationRunId,
parentExecutionId,
pastChatHistory,
prependedChatHistory,
appDataSource,
usageCacheManager,
telemetry,
componentNodes,
cachePool,
sseStreamer,
baseURL,
overrideConfig = {},
apiOverrideStatus = false,
nodeOverrides = {},
variableOverrides = [],
uploadedFilesContent = '',
fileUploads,
humanInput,
agentFlowExecutedData = [],
agentflowRuntime,
abortController,
parentTraceIds,
analyticHandlers,
isInternal,
isRecursive,
iterationContext,
loopCounts,
orgId,
workspaceId,
subscriptionId,
productId
}: IExecuteNodeParams)
| 1049 | * @returns The result of the node execution |
| 1050 | */ |
| 1051 | const executeNode = async ({ |
| 1052 | nodeId, |
| 1053 | reactFlowNode, |
| 1054 | nodes, |
| 1055 | edges, |
| 1056 | graph, |
| 1057 | reversedGraph, |
| 1058 | incomingInput, |
| 1059 | chatflow, |
| 1060 | chatId, |
| 1061 | sessionId, |
| 1062 | apiMessageId, |
| 1063 | evaluationRunId, |
| 1064 | parentExecutionId, |
| 1065 | pastChatHistory, |
| 1066 | prependedChatHistory, |
| 1067 | appDataSource, |
| 1068 | usageCacheManager, |
| 1069 | telemetry, |
| 1070 | componentNodes, |
| 1071 | cachePool, |
| 1072 | sseStreamer, |
| 1073 | baseURL, |
| 1074 | overrideConfig = {}, |
| 1075 | apiOverrideStatus = false, |
| 1076 | nodeOverrides = {}, |
| 1077 | variableOverrides = [], |
| 1078 | uploadedFilesContent = '', |
| 1079 | fileUploads, |
| 1080 | humanInput, |
| 1081 | agentFlowExecutedData = [], |
| 1082 | agentflowRuntime, |
| 1083 | abortController, |
| 1084 | parentTraceIds, |
| 1085 | analyticHandlers, |
| 1086 | isInternal, |
| 1087 | isRecursive, |
| 1088 | iterationContext, |
| 1089 | loopCounts, |
| 1090 | orgId, |
| 1091 | workspaceId, |
| 1092 | subscriptionId, |
| 1093 | productId |
| 1094 | }: IExecuteNodeParams): Promise<{ |
| 1095 | result: any |
| 1096 | shouldStop?: boolean |
| 1097 | agentFlowExecutedData?: IAgentflowExecutedData[] |
| 1098 | humanInput?: IHumanInput |
| 1099 | }> => { |
| 1100 | try { |
| 1101 | if (abortController?.signal?.aborted) { |
| 1102 | throw new Error('Aborted') |
| 1103 | } |
| 1104 | |
| 1105 | // Stream progress event |
| 1106 | sseStreamer?.streamNextAgentFlowEvent(chatId, { |
| 1107 | nodeId, |
| 1108 | nodeLabel: reactFlowNode.data.label, |
no test coverage detected