interceptAgentCompleted
fun <TFeature : Any> interceptAgentCompleted(interceptContext: InterceptContext<TFeature>, handle: suspend TFeature.(eventContext: AgentCompletedContext) -> Unit)(source)
Intercepts the completion of an agent's operation and assigns a custom handler to process the result.
Parameters
handle
A suspend function providing custom logic to execute when the agent completes,
Example:
pipeline.interceptAgentCompleted(interceptContext) { eventContext ->
// Handle the completion result here, using the strategy name and the result.
}
Content copied to clipboard