Usage

data class Usage(val promptTokens: Int, val completionTokens: Int, val totalTokens: Int, val completionTokensDetails: CompletionTokensDetails, val promptTokensDetails: TokenDetails? = null)(source)

Represents usage statistics for a completion.

Constructors

Link copied to clipboard
constructor(promptTokens: Int, completionTokens: Int, totalTokens: Int, completionTokensDetails: CompletionTokensDetails, promptTokensDetails: TokenDetails? = null)

Properties

Link copied to clipboard
@SerialName(value = "completion_tokens")
val completionTokens: Int

The number of tokens in the completion.

Link copied to clipboard
@SerialName(value = "completion_tokens_details")
val completionTokensDetails: CompletionTokensDetails

Details about the completion tokens.

Link copied to clipboard
@SerialName(value = "prompt_tokens")
val promptTokens: Int

The number of tokens in the prompt.

Link copied to clipboard
@SerialName(value = "prompt_tokens_details")
val promptTokensDetails: TokenDetails?

Optional details about the prompt tokens.

Link copied to clipboard
@SerialName(value = "total_tokens")
val totalTokens: Int

The total number of tokens.