google-genai 1.54.0__py3-none-any.whl → 1.56.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. google/genai/__init__.py +1 -0
  2. google/genai/_interactions/__init__.py +117 -0
  3. google/genai/_interactions/_base_client.py +2025 -0
  4. google/genai/_interactions/_client.py +511 -0
  5. google/genai/_interactions/_compat.py +234 -0
  6. google/genai/_interactions/_constants.py +29 -0
  7. google/genai/_interactions/_exceptions.py +122 -0
  8. google/genai/_interactions/_files.py +139 -0
  9. google/genai/_interactions/_models.py +873 -0
  10. google/genai/_interactions/_qs.py +165 -0
  11. google/genai/_interactions/_resource.py +58 -0
  12. google/genai/_interactions/_response.py +847 -0
  13. google/genai/_interactions/_streaming.py +354 -0
  14. google/genai/_interactions/_types.py +276 -0
  15. google/genai/_interactions/_utils/__init__.py +79 -0
  16. google/genai/_interactions/_utils/_compat.py +61 -0
  17. google/genai/_interactions/_utils/_datetime_parse.py +151 -0
  18. google/genai/_interactions/_utils/_logs.py +40 -0
  19. google/genai/_interactions/_utils/_proxy.py +80 -0
  20. google/genai/_interactions/_utils/_reflection.py +57 -0
  21. google/genai/_interactions/_utils/_resources_proxy.py +39 -0
  22. google/genai/_interactions/_utils/_streams.py +27 -0
  23. google/genai/_interactions/_utils/_sync.py +73 -0
  24. google/genai/_interactions/_utils/_transform.py +472 -0
  25. google/genai/_interactions/_utils/_typing.py +172 -0
  26. google/genai/_interactions/_utils/_utils.py +437 -0
  27. google/genai/_interactions/_version.py +18 -0
  28. google/genai/_interactions/py.typed +0 -0
  29. google/genai/_interactions/resources/__init__.py +34 -0
  30. google/genai/_interactions/resources/interactions.py +1350 -0
  31. google/genai/_interactions/types/__init__.py +109 -0
  32. google/genai/_interactions/types/allowed_tools.py +33 -0
  33. google/genai/_interactions/types/allowed_tools_param.py +35 -0
  34. google/genai/_interactions/types/annotation.py +42 -0
  35. google/genai/_interactions/types/annotation_param.py +42 -0
  36. google/genai/_interactions/types/audio_content.py +37 -0
  37. google/genai/_interactions/types/audio_content_param.py +44 -0
  38. google/genai/_interactions/types/audio_mime_type.py +25 -0
  39. google/genai/_interactions/types/audio_mime_type_param.py +27 -0
  40. google/genai/_interactions/types/code_execution_call_arguments.py +33 -0
  41. google/genai/_interactions/types/code_execution_call_arguments_param.py +32 -0
  42. google/genai/_interactions/types/code_execution_call_content.py +36 -0
  43. google/genai/_interactions/types/code_execution_call_content_param.py +36 -0
  44. google/genai/_interactions/types/code_execution_result_content.py +41 -0
  45. google/genai/_interactions/types/code_execution_result_content_param.py +40 -0
  46. google/genai/_interactions/types/content_delta.py +342 -0
  47. google/genai/_interactions/types/content_start.py +79 -0
  48. google/genai/_interactions/types/content_stop.py +35 -0
  49. google/genai/_interactions/types/deep_research_agent_config.py +32 -0
  50. google/genai/_interactions/types/deep_research_agent_config_param.py +31 -0
  51. google/genai/_interactions/types/document_content.py +37 -0
  52. google/genai/_interactions/types/document_content_param.py +44 -0
  53. google/genai/_interactions/types/document_mime_type.py +23 -0
  54. google/genai/_interactions/types/document_mime_type_param.py +25 -0
  55. google/genai/_interactions/types/dynamic_agent_config.py +43 -0
  56. google/genai/_interactions/types/dynamic_agent_config_param.py +32 -0
  57. google/genai/_interactions/types/error_event.py +46 -0
  58. google/genai/_interactions/types/file_search_result_content.py +45 -0
  59. google/genai/_interactions/types/file_search_result_content_param.py +45 -0
  60. google/genai/_interactions/types/function.py +38 -0
  61. google/genai/_interactions/types/function_call_content.py +38 -0
  62. google/genai/_interactions/types/function_call_content_param.py +38 -0
  63. google/genai/_interactions/types/function_param.py +37 -0
  64. google/genai/_interactions/types/function_result_content.py +51 -0
  65. google/genai/_interactions/types/function_result_content_param.py +53 -0
  66. google/genai/_interactions/types/generation_config.py +57 -0
  67. google/genai/_interactions/types/generation_config_param.py +59 -0
  68. google/genai/_interactions/types/google_search_call_arguments.py +29 -0
  69. google/genai/_interactions/types/google_search_call_arguments_param.py +31 -0
  70. google/genai/_interactions/types/google_search_call_content.py +36 -0
  71. google/genai/_interactions/types/google_search_call_content_param.py +36 -0
  72. google/genai/_interactions/types/google_search_result.py +35 -0
  73. google/genai/_interactions/types/google_search_result_content.py +42 -0
  74. google/genai/_interactions/types/google_search_result_content_param.py +43 -0
  75. google/genai/_interactions/types/google_search_result_param.py +35 -0
  76. google/genai/_interactions/types/image_content.py +40 -0
  77. google/genai/_interactions/types/image_content_param.py +47 -0
  78. google/genai/_interactions/types/image_mime_type.py +23 -0
  79. google/genai/_interactions/types/image_mime_type_param.py +25 -0
  80. google/genai/_interactions/types/interaction.py +165 -0
  81. google/genai/_interactions/types/interaction_create_params.py +212 -0
  82. google/genai/_interactions/types/interaction_event.py +37 -0
  83. google/genai/_interactions/types/interaction_get_params.py +46 -0
  84. google/genai/_interactions/types/interaction_sse_event.py +32 -0
  85. google/genai/_interactions/types/interaction_status_update.py +37 -0
  86. google/genai/_interactions/types/mcp_server_tool_call_content.py +41 -0
  87. google/genai/_interactions/types/mcp_server_tool_call_content_param.py +41 -0
  88. google/genai/_interactions/types/mcp_server_tool_result_content.py +51 -0
  89. google/genai/_interactions/types/mcp_server_tool_result_content_param.py +53 -0
  90. google/genai/_interactions/types/model.py +36 -0
  91. google/genai/_interactions/types/model_param.py +38 -0
  92. google/genai/_interactions/types/speech_config.py +35 -0
  93. google/genai/_interactions/types/speech_config_param.py +35 -0
  94. google/genai/_interactions/types/text_content.py +36 -0
  95. google/genai/_interactions/types/text_content_param.py +37 -0
  96. google/genai/_interactions/types/thinking_level.py +22 -0
  97. google/genai/_interactions/types/thought_content.py +40 -0
  98. google/genai/_interactions/types/thought_content_param.py +46 -0
  99. google/genai/_interactions/types/tool.py +100 -0
  100. google/genai/_interactions/types/tool_choice.py +26 -0
  101. google/genai/_interactions/types/tool_choice_config.py +28 -0
  102. google/genai/_interactions/types/tool_choice_config_param.py +29 -0
  103. google/genai/_interactions/types/tool_choice_param.py +28 -0
  104. google/genai/_interactions/types/tool_choice_type.py +22 -0
  105. google/genai/_interactions/types/tool_param.py +97 -0
  106. google/genai/_interactions/types/turn.py +76 -0
  107. google/genai/_interactions/types/turn_param.py +73 -0
  108. google/genai/_interactions/types/url_context_call_arguments.py +29 -0
  109. google/genai/_interactions/types/url_context_call_arguments_param.py +31 -0
  110. google/genai/_interactions/types/url_context_call_content.py +36 -0
  111. google/genai/_interactions/types/url_context_call_content_param.py +36 -0
  112. google/genai/_interactions/types/url_context_result.py +33 -0
  113. google/genai/_interactions/types/url_context_result_content.py +42 -0
  114. google/genai/_interactions/types/url_context_result_content_param.py +43 -0
  115. google/genai/_interactions/types/url_context_result_param.py +32 -0
  116. google/genai/_interactions/types/usage.py +106 -0
  117. google/genai/_interactions/types/usage_param.py +106 -0
  118. google/genai/_interactions/types/video_content.py +40 -0
  119. google/genai/_interactions/types/video_content_param.py +47 -0
  120. google/genai/_interactions/types/video_mime_type.py +36 -0
  121. google/genai/_interactions/types/video_mime_type_param.py +38 -0
  122. google/genai/_live_converters.py +33 -30
  123. google/genai/_tokens_converters.py +5 -0
  124. google/genai/batches.py +7 -0
  125. google/genai/client.py +226 -1
  126. google/genai/interactions.py +17 -0
  127. google/genai/live.py +4 -3
  128. google/genai/models.py +14 -29
  129. google/genai/tunings.py +1 -27
  130. google/genai/types.py +92 -22
  131. google/genai/version.py +1 -1
  132. {google_genai-1.54.0.dist-info → google_genai-1.56.0.dist-info}/METADATA +226 -22
  133. google_genai-1.56.0.dist-info/RECORD +162 -0
  134. google_genai-1.54.0.dist-info/RECORD +0 -41
  135. {google_genai-1.54.0.dist-info → google_genai-1.56.0.dist-info}/WHEEL +0 -0
  136. {google_genai-1.54.0.dist-info → google_genai-1.56.0.dist-info}/licenses/LICENSE +0 -0
  137. {google_genai-1.54.0.dist-info → google_genai-1.56.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,342 @@
1
+ # Copyright 2025 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+
16
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
17
+
18
+ from typing import Dict, List, Union, Optional
19
+ from typing_extensions import Literal, Annotated, TypeAlias
20
+
21
+ from .._utils import PropertyInfo
22
+ from .._models import BaseModel
23
+ from .annotation import Annotation
24
+ from .text_content import TextContent
25
+ from .image_content import ImageContent
26
+ from .audio_mime_type import AudioMimeType
27
+ from .image_mime_type import ImageMimeType
28
+ from .video_mime_type import VideoMimeType
29
+ from .document_mime_type import DocumentMimeType
30
+ from .url_context_result import URLContextResult
31
+ from .google_search_result import GoogleSearchResult
32
+ from .url_context_call_arguments import URLContextCallArguments
33
+ from .google_search_call_arguments import GoogleSearchCallArguments
34
+ from .code_execution_call_arguments import CodeExecutionCallArguments
35
+
36
+ __all__ = [
37
+ "ContentDelta",
38
+ "Delta",
39
+ "DeltaTextDelta",
40
+ "DeltaImageDelta",
41
+ "DeltaAudioDelta",
42
+ "DeltaDocumentDelta",
43
+ "DeltaVideoDelta",
44
+ "DeltaThoughtSummaryDelta",
45
+ "DeltaThoughtSummaryDeltaContent",
46
+ "DeltaThoughtSignatureDelta",
47
+ "DeltaFunctionCallDelta",
48
+ "DeltaFunctionResultDelta",
49
+ "DeltaFunctionResultDeltaResult",
50
+ "DeltaFunctionResultDeltaResultItems",
51
+ "DeltaFunctionResultDeltaResultItemsItem",
52
+ "DeltaCodeExecutionCallDelta",
53
+ "DeltaCodeExecutionResultDelta",
54
+ "DeltaURLContextCallDelta",
55
+ "DeltaURLContextResultDelta",
56
+ "DeltaGoogleSearchCallDelta",
57
+ "DeltaGoogleSearchResultDelta",
58
+ "DeltaMCPServerToolCallDelta",
59
+ "DeltaMCPServerToolResultDelta",
60
+ "DeltaMCPServerToolResultDeltaResult",
61
+ "DeltaMCPServerToolResultDeltaResultItems",
62
+ "DeltaMCPServerToolResultDeltaResultItemsItem",
63
+ "DeltaFileSearchResultDelta",
64
+ "DeltaFileSearchResultDeltaResult",
65
+ ]
66
+
67
+
68
+ class DeltaTextDelta(BaseModel):
69
+ type: Literal["text"]
70
+
71
+ annotations: Optional[List[Annotation]] = None
72
+ """Citation information for model-generated content."""
73
+
74
+ text: Optional[str] = None
75
+
76
+
77
+ class DeltaImageDelta(BaseModel):
78
+ type: Literal["image"]
79
+
80
+ data: Optional[str] = None
81
+
82
+ mime_type: Optional[ImageMimeType] = None
83
+ """The mime type of the image."""
84
+
85
+ resolution: Optional[Literal["low", "medium", "high", "ultra_high"]] = None
86
+ """The resolution of the media."""
87
+
88
+ uri: Optional[str] = None
89
+
90
+
91
+ class DeltaAudioDelta(BaseModel):
92
+ type: Literal["audio"]
93
+
94
+ data: Optional[str] = None
95
+
96
+ mime_type: Optional[AudioMimeType] = None
97
+ """The mime type of the audio."""
98
+
99
+ uri: Optional[str] = None
100
+
101
+
102
+ class DeltaDocumentDelta(BaseModel):
103
+ type: Literal["document"]
104
+
105
+ data: Optional[str] = None
106
+
107
+ mime_type: Optional[DocumentMimeType] = None
108
+ """The mime type of the document."""
109
+
110
+ uri: Optional[str] = None
111
+
112
+
113
+ class DeltaVideoDelta(BaseModel):
114
+ type: Literal["video"]
115
+
116
+ data: Optional[str] = None
117
+
118
+ mime_type: Optional[VideoMimeType] = None
119
+ """The mime type of the video."""
120
+
121
+ resolution: Optional[Literal["low", "medium", "high", "ultra_high"]] = None
122
+ """The resolution of the media."""
123
+
124
+ uri: Optional[str] = None
125
+
126
+
127
+ DeltaThoughtSummaryDeltaContent: TypeAlias = Annotated[
128
+ Union[TextContent, ImageContent], PropertyInfo(discriminator="type")
129
+ ]
130
+
131
+
132
+ class DeltaThoughtSummaryDelta(BaseModel):
133
+ type: Literal["thought_summary"]
134
+
135
+ content: Optional[DeltaThoughtSummaryDeltaContent] = None
136
+ """A text content block."""
137
+
138
+
139
+ class DeltaThoughtSignatureDelta(BaseModel):
140
+ type: Literal["thought_signature"]
141
+
142
+ signature: Optional[str] = None
143
+ """Signature to match the backend source to be part of the generation."""
144
+
145
+
146
+ class DeltaFunctionCallDelta(BaseModel):
147
+ type: Literal["function_call"]
148
+
149
+ id: Optional[str] = None
150
+ """A unique ID for this specific tool call."""
151
+
152
+ arguments: Optional[Dict[str, object]] = None
153
+
154
+ name: Optional[str] = None
155
+
156
+
157
+ DeltaFunctionResultDeltaResultItemsItem: TypeAlias = Union[str, ImageContent, object]
158
+
159
+
160
+ class DeltaFunctionResultDeltaResultItems(BaseModel):
161
+ items: Optional[List[DeltaFunctionResultDeltaResultItemsItem]] = None
162
+
163
+
164
+ DeltaFunctionResultDeltaResult: TypeAlias = Union[DeltaFunctionResultDeltaResultItems, str]
165
+
166
+
167
+ class DeltaFunctionResultDelta(BaseModel):
168
+ type: Literal["function_result"]
169
+
170
+ call_id: Optional[str] = None
171
+ """ID to match the ID from the function call block."""
172
+
173
+ is_error: Optional[bool] = None
174
+
175
+ name: Optional[str] = None
176
+
177
+ result: Optional[DeltaFunctionResultDeltaResult] = None
178
+ """Tool call result delta."""
179
+
180
+
181
+ class DeltaCodeExecutionCallDelta(BaseModel):
182
+ type: Literal["code_execution_call"]
183
+
184
+ id: Optional[str] = None
185
+ """A unique ID for this specific tool call."""
186
+
187
+ arguments: Optional[CodeExecutionCallArguments] = None
188
+ """The arguments to pass to the code execution."""
189
+
190
+
191
+ class DeltaCodeExecutionResultDelta(BaseModel):
192
+ type: Literal["code_execution_result"]
193
+
194
+ call_id: Optional[str] = None
195
+ """ID to match the ID from the function call block."""
196
+
197
+ is_error: Optional[bool] = None
198
+
199
+ result: Optional[str] = None
200
+
201
+ signature: Optional[str] = None
202
+
203
+
204
+ class DeltaURLContextCallDelta(BaseModel):
205
+ type: Literal["url_context_call"]
206
+
207
+ id: Optional[str] = None
208
+ """A unique ID for this specific tool call."""
209
+
210
+ arguments: Optional[URLContextCallArguments] = None
211
+ """The arguments to pass to the URL context."""
212
+
213
+
214
+ class DeltaURLContextResultDelta(BaseModel):
215
+ type: Literal["url_context_result"]
216
+
217
+ call_id: Optional[str] = None
218
+ """ID to match the ID from the function call block."""
219
+
220
+ is_error: Optional[bool] = None
221
+
222
+ result: Optional[List[URLContextResult]] = None
223
+
224
+ signature: Optional[str] = None
225
+
226
+
227
+ class DeltaGoogleSearchCallDelta(BaseModel):
228
+ type: Literal["google_search_call"]
229
+
230
+ id: Optional[str] = None
231
+ """A unique ID for this specific tool call."""
232
+
233
+ arguments: Optional[GoogleSearchCallArguments] = None
234
+ """The arguments to pass to Google Search."""
235
+
236
+
237
+ class DeltaGoogleSearchResultDelta(BaseModel):
238
+ type: Literal["google_search_result"]
239
+
240
+ call_id: Optional[str] = None
241
+ """ID to match the ID from the function call block."""
242
+
243
+ is_error: Optional[bool] = None
244
+
245
+ result: Optional[List[GoogleSearchResult]] = None
246
+
247
+ signature: Optional[str] = None
248
+
249
+
250
+ class DeltaMCPServerToolCallDelta(BaseModel):
251
+ type: Literal["mcp_server_tool_call"]
252
+
253
+ id: Optional[str] = None
254
+ """A unique ID for this specific tool call."""
255
+
256
+ arguments: Optional[Dict[str, object]] = None
257
+
258
+ name: Optional[str] = None
259
+
260
+ server_name: Optional[str] = None
261
+
262
+
263
+ DeltaMCPServerToolResultDeltaResultItemsItem: TypeAlias = Union[str, ImageContent, object]
264
+
265
+
266
+ class DeltaMCPServerToolResultDeltaResultItems(BaseModel):
267
+ items: Optional[List[DeltaMCPServerToolResultDeltaResultItemsItem]] = None
268
+
269
+
270
+ DeltaMCPServerToolResultDeltaResult: TypeAlias = Union[DeltaMCPServerToolResultDeltaResultItems, str]
271
+
272
+
273
+ class DeltaMCPServerToolResultDelta(BaseModel):
274
+ type: Literal["mcp_server_tool_result"]
275
+
276
+ call_id: Optional[str] = None
277
+ """ID to match the ID from the function call block."""
278
+
279
+ name: Optional[str] = None
280
+
281
+ result: Optional[DeltaMCPServerToolResultDeltaResult] = None
282
+ """Tool call result delta."""
283
+
284
+ server_name: Optional[str] = None
285
+
286
+
287
+ class DeltaFileSearchResultDeltaResult(BaseModel):
288
+ """The result of the File Search."""
289
+
290
+ file_search_store: Optional[str] = None
291
+ """The name of the file search store."""
292
+
293
+ text: Optional[str] = None
294
+ """The text of the search result."""
295
+
296
+ title: Optional[str] = None
297
+ """The title of the search result."""
298
+
299
+
300
+ class DeltaFileSearchResultDelta(BaseModel):
301
+ type: Literal["file_search_result"]
302
+
303
+ result: Optional[List[DeltaFileSearchResultDeltaResult]] = None
304
+
305
+
306
+ Delta: TypeAlias = Annotated[
307
+ Union[
308
+ DeltaTextDelta,
309
+ DeltaImageDelta,
310
+ DeltaAudioDelta,
311
+ DeltaDocumentDelta,
312
+ DeltaVideoDelta,
313
+ DeltaThoughtSummaryDelta,
314
+ DeltaThoughtSignatureDelta,
315
+ DeltaFunctionCallDelta,
316
+ DeltaFunctionResultDelta,
317
+ DeltaCodeExecutionCallDelta,
318
+ DeltaCodeExecutionResultDelta,
319
+ DeltaURLContextCallDelta,
320
+ DeltaURLContextResultDelta,
321
+ DeltaGoogleSearchCallDelta,
322
+ DeltaGoogleSearchResultDelta,
323
+ DeltaMCPServerToolCallDelta,
324
+ DeltaMCPServerToolResultDelta,
325
+ DeltaFileSearchResultDelta,
326
+ ],
327
+ PropertyInfo(discriminator="type"),
328
+ ]
329
+
330
+
331
+ class ContentDelta(BaseModel):
332
+ delta: Optional[Delta] = None
333
+
334
+ event_id: Optional[str] = None
335
+ """
336
+ The event_id token to be used to resume the interaction stream, from
337
+ this event.
338
+ """
339
+
340
+ event_type: Optional[Literal["content.delta"]] = None
341
+
342
+ index: Optional[int] = None
@@ -0,0 +1,79 @@
1
+ # Copyright 2025 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+
16
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
17
+
18
+ from typing import Union, Optional
19
+ from typing_extensions import Literal, Annotated, TypeAlias
20
+
21
+ from .._utils import PropertyInfo
22
+ from .._models import BaseModel
23
+ from .text_content import TextContent
24
+ from .audio_content import AudioContent
25
+ from .image_content import ImageContent
26
+ from .video_content import VideoContent
27
+ from .thought_content import ThoughtContent
28
+ from .document_content import DocumentContent
29
+ from .function_call_content import FunctionCallContent
30
+ from .function_result_content import FunctionResultContent
31
+ from .url_context_call_content import URLContextCallContent
32
+ from .file_search_result_content import FileSearchResultContent
33
+ from .google_search_call_content import GoogleSearchCallContent
34
+ from .url_context_result_content import URLContextResultContent
35
+ from .code_execution_call_content import CodeExecutionCallContent
36
+ from .google_search_result_content import GoogleSearchResultContent
37
+ from .mcp_server_tool_call_content import MCPServerToolCallContent
38
+ from .code_execution_result_content import CodeExecutionResultContent
39
+ from .mcp_server_tool_result_content import MCPServerToolResultContent
40
+
41
+ __all__ = ["ContentStart", "Content"]
42
+
43
+ Content: TypeAlias = Annotated[
44
+ Union[
45
+ TextContent,
46
+ ImageContent,
47
+ AudioContent,
48
+ DocumentContent,
49
+ VideoContent,
50
+ ThoughtContent,
51
+ FunctionCallContent,
52
+ FunctionResultContent,
53
+ CodeExecutionCallContent,
54
+ CodeExecutionResultContent,
55
+ URLContextCallContent,
56
+ URLContextResultContent,
57
+ GoogleSearchCallContent,
58
+ GoogleSearchResultContent,
59
+ MCPServerToolCallContent,
60
+ MCPServerToolResultContent,
61
+ FileSearchResultContent,
62
+ ],
63
+ PropertyInfo(discriminator="type"),
64
+ ]
65
+
66
+
67
+ class ContentStart(BaseModel):
68
+ content: Optional[Content] = None
69
+ """The content of the response."""
70
+
71
+ event_id: Optional[str] = None
72
+ """
73
+ The event_id token to be used to resume the interaction stream, from
74
+ this event.
75
+ """
76
+
77
+ event_type: Optional[Literal["content.start"]] = None
78
+
79
+ index: Optional[int] = None
@@ -0,0 +1,35 @@
1
+ # Copyright 2025 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+
16
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
17
+
18
+ from typing import Optional
19
+ from typing_extensions import Literal
20
+
21
+ from .._models import BaseModel
22
+
23
+ __all__ = ["ContentStop"]
24
+
25
+
26
+ class ContentStop(BaseModel):
27
+ event_id: Optional[str] = None
28
+ """
29
+ The event_id token to be used to resume the interaction stream, from
30
+ this event.
31
+ """
32
+
33
+ event_type: Optional[Literal["content.stop"]] = None
34
+
35
+ index: Optional[int] = None
@@ -0,0 +1,32 @@
1
+ # Copyright 2025 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+
16
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
17
+
18
+ from typing import Optional
19
+ from typing_extensions import Literal
20
+
21
+ from .._models import BaseModel
22
+
23
+ __all__ = ["DeepResearchAgentConfig"]
24
+
25
+
26
+ class DeepResearchAgentConfig(BaseModel):
27
+ """Configuration for the Deep Research agent."""
28
+
29
+ thinking_summaries: Optional[Literal["auto", "none"]] = None
30
+ """Whether to include thought summaries in the response."""
31
+
32
+ type: Optional[Literal["deep-research"]] = None
@@ -0,0 +1,31 @@
1
+ # Copyright 2025 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+
16
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
17
+
18
+ from __future__ import annotations
19
+
20
+ from typing_extensions import Literal, TypedDict
21
+
22
+ __all__ = ["DeepResearchAgentConfigParam"]
23
+
24
+
25
+ class DeepResearchAgentConfigParam(TypedDict, total=False):
26
+ """Configuration for the Deep Research agent."""
27
+
28
+ thinking_summaries: Literal["auto", "none"]
29
+ """Whether to include thought summaries in the response."""
30
+
31
+ type: Literal["deep-research"]
@@ -0,0 +1,37 @@
1
+ # Copyright 2025 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+
16
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
17
+
18
+ from typing import Optional
19
+ from typing_extensions import Literal
20
+
21
+ from .._models import BaseModel
22
+ from .document_mime_type import DocumentMimeType
23
+
24
+ __all__ = ["DocumentContent"]
25
+
26
+
27
+ class DocumentContent(BaseModel):
28
+ """A document content block."""
29
+
30
+ type: Literal["document"]
31
+
32
+ data: Optional[str] = None
33
+
34
+ mime_type: Optional[DocumentMimeType] = None
35
+ """The mime type of the document."""
36
+
37
+ uri: Optional[str] = None
@@ -0,0 +1,44 @@
1
+ # Copyright 2025 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+
16
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
17
+
18
+ from __future__ import annotations
19
+
20
+ from typing import Union
21
+ from typing_extensions import Literal, Required, Annotated, TypedDict
22
+
23
+ from .._types import Base64FileInput
24
+ from .._utils import PropertyInfo
25
+ from .._models import set_pydantic_config
26
+ from .document_mime_type_param import DocumentMimeTypeParam
27
+
28
+ __all__ = ["DocumentContentParam"]
29
+
30
+
31
+ class DocumentContentParam(TypedDict, total=False):
32
+ """A document content block."""
33
+
34
+ type: Required[Literal["document"]]
35
+
36
+ data: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
37
+
38
+ mime_type: DocumentMimeTypeParam
39
+ """The mime type of the document."""
40
+
41
+ uri: str
42
+
43
+
44
+ set_pydantic_config(DocumentContentParam, {"arbitrary_types_allowed": True})
@@ -0,0 +1,23 @@
1
+ # Copyright 2025 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+
16
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
17
+
18
+ from typing import Union
19
+ from typing_extensions import Literal, TypeAlias
20
+
21
+ __all__ = ["DocumentMimeType"]
22
+
23
+ DocumentMimeType: TypeAlias = Union[str, Literal["application/pdf"]]
@@ -0,0 +1,25 @@
1
+ # Copyright 2025 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+
16
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
17
+
18
+ from __future__ import annotations
19
+
20
+ from typing import Union
21
+ from typing_extensions import Literal, TypeAlias
22
+
23
+ __all__ = ["DocumentMimeTypeParam"]
24
+
25
+ DocumentMimeTypeParam: TypeAlias = Union[str, Literal["application/pdf"]]
@@ -0,0 +1,43 @@
1
+ # Copyright 2025 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+
16
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
17
+
18
+ from typing import TYPE_CHECKING, Dict, Optional
19
+ from typing_extensions import Literal
20
+
21
+ from pydantic import Field as FieldInfo
22
+
23
+ from .._models import BaseModel
24
+
25
+ __all__ = ["DynamicAgentConfig"]
26
+
27
+
28
+ class DynamicAgentConfig(BaseModel):
29
+ """Configuration for dynamic agents."""
30
+
31
+ type: Optional[Literal["dynamic"]] = None
32
+
33
+ if TYPE_CHECKING:
34
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
35
+ # value to this field, so for compatibility we avoid doing it at runtime.
36
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
37
+
38
+ # Stub to indicate that arbitrary properties are accepted.
39
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
40
+ # `getattr(obj, '$type')`
41
+ def __getattr__(self, attr: str) -> object: ...
42
+ else:
43
+ __pydantic_extra__: Dict[str, object]