Token

data class Token(val index: Int, val tokenId: Int, val text: String) : TokenEvent(source)

A generated token.

Constructors

Link copied to clipboard
constructor(index: Int, tokenId: Int, text: String)

Properties

Link copied to clipboard
val index: Int

zero-based position of this token within the generation.

Link copied to clipboard

detokenized text piece (may be empty for partial UTF-8 sequences).

Link copied to clipboard

vocabulary id of the token.