interceptLLMStreamingCompleted

fun interceptLLMStreamingCompleted(feature: AIAgentFeature<*, *>, handle: suspend (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

feature

The feature associated with this handler.

handle

The handler that processes after-stream events

Example:

pipeline.interceptLLMStreamingCompleted(feature) { eventContext ->
logger.info("Streaming completed for run: ${eventContext.runId}")
}