(node: IReactFlowNode)
| 698 | const { nodeOverrides, variableOverrides, apiOverrideStatus } = getAPIOverrideConfig(agentflow) |
| 699 | |
| 700 | const initiateNode = async (node: IReactFlowNode) => { |
| 701 | const nodeInstanceFilePath = componentNodes[node.data.name].filePath as string |
| 702 | const nodeModule = await import(nodeInstanceFilePath) |
| 703 | const newNodeInstance = new nodeModule.nodeClass() |
| 704 | |
| 705 | flowNodeData = cloneDeep(node.data) |
| 706 | if (overrideConfig && apiOverrideStatus) |
| 707 | flowNodeData = replaceInputsWithConfig(flowNodeData, overrideConfig, nodeOverrides, variableOverrides) |
| 708 | flowNodeData = await resolveVariables( |
| 709 | flowNodeData, |
| 710 | reactFlowNodes, |
| 711 | question, |
| 712 | chatHistory, |
| 713 | overrideConfig, |
| 714 | uploadedFilesContent, |
| 715 | availableVariables, |
| 716 | variableOverrides |
| 717 | ) |
| 718 | |
| 719 | const seqAgentNode: ISeqAgentNode = await newNodeInstance.init(flowNodeData, question, options) |
| 720 | return seqAgentNode |
| 721 | } |
| 722 | |
| 723 | /* |
| 724 | * Two objectives we want to achieve here: |
no test coverage detected