interceptToolCallFailure

fun <TFeature : Any> interceptToolCallFailure(interceptContext: InterceptContext<TFeature>, handle: suspend TFeature.(eventContext: ToolCallFailureContext) -> Unit)(source)

Sets up an interception mechanism to handle tool call failures for a specific feature.

Parameters

handle

A suspend function that is invoked when a tool call fails. It provides the stage, the tool, the tool arguments, and the throwable that caused the failure.

Example:

pipeline.interceptToolCallFailure(InterceptContext) { eventContext ->
// Handle the tool call failure here
}