GatewayStreamEvent

sealed interface GatewayStreamEvent

Low-level stream event emitted by com.mojentic.llm.gateway.LlmGateway.stream.

Gateways translate provider-specific stream payloads into this shape. The broker accumulates these into a single response and orchestrates tool execution before surfacing public StreamEvents to callers.

Inheritors

Types

Link copied to clipboard
data class Content(val text: String) : GatewayStreamEvent
Link copied to clipboard
data class Raw(val payload: JsonElement) : GatewayStreamEvent

Raw provider payload escape hatch, for adapters that need it.

Link copied to clipboard
data class Thinking(val text: String) : GatewayStreamEvent
Link copied to clipboard
data class ToolCalls(val calls: List<LlmToolCall>) : GatewayStreamEvent