Skip to main content

ChatStreamEvent

sealed interface ChatStreamEventPackage: com.chatbase.sdk.streaming Events emitted by sendMessageStream() and retryStream().

TextStart

A new text block is starting.

TextDelta

An incremental text chunk. Append to the current text.

TextEnd

The current text block is complete.

StreamMessageMetadata

data class StreamMessageMetadataPackage: com.chatbase.sdk.streaming Accompanies Start, Finish, and MessageMetadataEvent events.

StreamUsage

ToolCallInfo

data class ToolCallInfoPackage: com.chatbase.sdk Passed to the onToolCall callback before handler execution.
Parse the JSON input into a Map<String, Any?> for easy access.

ToolResultInfo

data class ToolResultInfoPackage: com.chatbase.sdk Passed to the onToolResult callback after handler execution.
Serialize the output to a JSON string.