UsageMetadata

io.cequence.openaiscala.gemini.domain.response.UsageMetadata
case class UsageMetadata(promptTokenCount: Int, cachedContentTokenCount: Option[Int], candidatesTokenCount: Option[Int], totalTokenCount: Int, promptTokensDetails: Seq[ModalityTokenCount], cacheTokensDetails: Seq[ModalityTokenCount], candidatesTokensDetails: Seq[ModalityTokenCount])

Metadata on the generation request's token usage.

Attributes

cacheTokensDetails

Output only. List of modalities of the cached content in the request input.

cachedContentTokenCount

Number of tokens in the cached part of the prompt (the cached content).

candidatesTokenCount

Total number of tokens across all the generated response candidates.

candidatesTokensDetails

Output only. List of modalities that were returned in the response.

promptTokenCount

Number of tokens in the prompt. When cachedContent is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.

promptTokensDetails

Output only. List of modalities that were processed in the request input.

totalTokenCount

Total token count for the generation request (prompt + response candidates).

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product