Skip to content

Commit d6d0f89

Browse files
wanlin31copybara-github
authored andcommitted
chore: internal change
PiperOrigin-RevId: 892964590
1 parent 86a9761 commit d6d0f89

20 files changed

+79
-84
lines changed

google/genai/_interactions/_exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ class APIError(GeminiNextGenAPIClientError):
4444
body: object | None
4545
"""The API response body.
4646
47-
If the API responded with a valid JSON structure then this property will be the decoded result.
47+
If the API responded with a valid JSON structure then this property will be the
48+
decoded result.
4849
4950
If it isn't a valid JSON structure then this will be the raw response.
5051

google/genai/_interactions/resources/interactions.py

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def create(
103103
104104
previous_interaction_id: The ID of the previous interaction, if any.
105105
106-
response_format: Enforces that the generated response is a JSON object that complies with
107-
the JSON schema specified in this field.
106+
response_format: Enforces that the generated response is a JSON object that complies with the
107+
JSON schema specified in this field.
108108
109109
response_mime_type: The mime type of the response. This is required if response_format is set.
110110
@@ -171,8 +171,8 @@ def create(
171171
172172
previous_interaction_id: The ID of the previous interaction, if any.
173173
174-
response_format: Enforces that the generated response is a JSON object that complies with
175-
the JSON schema specified in this field.
174+
response_format: Enforces that the generated response is a JSON object that complies with the
175+
JSON schema specified in this field.
176176
177177
response_mime_type: The mime type of the response. This is required if response_format is set.
178178
@@ -235,8 +235,8 @@ def create(
235235
236236
previous_interaction_id: The ID of the previous interaction, if any.
237237
238-
response_format: Enforces that the generated response is a JSON object that complies with
239-
the JSON schema specified in this field.
238+
response_format: Enforces that the generated response is a JSON object that complies with the
239+
JSON schema specified in this field.
240240
241241
response_mime_type: The mime type of the response. This is required if response_format is set.
242242
@@ -303,8 +303,8 @@ def create(
303303
304304
previous_interaction_id: The ID of the previous interaction, if any.
305305
306-
response_format: Enforces that the generated response is a JSON object that complies with
307-
the JSON schema specified in this field.
306+
response_format: Enforces that the generated response is a JSON object that complies with the
307+
JSON schema specified in this field.
308308
309309
response_mime_type: The mime type of the response. This is required if response_format is set.
310310
@@ -369,8 +369,8 @@ def create(
369369
370370
previous_interaction_id: The ID of the previous interaction, if any.
371371
372-
response_format: Enforces that the generated response is a JSON object that complies with
373-
the JSON schema specified in this field.
372+
response_format: Enforces that the generated response is a JSON object that complies with the
373+
JSON schema specified in this field.
374374
375375
response_mime_type: The mime type of the response. This is required if response_format is set.
376376
@@ -513,7 +513,8 @@ def cancel(
513513
) -> Interaction:
514514
"""Cancels an interaction by id.
515515
516-
This only applies to background interactions that are still running.
516+
This only applies to background interactions that
517+
are still running.
517518
518519
Args:
519520
extra_headers: Send extra headers
@@ -555,12 +556,14 @@ def get(
555556
timeout: float | httpx.Timeout | None | NotGiven = not_given,
556557
) -> Interaction:
557558
"""
558-
Retrieves the full details of a single interaction based on its `Interaction.id`.
559+
Retrieves the full details of a single interaction based on its
560+
`Interaction.id`.
559561
560562
Args:
561563
include_input: If set to true, includes the input in the response.
562564
563-
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true.
565+
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the
566+
event marked by the event id. Can only be used if `stream` is true.
564567
565568
stream: If set to true, the generated content will be streamed incrementally.
566569
@@ -591,14 +594,16 @@ def get(
591594
timeout: float | httpx.Timeout | None | NotGiven = not_given,
592595
) -> Stream[InteractionSSEEvent]:
593596
"""
594-
Retrieves the full details of a single interaction based on its `Interaction.id`.
597+
Retrieves the full details of a single interaction based on its
598+
`Interaction.id`.
595599
596600
Args:
597601
stream: If set to true, the generated content will be streamed incrementally.
598602
599603
include_input: If set to true, includes the input in the response.
600604
601-
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true.
605+
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the
606+
event marked by the event id. Can only be used if `stream` is true.
602607
603608
extra_headers: Send extra headers
604609
@@ -627,14 +632,16 @@ def get(
627632
timeout: float | httpx.Timeout | None | NotGiven = not_given,
628633
) -> Interaction | Stream[InteractionSSEEvent]:
629634
"""
630-
Retrieves the full details of a single interaction based on its `Interaction.id`.
635+
Retrieves the full details of a single interaction based on its
636+
`Interaction.id`.
631637
632638
Args:
633639
stream: If set to true, the generated content will be streamed incrementally.
634640
635641
include_input: If set to true, includes the input in the response.
636642
637-
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true.
643+
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the
644+
event marked by the event id. Can only be used if `stream` is true.
638645
639646
extra_headers: Send extra headers
640647
@@ -748,8 +755,8 @@ async def create(
748755
749756
previous_interaction_id: The ID of the previous interaction, if any.
750757
751-
response_format: Enforces that the generated response is a JSON object that complies with
752-
the JSON schema specified in this field.
758+
response_format: Enforces that the generated response is a JSON object that complies with the
759+
JSON schema specified in this field.
753760
754761
response_mime_type: The mime type of the response. This is required if response_format is set.
755762
@@ -816,8 +823,8 @@ async def create(
816823
817824
previous_interaction_id: The ID of the previous interaction, if any.
818825
819-
response_format: Enforces that the generated response is a JSON object that complies with
820-
the JSON schema specified in this field.
826+
response_format: Enforces that the generated response is a JSON object that complies with the
827+
JSON schema specified in this field.
821828
822829
response_mime_type: The mime type of the response. This is required if response_format is set.
823830
@@ -880,8 +887,8 @@ async def create(
880887
881888
previous_interaction_id: The ID of the previous interaction, if any.
882889
883-
response_format: Enforces that the generated response is a JSON object that complies with
884-
the JSON schema specified in this field.
890+
response_format: Enforces that the generated response is a JSON object that complies with the
891+
JSON schema specified in this field.
885892
886893
response_mime_type: The mime type of the response. This is required if response_format is set.
887894
@@ -948,8 +955,8 @@ async def create(
948955
949956
previous_interaction_id: The ID of the previous interaction, if any.
950957
951-
response_format: Enforces that the generated response is a JSON object that complies with
952-
the JSON schema specified in this field.
958+
response_format: Enforces that the generated response is a JSON object that complies with the
959+
JSON schema specified in this field.
953960
954961
response_mime_type: The mime type of the response. This is required if response_format is set.
955962
@@ -1014,8 +1021,8 @@ async def create(
10141021
10151022
previous_interaction_id: The ID of the previous interaction, if any.
10161023
1017-
response_format: Enforces that the generated response is a JSON object that complies with
1018-
the JSON schema specified in this field.
1024+
response_format: Enforces that the generated response is a JSON object that complies with the
1025+
JSON schema specified in this field.
10191026
10201027
response_mime_type: The mime type of the response. This is required if response_format is set.
10211028
@@ -1158,7 +1165,8 @@ async def cancel(
11581165
) -> Interaction:
11591166
"""Cancels an interaction by id.
11601167
1161-
This only applies to background interactions that are still running.
1168+
This only applies to background interactions that
1169+
are still running.
11621170
11631171
Args:
11641172
extra_headers: Send extra headers
@@ -1200,12 +1208,14 @@ async def get(
12001208
timeout: float | httpx.Timeout | None | NotGiven = not_given,
12011209
) -> Interaction:
12021210
"""
1203-
Retrieves the full details of a single interaction based on its `Interaction.id`.
1211+
Retrieves the full details of a single interaction based on its
1212+
`Interaction.id`.
12041213
12051214
Args:
12061215
include_input: If set to true, includes the input in the response.
12071216
1208-
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true.
1217+
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the
1218+
event marked by the event id. Can only be used if `stream` is true.
12091219
12101220
stream: If set to true, the generated content will be streamed incrementally.
12111221
@@ -1236,14 +1246,16 @@ async def get(
12361246
timeout: float | httpx.Timeout | None | NotGiven = not_given,
12371247
) -> AsyncStream[InteractionSSEEvent]:
12381248
"""
1239-
Retrieves the full details of a single interaction based on its `Interaction.id`.
1249+
Retrieves the full details of a single interaction based on its
1250+
`Interaction.id`.
12401251
12411252
Args:
12421253
stream: If set to true, the generated content will be streamed incrementally.
12431254
12441255
include_input: If set to true, includes the input in the response.
12451256
1246-
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true.
1257+
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the
1258+
event marked by the event id. Can only be used if `stream` is true.
12471259
12481260
extra_headers: Send extra headers
12491261
@@ -1272,14 +1284,16 @@ async def get(
12721284
timeout: float | httpx.Timeout | None | NotGiven = not_given,
12731285
) -> Interaction | AsyncStream[InteractionSSEEvent]:
12741286
"""
1275-
Retrieves the full details of a single interaction based on its `Interaction.id`.
1287+
Retrieves the full details of a single interaction based on its
1288+
`Interaction.id`.
12761289
12771290
Args:
12781291
stream: If set to true, the generated content will be streamed incrementally.
12791292
12801293
include_input: If set to true, includes the input in the response.
12811294
1282-
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true.
1295+
last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the
1296+
event marked by the event id. Can only be used if `stream` is true.
12831297
12841298
extra_headers: Send extra headers
12851299

google/genai/_interactions/types/content_delta.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,5 @@ class ContentDelta(BaseModel):
406406

407407
event_id: Optional[str] = None
408408
"""
409-
The event_id token to be used to resume the interaction stream, from
410-
this event.
409+
The event_id token to be used to resume the interaction stream, from this event.
411410
"""

google/genai/_interactions/types/content_start.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,5 @@ class ContentStart(BaseModel):
3434

3535
event_id: Optional[str] = None
3636
"""
37-
The event_id token to be used to resume the interaction stream, from
38-
this event.
37+
The event_id token to be used to resume the interaction stream, from this event.
3938
"""

google/genai/_interactions/types/content_stop.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,5 @@ class ContentStop(BaseModel):
3030

3131
event_id: Optional[str] = None
3232
"""
33-
The event_id token to be used to resume the interaction stream, from
34-
this event.
33+
The event_id token to be used to resume the interaction stream, from this event.
3534
"""

google/genai/_interactions/types/error_event.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,5 @@ class ErrorEvent(BaseModel):
4141

4242
event_id: Optional[str] = None
4343
"""
44-
The event_id token to be used to resume the interaction stream, from
45-
this event.
44+
The event_id token to be used to resume the interaction stream, from this event.
4645
"""

google/genai/_interactions/types/google_maps_result.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class Place(BaseModel):
4747

4848
review_snippets: Optional[List[PlaceReviewSnippet]] = None
4949
"""
50-
Snippets of reviews that are used to generate answers about the
51-
features of a given place in Google Maps.
50+
Snippets of reviews that are used to generate answers about the features of a
51+
given place in Google Maps.
5252
"""
5353

5454
url: Optional[str] = None

google/genai/_interactions/types/google_maps_result_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class Place(TypedDict, total=False):
4848

4949
review_snippets: Iterable[PlaceReviewSnippet]
5050
"""
51-
Snippets of reviews that are used to generate answers about the
52-
features of a given place in Google Maps.
51+
Snippets of reviews that are used to generate answers about the features of a
52+
given place in Google Maps.
5353
"""
5454

5555
url: str

google/genai/_interactions/types/interaction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ class Interaction(BaseModel):
125125

126126
response_format: Optional[object] = None
127127
"""
128-
Enforces that the generated response is a JSON object that complies with
129-
the JSON schema specified in this field.
128+
Enforces that the generated response is a JSON object that complies with the
129+
JSON schema specified in this field.
130130
"""
131131

132132
response_mime_type: Optional[str] = None

google/genai/_interactions/types/interaction_complete_event.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ class InteractionCompleteEvent(BaseModel):
3030
interaction: Interaction
3131
"""Required.
3232
33-
The completed interaction with empty outputs to reduce the payload size.
34-
Use the preceding ContentDelta events for the actual output.
33+
The completed interaction with empty outputs to reduce the payload size. Use the
34+
preceding ContentDelta events for the actual output.
3535
"""
3636

3737
event_id: Optional[str] = None
3838
"""
39-
The event_id token to be used to resume the interaction stream, from
40-
this event.
39+
The event_id token to be used to resume the interaction stream, from this event.
4140
"""

0 commit comments

Comments
 (0)