Skip to content

Commit 0596cb5

Browse files
IvanLHcopybara-github
authored andcommitted
chore: Add missing modality types
PiperOrigin-RevId: 893665237
1 parent b2629a4 commit 0596cb5

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

google/genai/_interactions/resources/interactions.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def create(
7676
previous_interaction_id: str | Omit = omit,
7777
response_format: object | Omit = omit,
7878
response_mime_type: str | Omit = omit,
79-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
79+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
8080
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
8181
store: bool | Omit = omit,
8282
stream: Literal[False] | Omit = omit,
@@ -143,7 +143,7 @@ def create(
143143
previous_interaction_id: str | Omit = omit,
144144
response_format: object | Omit = omit,
145145
response_mime_type: str | Omit = omit,
146-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
146+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
147147
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
148148
store: bool | Omit = omit,
149149
system_instruction: str | Omit = omit,
@@ -208,7 +208,7 @@ def create(
208208
previous_interaction_id: str | Omit = omit,
209209
response_format: object | Omit = omit,
210210
response_mime_type: str | Omit = omit,
211-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
211+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
212212
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
213213
store: bool | Omit = omit,
214214
stream: Literal[False] | Omit = omit,
@@ -275,7 +275,7 @@ def create(
275275
previous_interaction_id: str | Omit = omit,
276276
response_format: object | Omit = omit,
277277
response_mime_type: str | Omit = omit,
278-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
278+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
279279
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
280280
store: bool | Omit = omit,
281281
system_instruction: str | Omit = omit,
@@ -341,7 +341,7 @@ def create(
341341
previous_interaction_id: str | Omit = omit,
342342
response_format: object | Omit = omit,
343343
response_mime_type: str | Omit = omit,
344-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
344+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
345345
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
346346
store: bool | Omit = omit,
347347
system_instruction: str | Omit = omit,
@@ -406,7 +406,7 @@ def create(
406406
previous_interaction_id: str | Omit = omit,
407407
response_format: object | Omit = omit,
408408
response_mime_type: str | Omit = omit,
409-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
409+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
410410
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
411411
store: bool | Omit = omit,
412412
stream: Literal[False] | Literal[True] | Omit = omit,
@@ -728,7 +728,7 @@ async def create(
728728
previous_interaction_id: str | Omit = omit,
729729
response_format: object | Omit = omit,
730730
response_mime_type: str | Omit = omit,
731-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
731+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
732732
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
733733
store: bool | Omit = omit,
734734
stream: Literal[False] | Omit = omit,
@@ -795,7 +795,7 @@ async def create(
795795
previous_interaction_id: str | Omit = omit,
796796
response_format: object | Omit = omit,
797797
response_mime_type: str | Omit = omit,
798-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
798+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
799799
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
800800
store: bool | Omit = omit,
801801
system_instruction: str | Omit = omit,
@@ -860,7 +860,7 @@ async def create(
860860
previous_interaction_id: str | Omit = omit,
861861
response_format: object | Omit = omit,
862862
response_mime_type: str | Omit = omit,
863-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
863+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
864864
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
865865
store: bool | Omit = omit,
866866
stream: Literal[False] | Omit = omit,
@@ -927,7 +927,7 @@ async def create(
927927
previous_interaction_id: str | Omit = omit,
928928
response_format: object | Omit = omit,
929929
response_mime_type: str | Omit = omit,
930-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
930+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
931931
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
932932
store: bool | Omit = omit,
933933
system_instruction: str | Omit = omit,
@@ -993,7 +993,7 @@ async def create(
993993
previous_interaction_id: str | Omit = omit,
994994
response_format: object | Omit = omit,
995995
response_mime_type: str | Omit = omit,
996-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
996+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
997997
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
998998
store: bool | Omit = omit,
999999
system_instruction: str | Omit = omit,
@@ -1058,7 +1058,7 @@ async def create(
10581058
previous_interaction_id: str | Omit = omit,
10591059
response_format: object | Omit = omit,
10601060
response_mime_type: str | Omit = omit,
1061-
response_modalities: List[Literal["text", "image", "audio"]] | Omit = omit,
1061+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
10621062
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
10631063
store: bool | Omit = omit,
10641064
stream: Literal[False] | Literal[True] | Omit = omit,

google/genai/_interactions/types/interaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class Interaction(BaseModel):
132132
response_mime_type: Optional[str] = None
133133
"""The mime type of the response. This is required if response_format is set."""
134134

135-
response_modalities: Optional[List[Literal["text", "image", "audio"]]] = None
135+
response_modalities: Optional[List[Literal["text", "image", "audio", "video", "document"]]] = None
136136
"""The requested modalities of the response (TEXT, IMAGE, AUDIO)."""
137137

138138
role: Optional[str] = None

google/genai/_interactions/types/interaction_create_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class BaseCreateModelInteractionParams(TypedDict, total=False):
8787
response_mime_type: str
8888
"""The mime type of the response. This is required if response_format is set."""
8989

90-
response_modalities: List[Literal["text", "image", "audio"]]
90+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]]
9191
"""The requested modalities of the response (TEXT, IMAGE, AUDIO)."""
9292

9393
service_tier: Literal["flex", "standard", "priority"]
@@ -157,7 +157,7 @@ class BaseCreateAgentInteractionParams(TypedDict, total=False):
157157
response_mime_type: str
158158
"""The mime type of the response. This is required if response_format is set."""
159159

160-
response_modalities: List[Literal["text", "image", "audio"]]
160+
response_modalities: List[Literal["text", "image", "audio", "video", "document"]]
161161
"""The requested modalities of the response (TEXT, IMAGE, AUDIO)."""
162162

163163
service_tier: Literal["flex", "standard", "priority"]

google/genai/_interactions/types/usage.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
class CachedTokensByModality(BaseModel):
3333
"""The token count for a single response modality."""
3434

35-
modality: Optional[Literal["text", "image", "audio"]] = None
35+
modality: Optional[Literal["text", "image", "audio", "video", "document"]] = None
3636
"""The modality associated with the token count."""
3737

3838
tokens: Optional[int] = None
@@ -42,7 +42,7 @@ class CachedTokensByModality(BaseModel):
4242
class InputTokensByModality(BaseModel):
4343
"""The token count for a single response modality."""
4444

45-
modality: Optional[Literal["text", "image", "audio"]] = None
45+
modality: Optional[Literal["text", "image", "audio", "video", "document"]] = None
4646
"""The modality associated with the token count."""
4747

4848
tokens: Optional[int] = None
@@ -52,7 +52,7 @@ class InputTokensByModality(BaseModel):
5252
class OutputTokensByModality(BaseModel):
5353
"""The token count for a single response modality."""
5454

55-
modality: Optional[Literal["text", "image", "audio"]] = None
55+
modality: Optional[Literal["text", "image", "audio", "video", "document"]] = None
5656
"""The modality associated with the token count."""
5757

5858
tokens: Optional[int] = None
@@ -62,7 +62,7 @@ class OutputTokensByModality(BaseModel):
6262
class ToolUseTokensByModality(BaseModel):
6363
"""The token count for a single response modality."""
6464

65-
modality: Optional[Literal["text", "image", "audio"]] = None
65+
modality: Optional[Literal["text", "image", "audio", "video", "document"]] = None
6666
"""The modality associated with the token count."""
6767

6868
tokens: Optional[int] = None

google/genai/_interactions/types/usage_param.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
class CachedTokensByModality(TypedDict, total=False):
3333
"""The token count for a single response modality."""
3434

35-
modality: Literal["text", "image", "audio"]
35+
modality: Literal["text", "image", "audio", "video", "document"]
3636
"""The modality associated with the token count."""
3737

3838
tokens: int
@@ -42,7 +42,7 @@ class CachedTokensByModality(TypedDict, total=False):
4242
class InputTokensByModality(TypedDict, total=False):
4343
"""The token count for a single response modality."""
4444

45-
modality: Literal["text", "image", "audio"]
45+
modality: Literal["text", "image", "audio", "video", "document"]
4646
"""The modality associated with the token count."""
4747

4848
tokens: int
@@ -52,7 +52,7 @@ class InputTokensByModality(TypedDict, total=False):
5252
class OutputTokensByModality(TypedDict, total=False):
5353
"""The token count for a single response modality."""
5454

55-
modality: Literal["text", "image", "audio"]
55+
modality: Literal["text", "image", "audio", "video", "document"]
5656
"""The modality associated with the token count."""
5757

5858
tokens: int
@@ -62,7 +62,7 @@ class OutputTokensByModality(TypedDict, total=False):
6262
class ToolUseTokensByModality(TypedDict, total=False):
6363
"""The token count for a single response modality."""
6464

65-
modality: Literal["text", "image", "audio"]
65+
modality: Literal["text", "image", "audio", "video", "document"]
6666
"""The modality associated with the token count."""
6767

6868
tokens: int

0 commit comments

Comments
 (0)