LlmInferenceStreamEvent

sealed interface LlmInferenceStreamEvent

Provider-neutral events emitted by one streaming LLM inference call.

Content events are forwarded as soon as they arrive. Complete is emitted once, after provider-specific fragments (including partial tool calls) have been assembled.

This SPI type is deliberately distinct from com.embabel.common.core.streaming.StreamingEvent, which is the public, converted application stream of thinking and typed objects. These events exist below that layer: DefaultStreamingToolLoop consumes Complete internally and forwards only content.

Inheritors

Types

Link copied to clipboard
data class Complete(val message: Message, val usage: Usage? = null) : LlmInferenceStreamEvent
Link copied to clipboard
data class Content(val text: String) : LlmInferenceStreamEvent