interceptLLMStreamingFrameReceived
fun interceptLLMStreamingFrameReceived(feature: AIAgentFeature<*, *>, handle: suspend (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
feature
The feature associated with this handler.
handle
The handler that processes stream frame events
Example:
pipeline.interceptLLMStreamingFrameReceived(feature) { eventContext ->
logger.debug("Received stream frame: ${eventContext.streamFrame}")
}
Content copied to clipboard