setupSubgraphWithTask
Configures and sets up a subgraph with task handling, including tool execution operations, assistant response management, and task finalization logic.
Parameters
the type of input data for the subgraph.
the type of output data from the finish tool.
the transformed type of the output data after processing by the finish tool.
the tool used to signify task completion and process task finalization.
the mode in which tools are executed, e.g., parallel or sequential execution.
the maximum number of assistant responses allowed before determining that the task cannot be completed. If not provided, a default is used.
a suspend function defining the task description, executed within the context of an AI agent graph and based on the given input data.
Deprecated
Use setupSubgraphWithTask API that receive a runMode parameter instead.
Replace with
setupSubgraphWithTask(finishTool, assistantResponseRepeatMax, runMode, defineTask)Configures a subgraph within the AI agent framework, associating it with required tasks and operations.
FOR INTERNAL USAGE ONLY!
Parameters
A descriptor for the tool that determines the condition to finalize the subgraph's operation.
A suspending lambda that defines the main task of the subgraph, producing a task description based on the input.