Statistics on the interaction request's token usage.
totalInputTokensinteger
Number of tokens in the prompt (context).
A breakdown of input token usage by modality.
totalCachedTokensinteger
Number of tokens in the cached part of the prompt (the cached content).
A breakdown of cached token usage by modality.
totalOutputTokensinteger
Total number of tokens across all the generated responses.
A breakdown of output token usage by modality.
totalToolUseTokensinteger
Number of tokens present in tool-use prompt(s).
A breakdown of tool-use token usage by modality.
totalThoughtTokensinteger
Number of tokens of thoughts for thinking models.
totalTokensinteger
Total token count for the interaction request (prompt + responses + other internal tokens).
Grounding tool count.
| JSON representation |
|---|
{ "totalInputTokens": integer, "inputTokensByModality": [ { object ( |
ModalityTokens
The token count for a single response modality.
The modality associated with the token count.
tokensinteger
Number of tokens for the modality.
| JSON representation |
|---|
{
"modality": enum ( |
GroundingToolCount
The number of grounding tool counts.
The grounding tool type associated with the count.
countinteger
The number of grounding tool counts.
| JSON representation |
|---|
{
"type": enum ( |
Type
The type of grounding tool.
| Enums | |
|---|---|
TYPE_UNSPECIFIED |
Default value. This value is unused. |
GOOGLE_SEARCH |
Grounding with Google Web Search and Image Search, & Web Grounding for Enterprise. |
GOOGLE_MAPS |
Grounding with Google Maps. |
RETRIEVAL |
Grounding with customer's data, for example, VertexAISearch. |