File tree Expand file tree Collapse file tree
google/genai/_interactions/types Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323__all__ = [
2424 "Usage" ,
2525 "CachedTokensByModality" ,
26+ "GroundingToolCount" ,
2627 "InputTokensByModality" ,
2728 "OutputTokensByModality" ,
2829 "ToolUseTokensByModality" ,
@@ -39,6 +40,16 @@ class CachedTokensByModality(BaseModel):
3940 """Number of tokens for the modality."""
4041
4142
43+ class GroundingToolCount (BaseModel ):
44+ """The number of grounding tool counts."""
45+
46+ count : Optional [int ] = None
47+ """The number of grounding tool counts."""
48+
49+ type : Optional [Literal ["google_search" , "google_map" , "your_data" ]] = None
50+ """The grounding tool type associated with the count."""
51+
52+
4253class InputTokensByModality (BaseModel ):
4354 """The token count for a single response modality."""
4455
@@ -75,6 +86,9 @@ class Usage(BaseModel):
7586 cached_tokens_by_modality : Optional [List [CachedTokensByModality ]] = None
7687 """A breakdown of cached token usage by modality."""
7788
89+ grounding_tool_count : Optional [List [GroundingToolCount ]] = None
90+ """Grounding tool count."""
91+
7892 input_tokens_by_modality : Optional [List [InputTokensByModality ]] = None
7993 """A breakdown of input token usage by modality."""
8094
Original file line number Diff line number Diff line change 2323__all__ = [
2424 "UsageParam" ,
2525 "CachedTokensByModality" ,
26+ "GroundingToolCount" ,
2627 "InputTokensByModality" ,
2728 "OutputTokensByModality" ,
2829 "ToolUseTokensByModality" ,
@@ -39,6 +40,16 @@ class CachedTokensByModality(TypedDict, total=False):
3940 """Number of tokens for the modality."""
4041
4142
43+ class GroundingToolCount (TypedDict , total = False ):
44+ """The number of grounding tool counts."""
45+
46+ count : int
47+ """The number of grounding tool counts."""
48+
49+ type : Literal ["google_search" , "google_map" , "your_data" ]
50+ """The grounding tool type associated with the count."""
51+
52+
4253class InputTokensByModality (TypedDict , total = False ):
4354 """The token count for a single response modality."""
4455
@@ -75,6 +86,9 @@ class UsageParam(TypedDict, total=False):
7586 cached_tokens_by_modality : Iterable [CachedTokensByModality ]
7687 """A breakdown of cached token usage by modality."""
7788
89+ grounding_tool_count : Iterable [GroundingToolCount ]
90+ """Grounding tool count."""
91+
7892 input_tokens_by_modality : Iterable [InputTokensByModality ]
7993 """A breakdown of input token usage by modality."""
8094
You can’t perform that action at this time.
0 commit comments