interceptAgentExecutionFailed
fun <TFeature : Any> interceptAgentExecutionFailed(interceptContext: InterceptContext<TFeature>, handle: suspend TFeature.(eventContext: AgentExecutionFailedContext) -> Unit)(source)
Intercepts and handles errors occurring during the execution of an AI agent's strategy.
Parameters
handle
A suspend function providing custom logic to execute when an error occurs,
Example:
pipeline.interceptAgentExecutionFailed(interceptContext) { eventContext ->
// Handle the error here, using the strategy name and the exception that occurred.
}
Content copied to clipboard