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
google/genai/__init__.py CHANGED
@@ -15,6 +15,7 @@
15
15
 
16
16
  """Google Gen AI SDK"""
17
17
 
18
+ from . import interactions
18
19
  from . import types
19
20
  from . import version
20
21
  from .client import Client
@@ -0,0 +1,117 @@
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
+ import typing as _t
19
+
20
+ from . import types
21
+ from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
22
+ from ._utils import file_from_path
23
+ from ._client import (
24
+ Client,
25
+ Stream,
26
+ Timeout,
27
+ Transport,
28
+ AsyncClient,
29
+ AsyncStream,
30
+ RequestOptions,
31
+ GeminiNextGenAPIClient,
32
+ AsyncGeminiNextGenAPIClient,
33
+ )
34
+ from ._models import BaseModel
35
+ from ._version import __title__, __version__
36
+ from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse
37
+ from ._constants import DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_CONNECTION_LIMITS
38
+ from ._exceptions import (
39
+ APIError,
40
+ ConflictError,
41
+ NotFoundError,
42
+ APIStatusError,
43
+ RateLimitError,
44
+ APITimeoutError,
45
+ BadRequestError,
46
+ APIConnectionError,
47
+ AuthenticationError,
48
+ InternalServerError,
49
+ PermissionDeniedError,
50
+ UnprocessableEntityError,
51
+ APIResponseValidationError,
52
+ GeminiNextGenAPIClientError,
53
+ )
54
+ from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient
55
+ from ._utils._logs import setup_logging as _setup_logging
56
+
57
+ __all__ = [
58
+ "types",
59
+ "__version__",
60
+ "__title__",
61
+ "NoneType",
62
+ "Transport",
63
+ "ProxiesTypes",
64
+ "NotGiven",
65
+ "NOT_GIVEN",
66
+ "not_given",
67
+ "Omit",
68
+ "omit",
69
+ "GeminiNextGenAPIClientError",
70
+ "APIError",
71
+ "APIStatusError",
72
+ "APITimeoutError",
73
+ "APIConnectionError",
74
+ "APIResponseValidationError",
75
+ "BadRequestError",
76
+ "AuthenticationError",
77
+ "PermissionDeniedError",
78
+ "NotFoundError",
79
+ "ConflictError",
80
+ "UnprocessableEntityError",
81
+ "RateLimitError",
82
+ "InternalServerError",
83
+ "Timeout",
84
+ "RequestOptions",
85
+ "Client",
86
+ "AsyncClient",
87
+ "Stream",
88
+ "AsyncStream",
89
+ "GeminiNextGenAPIClient",
90
+ "AsyncGeminiNextGenAPIClient",
91
+ "file_from_path",
92
+ "BaseModel",
93
+ "DEFAULT_TIMEOUT",
94
+ "DEFAULT_MAX_RETRIES",
95
+ "DEFAULT_CONNECTION_LIMITS",
96
+ "DefaultHttpxClient",
97
+ "DefaultAsyncHttpxClient",
98
+ "DefaultAioHttpClient",
99
+ ]
100
+
101
+ if not _t.TYPE_CHECKING:
102
+ from ._utils._resources_proxy import resources as resources
103
+
104
+ _setup_logging()
105
+
106
+ # Update the __module__ attribute for exported symbols so that
107
+ # error messages point to this module instead of the module
108
+ # it was originally defined in, e.g.
109
+ # google.genai._interactions._exceptions.NotFoundError -> google.genai._interactions.NotFoundError
110
+ __locals = locals()
111
+ for __name in __all__:
112
+ if not __name.startswith("__"):
113
+ try:
114
+ __locals[__name].__module__ = "google.genai._interactions"
115
+ except (TypeError, AttributeError):
116
+ # Some of our exported symbols are builtins which we can't set attributes for.
117
+ pass