Composing a Pipeline consists of chaining different Nodes together. Each Node can reference a value from any previous executed nodes (all fully typed of course 🎉).
You can configure the input of a Node using the Input Function
which is the second parameter of the flow.node
function.
The Input Function
receives a callback that accepts five arguments:
input
, prev
, nodes
, memory
and userId
Input
The input
argument references the values that were passed as arguments to the Pipeline itself with the invoke
method.
Prev
The prev
argument references the output of the immediately previous node.
Nodes
The nodes
argument gives you access to all previously executed nodes' outputs.
The access is by their index in the pipeline definition.
Additional access methods are planned for future versions.
Memory
See Memory for more details.
UserId
See UserId for more details.