ResponseMetaInfo

data class ResponseMetaInfo(val timestamp: Instant, val totalTokensCount: Int? = null, val inputTokensCount: Int? = null, val outputTokensCount: Int? = null) : MessageMetaInfo(source)

Represents metadata associated with a response message in a chat system.

This class provides details about the response, including the count of tokens used in the response and the timestamp of when the response was created. It implements the MessageMetadata interface, inheriting the timestamp property.

Example:

  • Message 1: "Hello" (3 tokens) → tokensCount = 3

  • Message 2: "How are you?" (4 tokens) → tokensCount = 3 + 4 = 7

  • Message 3: "I am fine, thank you." (6 tokens) → tokensCount = 7 + 6 = 13

Constructors

Link copied to clipboard
constructor(timestamp: Instant, totalTokensCount: Int? = null, inputTokensCount: Int? = null, outputTokensCount: Int? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val inputTokensCount: Int? = null

The number of tokens used in the input, or null if not available.

Link copied to clipboard
val outputTokensCount: Int? = null

The number of tokens generated in the output, or null if not available.

Link copied to clipboard
open override val timestamp: Instant

The timestamp indicating when the response was created. Defaults to the current system time if not explicitly set.

Link copied to clipboard
val totalTokensCount: Int? = null

The total number of tokens involved in the response, including both input and output tokens, or null if not available.