SubgraphWithTaskBuilder

class SubgraphWithTaskBuilder<Input : Any, Output : Any>(name: String?, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, llmModel: LLModel? = null, llmParams: LLMParams? = null, responseProcessor: ResponseProcessor? = null, inputClass: ERROR CLASS: Symbol not found for Class<Input>, outputOption: OutputOption<Output>, defineTask: ContextualAction<Input, String>, runMode: ToolCalls = ToolCalls.SEQUENTIAL, assistantResponseRepeatMax: Int? = null) : TypedAIAgentSubgraphBuilderBase<Input, Output, SubgraphWithTaskBuilder<Input, Output>> (source)

A builder class for creating an AI agent subgraph that incorporates task definition as part of its configuration. This builder allows customizing the construction of a subgraph while defining how tasks are specified and executed within the subgraph.

The class is designed for Java interoperability and simplifies the process of building subgraphs with task-specific logic, including specifying input/output types, tool selection

Constructors

Link copied to clipboard
constructor(name: String?, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, llmModel: LLModel? = null, llmParams: LLMParams? = null, responseProcessor: ResponseProcessor? = null, inputClass: ERROR CLASS: Symbol not found for Class<Input>, outputOption: OutputOption<Output>, defineTask: ContextualAction<Input, String>, runMode: ToolCalls = ToolCalls.SEQUENTIAL, assistantResponseRepeatMax: Int? = null)

Functions

Link copied to clipboard

Sets the maximum number of times the assistant's response can be repeated.

Link copied to clipboard

Builds and returns an instance of AIAgentSubgraph configured with the specified parameters.

Link copied to clipboard
fun limitedTools(vararg toolSets: ERROR CLASS: Symbol not found for ToolSet): SubgraphWithTaskBuilder<Input, Output>

Configures the builder with a selection of tools defined by the provided tool sets. The tools will be extracted from each ToolSet and applied to the builder's tool selection strategy.

Configures the builder to use a specific list of tools for the AI agent's subgraph.

Link copied to clipboard

Configures the run mode for

Link copied to clipboard

Sets the specified Large Language Model (LLM) for the agent subgraph builder.

Link copied to clipboard
fun <Input : Any> withInput(outputClass: ERROR CLASS: Symbol not found for Class<Input>): AIAgentSubgraphBuilderWithInput<Input, *>

Configures the builder with the specified input type and returns a new instance of AIAgentSubgraphBuilderWithInput, allowing further configuration for the specified input type.

Link copied to clipboard

Sets the parameters for the Language Learning Model (LLM) in the current builder.

Link copied to clipboard

Sets the specified response processor to handle and modify LLM responses.

Link copied to clipboard

Sets the tool selection strategy for the subgraph builder and returns the updated builder instance.