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.
- google/genai/__init__.py +1 -0
- google/genai/_interactions/__init__.py +117 -0
- google/genai/_interactions/_base_client.py +2025 -0
- google/genai/_interactions/_client.py +511 -0
- google/genai/_interactions/_compat.py +234 -0
- google/genai/_interactions/_constants.py +29 -0
- google/genai/_interactions/_exceptions.py +122 -0
- google/genai/_interactions/_files.py +139 -0
- google/genai/_interactions/_models.py +873 -0
- google/genai/_interactions/_qs.py +165 -0
- google/genai/_interactions/_resource.py +58 -0
- google/genai/_interactions/_response.py +847 -0
- google/genai/_interactions/_streaming.py +354 -0
- google/genai/_interactions/_types.py +276 -0
- google/genai/_interactions/_utils/__init__.py +79 -0
- google/genai/_interactions/_utils/_compat.py +61 -0
- google/genai/_interactions/_utils/_datetime_parse.py +151 -0
- google/genai/_interactions/_utils/_logs.py +40 -0
- google/genai/_interactions/_utils/_proxy.py +80 -0
- google/genai/_interactions/_utils/_reflection.py +57 -0
- google/genai/_interactions/_utils/_resources_proxy.py +39 -0
- google/genai/_interactions/_utils/_streams.py +27 -0
- google/genai/_interactions/_utils/_sync.py +73 -0
- google/genai/_interactions/_utils/_transform.py +472 -0
- google/genai/_interactions/_utils/_typing.py +172 -0
- google/genai/_interactions/_utils/_utils.py +437 -0
- google/genai/_interactions/_version.py +18 -0
- google/genai/_interactions/py.typed +0 -0
- google/genai/_interactions/resources/__init__.py +34 -0
- google/genai/_interactions/resources/interactions.py +1350 -0
- google/genai/_interactions/types/__init__.py +109 -0
- google/genai/_interactions/types/allowed_tools.py +33 -0
- google/genai/_interactions/types/allowed_tools_param.py +35 -0
- google/genai/_interactions/types/annotation.py +42 -0
- google/genai/_interactions/types/annotation_param.py +42 -0
- google/genai/_interactions/types/audio_content.py +37 -0
- google/genai/_interactions/types/audio_content_param.py +44 -0
- google/genai/_interactions/types/audio_mime_type.py +25 -0
- google/genai/_interactions/types/audio_mime_type_param.py +27 -0
- google/genai/_interactions/types/code_execution_call_arguments.py +33 -0
- google/genai/_interactions/types/code_execution_call_arguments_param.py +32 -0
- google/genai/_interactions/types/code_execution_call_content.py +36 -0
- google/genai/_interactions/types/code_execution_call_content_param.py +36 -0
- google/genai/_interactions/types/code_execution_result_content.py +41 -0
- google/genai/_interactions/types/code_execution_result_content_param.py +40 -0
- google/genai/_interactions/types/content_delta.py +342 -0
- google/genai/_interactions/types/content_start.py +79 -0
- google/genai/_interactions/types/content_stop.py +35 -0
- google/genai/_interactions/types/deep_research_agent_config.py +32 -0
- google/genai/_interactions/types/deep_research_agent_config_param.py +31 -0
- google/genai/_interactions/types/document_content.py +37 -0
- google/genai/_interactions/types/document_content_param.py +44 -0
- google/genai/_interactions/types/document_mime_type.py +23 -0
- google/genai/_interactions/types/document_mime_type_param.py +25 -0
- google/genai/_interactions/types/dynamic_agent_config.py +43 -0
- google/genai/_interactions/types/dynamic_agent_config_param.py +32 -0
- google/genai/_interactions/types/error_event.py +46 -0
- google/genai/_interactions/types/file_search_result_content.py +45 -0
- google/genai/_interactions/types/file_search_result_content_param.py +45 -0
- google/genai/_interactions/types/function.py +38 -0
- google/genai/_interactions/types/function_call_content.py +38 -0
- google/genai/_interactions/types/function_call_content_param.py +38 -0
- google/genai/_interactions/types/function_param.py +37 -0
- google/genai/_interactions/types/function_result_content.py +51 -0
- google/genai/_interactions/types/function_result_content_param.py +53 -0
- google/genai/_interactions/types/generation_config.py +57 -0
- google/genai/_interactions/types/generation_config_param.py +59 -0
- google/genai/_interactions/types/google_search_call_arguments.py +29 -0
- google/genai/_interactions/types/google_search_call_arguments_param.py +31 -0
- google/genai/_interactions/types/google_search_call_content.py +36 -0
- google/genai/_interactions/types/google_search_call_content_param.py +36 -0
- google/genai/_interactions/types/google_search_result.py +35 -0
- google/genai/_interactions/types/google_search_result_content.py +42 -0
- google/genai/_interactions/types/google_search_result_content_param.py +43 -0
- google/genai/_interactions/types/google_search_result_param.py +35 -0
- google/genai/_interactions/types/image_content.py +40 -0
- google/genai/_interactions/types/image_content_param.py +47 -0
- google/genai/_interactions/types/image_mime_type.py +23 -0
- google/genai/_interactions/types/image_mime_type_param.py +25 -0
- google/genai/_interactions/types/interaction.py +165 -0
- google/genai/_interactions/types/interaction_create_params.py +212 -0
- google/genai/_interactions/types/interaction_event.py +37 -0
- google/genai/_interactions/types/interaction_get_params.py +46 -0
- google/genai/_interactions/types/interaction_sse_event.py +32 -0
- google/genai/_interactions/types/interaction_status_update.py +37 -0
- google/genai/_interactions/types/mcp_server_tool_call_content.py +41 -0
- google/genai/_interactions/types/mcp_server_tool_call_content_param.py +41 -0
- google/genai/_interactions/types/mcp_server_tool_result_content.py +51 -0
- google/genai/_interactions/types/mcp_server_tool_result_content_param.py +53 -0
- google/genai/_interactions/types/model.py +36 -0
- google/genai/_interactions/types/model_param.py +38 -0
- google/genai/_interactions/types/speech_config.py +35 -0
- google/genai/_interactions/types/speech_config_param.py +35 -0
- google/genai/_interactions/types/text_content.py +36 -0
- google/genai/_interactions/types/text_content_param.py +37 -0
- google/genai/_interactions/types/thinking_level.py +22 -0
- google/genai/_interactions/types/thought_content.py +40 -0
- google/genai/_interactions/types/thought_content_param.py +46 -0
- google/genai/_interactions/types/tool.py +100 -0
- google/genai/_interactions/types/tool_choice.py +26 -0
- google/genai/_interactions/types/tool_choice_config.py +28 -0
- google/genai/_interactions/types/tool_choice_config_param.py +29 -0
- google/genai/_interactions/types/tool_choice_param.py +28 -0
- google/genai/_interactions/types/tool_choice_type.py +22 -0
- google/genai/_interactions/types/tool_param.py +97 -0
- google/genai/_interactions/types/turn.py +76 -0
- google/genai/_interactions/types/turn_param.py +73 -0
- google/genai/_interactions/types/url_context_call_arguments.py +29 -0
- google/genai/_interactions/types/url_context_call_arguments_param.py +31 -0
- google/genai/_interactions/types/url_context_call_content.py +36 -0
- google/genai/_interactions/types/url_context_call_content_param.py +36 -0
- google/genai/_interactions/types/url_context_result.py +33 -0
- google/genai/_interactions/types/url_context_result_content.py +42 -0
- google/genai/_interactions/types/url_context_result_content_param.py +43 -0
- google/genai/_interactions/types/url_context_result_param.py +32 -0
- google/genai/_interactions/types/usage.py +106 -0
- google/genai/_interactions/types/usage_param.py +106 -0
- google/genai/_interactions/types/video_content.py +40 -0
- google/genai/_interactions/types/video_content_param.py +47 -0
- google/genai/_interactions/types/video_mime_type.py +36 -0
- google/genai/_interactions/types/video_mime_type_param.py +38 -0
- google/genai/_live_converters.py +33 -30
- google/genai/_tokens_converters.py +5 -0
- google/genai/batches.py +7 -0
- google/genai/client.py +226 -1
- google/genai/interactions.py +17 -0
- google/genai/live.py +4 -3
- google/genai/models.py +14 -29
- google/genai/tunings.py +1 -27
- google/genai/types.py +92 -22
- google/genai/version.py +1 -1
- {google_genai-1.54.0.dist-info → google_genai-1.56.0.dist-info}/METADATA +226 -22
- google_genai-1.56.0.dist-info/RECORD +162 -0
- google_genai-1.54.0.dist-info/RECORD +0 -41
- {google_genai-1.54.0.dist-info → google_genai-1.56.0.dist-info}/WHEEL +0 -0
- {google_genai-1.54.0.dist-info → google_genai-1.56.0.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.54.0.dist-info → google_genai-1.56.0.dist-info}/top_level.txt +0 -0
google/genai/__init__.py
CHANGED
|
@@ -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
|