Statistics on the interaction request's token usage.
| JSON representation |
|---|
{ "totalInputTokens": integer, "inputTokensByModality": [ { object ( |
| Fields | |
|---|---|
totalInputTokens |
Number of tokens in the prompt (context). |
inputTokensByModality[] |
A breakdown of input token usage by modality. |
totalCachedTokens |
Number of tokens in the cached part of the prompt (the cached content). |
cachedTokensByModality[] |
A breakdown of cached token usage by modality. |
totalOutputTokens |
Total number of tokens across all the generated responses. |
outputTokensByModality[] |
A breakdown of output token usage by modality. |
totalToolUseTokens |
Number of tokens present in tool-use prompt(s). |
toolUseTokensByModality[] |
A breakdown of tool-use token usage by modality. |
totalThoughtTokens |
Number of tokens of thoughts for thinking models. |
totalTokens |
Total token count for the interaction request (prompt + responses + other internal tokens). |
groundingToolCount[] |
Grounding tool count. |
ModalityTokens
The token count for a single response modality.
| JSON representation |
|---|
{
"modality": enum ( |
| Fields | |
|---|---|
modality |
The modality associated with the token count. |
tokens |
Number of tokens for the modality. |
GroundingToolCount
The number of grounding tool counts.
| JSON representation |
|---|
{
"type": enum ( |
| Fields | |
|---|---|
type |
The grounding tool type associated with the count. |
count |
The number of grounding tool counts. |
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. |