toolResult

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

Return

the updated prompt builder after applying the tool result

Parameters

result

the tool result to be added to the prompt builder


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

Appends a tool result to the promptBuilder.

Return

The updated PromptBuilder instance.

Parameters

id

The identifier of the tool result, or null if there is no specific identifier.

tool

The name of the tool associated with the result.

content

The content or output of the tool.