interceptAfterLLMCall

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

Intercepts LLM calls after they are made to process or log the response.

Parameters

handle

The handler that processes after-LLM-call events

Example:

pipeline.interceptAfterLLMCall(InterceptContext) { eventContext ->
// Process or analyze the response
}