subtask
Executes a subtask within the larger context of an AI agent's functional operation. This method allows you to define a specific task to be performed, using the given input, tools, and optional configuration parameters.
Return
The result of the subtask execution, as an instance of type Output.
Parameters
The type of input provided to the subtask.
The type of the output expected from the subtask.
The input data required for the subtask execution.
A list of tools available for use within the subtask.
The optional large language model to be used during the subtask, if different from the default one.
The configuration parameters for the large language model, such as temperature, etc.
The mode in which tools should be executed, either sequentially or in parallel.
The maximum number of times the assistant response can repeat. Useful to control redundant outputs.
A suspendable lambda defining the actual task logic, which takes the provided input and produces a task description.
Executes a subtask within the AI agent's functional context. This method enables the use of tools to achieve a specific task based on the input provided. It defines the task using an inline function, employs tools iteratively, and attempts to complete the subtask with a designated finishing tool.
Return
The transformed final result of executing the finishing tool to complete the subtask.
Parameters
The input data required to define and execute the subtask.
An optional list of tools that can be used to achieve the task, excluding the finishing tool.
A mandatory tool that determines the final result of the subtask by producing and transforming output.
An optional specific language learning model (LLM) to use for executing the subtask.
Optional parameters for configuring the behavior of the LLM during subtask execution.
The mode in which tools should be executed, either sequentially or in parallel.
The maximum number of feedback attempts allowed from the language model if the subtask is not completed.
A suspendable function used to define the task based on the provided input.