PromptTokensDetails

@Serializable
class PromptTokensDetails(val cachedTokens: Int? = null)

Breakdown of the prompt tokens counted by Usage, decoded from the OpenAI-compatible prompt_tokens_details key.

Current responses omit that key and report cache accounting through the flat Usage.promptCacheHitTokens / Usage.promptCacheMissTokens fields instead.

Constructors

Link copied to clipboard
constructor(cachedTokens: Int? = null)

Properties

Link copied to clipboard

Number of prompt tokens served from the context cache, or null when the server did not report this breakdown.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String