withTask
fun withTask(defineTask: ContextualAction<Input, String>): SubgraphWithTaskBuilder<Input, OutputTransformed>(source)
Configures a task to be executed as part of the subgraph.
Return
A builder instance for configuring the subgraph with the defined task.
Parameters
defineTask
The task defined as a contextual action that takes an input and a graph context, and produces a string output.
fun withTask(defineTask: SimpleAction<Input, String>): SubgraphWithTaskBuilder<Input, OutputTransformed>(source)
Defines a task within the subgraph using the provided task implementation.
Return
A SubgraphWithTaskBuilder instance configured with the specified task.
Parameters
defineTask
The task implementation represented by a SimpleAction that takes an input of type Input and returns a String output after task execution.