interceptLLMStreamingCompleted
fun <TFeature : Any> interceptLLMStreamingCompleted(interceptContext: InterceptContext<TFeature>, handle: suspend TFeature.(eventContext: LLMStreamingCompletedContext) -> Unit)(source)
Intercepts streaming operations after they complete to perform post-processing or cleanup.
This method allows features to hook into the streaming pipeline after streaming finishes, enabling post-processing, cleanup, or final logging of the streaming session.
Parameters
interceptContext
The context containing the feature and its implementation
handle
The handler that processes after-stream events
Example:
pipeline.interceptLLMStreamingCompleted(interceptContext) { eventContext ->
logger.info("Streaming completed for run: ${eventContext.runId}")
}
Content copied to clipboard