SubtaskBuilderWithInputAndOutput

constructor(context: AIAgentFunctionalContextBase<*>, taskDescription: String, input: Input, output: OutputOption<Output>, tools: List<Tool<*, *>>? = null, llmModel: LLModel? = null, llmParams: LLMParams? = null, responseProcessor: ResponseProcessor? = null, runMode: ToolCalls = ToolCalls.SEQUENTIAL, assistantResponseRepeatMax: Int? = null, executorService: ERROR CLASS: Symbol not found for ExecutorService?? = null)(source)

Parameters

Input

The type of the input required for the subtask.

Output

The type of the output produced by the subtask.

context

The functional context associated with the AI agent.

taskDescription

The description of the task that this subtask represents.

input

The input data required for the subtask.

output

Specifies the output of the subtask either by its class or through a finish tool.

tools

Optional list of tools that can be used during the subtask execution.

llmModel

Optional language model to be used for the subtask.

llmParams

Optional parameters for the language model configuration.

responseProcessor

Optional processor for post-processing LLM responses.

runMode

Specifies the mode in which tools should be called (e.g., sequentially).

assistantResponseRepeatMax

Optional maximum number of response repetitions allowed for the assistant.

executorService

Optional executor service for managing asynchronous operations.


constructor(context: AIAgentFunctionalContextBase<*>, taskDescription: String, input: Input, outputClass: ERROR CLASS: Symbol not found for Class<Output>)(source)

Constructs a new instance of SubtaskBuilderWithInputAndOutput. This constructor allows specifying the context, task description, input, and the output class type, which will be used to configure the subtask builder for tasks requiring both input and output processing.

Parameters

context

The functional context required to set up the subtask builder.

taskDescription

A textual description of the task being built.

input

The input data required for the task execution.

outputClass

The class type of the output expected from the task execution.


constructor(context: AIAgentFunctionalContextBase<*>, taskDescription: String, input: Input, finishTool: Tool<*, Output>)(source)

Secondary constructor for initializing an instance of SubtaskBuilderWithInputAndOutput with a specific context, task description, input, and a finalizing tool for output processing.

Parameters

context

The functional context in which the subtask is executed.

taskDescription

Description of the task being performed by the subtask.

input

The input required for the execution of the subtask.

finishTool

A tool used to produce the final output for the subtask.