ChatEvent

sealed interface ChatEvent

What a ChatModel emits while it writes an answer. See ChatModel.stream.

Inheritors

Types

Link copied to clipboard
data class Completed(val response: ChatResponse) : ChatEvent

The model finished. response holds the whole answer, including its tool calls.

Link copied to clipboard
data class TextDelta(val text: String) : ChatEvent

The model wrote text, the next piece of its answer. The pieces of one answer, joined in order, are the text of its message.