StreamEventsGateway
interface StreamEventsGateway
Optional gateway capability behind LlmBroker.generateStreamEvents.
An implementation sends exactly one streaming request per collection, supplies no tools, and emits CompletionStreamEvent.Content events followed by exactly one terminal event. It reports failures as CompletionStreamEvent.Error rather than by throwing. Cancelling the collector cancels the request.
Functions
Link copied to clipboard
abstract fun streamEvents(model: String, messages: List<LlmMessage>, config: CompletionConfig = CompletionConfig()): Flow<CompletionStreamEvent>
Stream one turn as CompletionStreamEvents.