transformed
infix fun <NewIntermediateOutput> transformed(block: suspend AIAgentContextBase.(IntermediateOutput) -> NewIntermediateOutput): AIAgentEdgeBuilderIntermediate<IncomingOutput, NewIntermediateOutput, OutgoingInput>(source)
Transforms the intermediate output of the ai.koog.agents.core.agent.entity.AIAgentNode by applying a given transformation block.
Return
A new instance of AIAgentEdgeBuilderIntermediate
with the transformed intermediate output type.
Parameters
block
A suspending lambda that defines the transformation to be applied to the intermediate output. It takes the AI agent's context and the intermediate output as parameters and returns a new intermediate output.