Class Usage.Builder
java.lang.Object
com.google.genai.gaos.models.interactions.Usage.Builder
- Enclosing class:
- Usage
-
Method Summary
Modifier and TypeMethodDescriptionbuild()cachedTokensByModality(List<ModalityTokens> cachedTokensByModality) A breakdown of cached token usage by modality.groundingToolCount(List<GroundingToolCount> groundingToolCount) Grounding tool count.inputTokensByModality(List<ModalityTokens> inputTokensByModality) A breakdown of input token usage by modality.outputTokensByModality(List<ModalityTokens> outputTokensByModality) A breakdown of output token usage by modality.toolUseTokensByModality(List<ModalityTokens> toolUseTokensByModality) A breakdown of tool-use token usage by modality.totalCachedTokens(Integer totalCachedTokens) Number of tokens in the cached part of the prompt (the cached content).totalInputTokens(Integer totalInputTokens) Number of tokens in the prompt (context).totalOutputTokens(Integer totalOutputTokens) Total number of tokens across all the generated responses.totalThoughtTokens(Integer totalThoughtTokens) Number of tokens of thoughts for thinking models.totalTokens(Integer totalTokens) Total token count for the interaction request (prompt + responses + other internal tokens).totalToolUseTokens(Integer totalToolUseTokens) Number of tokens present in tool-use prompt(s).
-
Method Details
-
cachedTokensByModality
A breakdown of cached token usage by modality. -
groundingToolCount
Grounding tool count. -
inputTokensByModality
A breakdown of input token usage by modality. -
outputTokensByModality
A breakdown of output token usage by modality. -
toolUseTokensByModality
public Usage.Builder toolUseTokensByModality(@Nullable List<ModalityTokens> toolUseTokensByModality) A breakdown of tool-use token usage by modality. -
totalCachedTokens
Number of tokens in the cached part of the prompt (the cached content). -
totalInputTokens
Number of tokens in the prompt (context). -
totalOutputTokens
Total number of tokens across all the generated responses. -
totalThoughtTokens
Number of tokens of thoughts for thinking models. -
totalTokens
Total token count for the interaction request (prompt + responses + other internal tokens). -
totalToolUseTokens
Number of tokens present in tool-use prompt(s). -
build
-