ToolResultMessageBuilder

A builder class for constructing tool result messages and appending them to a PromptBuilder.

Parameters

clock

Provides the current time, allowing for temporal operations.

call

A lambda for configuring the ToolMessageBuilder instance.

promptBuilder

The parent builder to which tool result messages are added.

Constructors

Link copied to clipboard
constructor(clock: Clock, call: PromptBuilder.ToolMessageBuilder.() -> Unit, promptBuilder: PromptBuilder)

Functions

Link copied to clipboard

Adds a tool result to the prompt builder by invoking the provided tool call and applying the given tool result.

fun toolResult(id: String?, tool: String, content: String): PromptBuilder

Appends a tool result to the promptBuilder.