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
Properties
Link copied to clipboard
The number of tokens used in the input, or null if not available.
Link copied to clipboard
The number of tokens generated in the output, or null if not available.
Link copied to clipboard
The total number of tokens involved in the response, including both input and output tokens, or null if not available.