withAction
fun <NewOutput : OutgoingInput> withAction(action: ContextualTransformation<IntermediateOutput, NewOutput>): CompatibleFullAgentEdgeBuilder<IncomingOutput, NewOutput, OutgoingInput>(source)
Transforms the intermediate output of the edge by applying the given action. This is an alias for transformed providing naming consistency with the node builder API.
Return
A builder instance configured to handle the transformed outputs.
Parameters
action
A contextual transformation function that takes an intermediate output and an AI agent graph context as input, and produces a compatible output.
fun <NewOutput : OutgoingInput> withAction(action: SimpleTransformation<IntermediateOutput, NewOutput>): CompatibleFullAgentEdgeBuilder<IncomingOutput, NewOutput, OutgoingInput>(source)
Transforms the intermediate output of the edge by applying the given action. This is an alias for transformed providing naming consistency with the node builder API.
Return
A builder instance configured to handle the transformed outputs.
Parameters
action
A simple transformation function that takes an intermediate output and produces a compatible output.