interceptLLMStreamingFrameReceived
fun <TFeature : Any> interceptLLMStreamingFrameReceived(interceptContext: InterceptContext<TFeature>, handle: suspend TFeature.(eventContext: LLMStreamingFrameReceivedContext) -> Unit)(source)
Intercepts stream frames as they are received during the streaming process.
This method allows features to process individual stream frames in real-time, enabling monitoring, transformation, or aggregation of streaming content.
Parameters
interceptContext
The context containing the feature and its implementation
handle
The handler that processes stream frame events
Example:
pipeline.interceptLLMStreamingFrameReceived(interceptContext) { eventContext ->
logger.debug("Received stream frame: ${eventContext.streamFrame}")
}
Content copied to clipboard