StreamingToken

Represents an individual streamed token.

Inheritors

Types

Link copied to clipboard
@JsonClass(generateAdapter = true)
data class MessageStreamingToken(val sequenceNumber: Int, val timestamp: Long, val targetMessageIdentifier: String, val batchNumber: Int = 0, val turnId: String = targetMessageIdentifier, val token: StreamingTokenMessageFormat) : StreamingToken

A streamed token which contains part of a full message.

Link copied to clipboard
@JsonClass(generateAdapter = true)
data class StreamingTokenValidation(val sequenceNumber: Int, val timestamp: Long, val targetMessageIdentifier: String, val batchNumber: Int = 0, val turnId: String = targetMessageIdentifier, val result: StreamingTokenValidationResult) : StreamingToken

Streamed token which identifies a previously streamed token as being invalid.

Properties

Link copied to clipboard
abstract val batchNumber: Int

The batch number this token belongs to, for grouping related tokens.

Link copied to clipboard
abstract val sequenceNumber: Int

The position of this token within the stream sequence.

Link copied to clipboard

The identifier of the message this token contributes content to.

Link copied to clipboard
abstract val timestamp: Long

The server timestamp when this token was generated.

Link copied to clipboard

The type of this streaming token (validation or message content).

Link copied to clipboard
abstract val turnId: String

The identifier for the conversational turn this token is part of.