google-genai 1.18.0__py3-none-any.whl → 1.20.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/_api_client.py +367 -102
- google/genai/_common.py +15 -1
- google/genai/_live_converters.py +7 -1
- google/genai/_replay_api_client.py +1 -6
- google/genai/_tokens_converters.py +7 -1
- google/genai/batches.py +1 -0
- google/genai/caches.py +8 -1
- google/genai/chats.py +5 -10
- google/genai/errors.py +32 -6
- google/genai/files.py +8 -4
- google/genai/models.py +124 -8
- google/genai/operations.py +1 -0
- google/genai/tokens.py +7 -2
- google/genai/tunings.py +1 -0
- google/genai/types.py +209 -88
- google/genai/version.py +1 -1
- {google_genai-1.18.0.dist-info → google_genai-1.20.0.dist-info}/METADATA +3 -1
- google_genai-1.20.0.dist-info/RECORD +35 -0
- google_genai-1.18.0.dist-info/RECORD +0 -35
- {google_genai-1.18.0.dist-info → google_genai-1.20.0.dist-info}/WHEEL +0 -0
- {google_genai-1.18.0.dist-info → google_genai-1.20.0.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.18.0.dist-info → google_genai-1.20.0.dist-info}/top_level.txt +0 -0
google/genai/types.py
CHANGED
@@ -59,17 +59,21 @@ _is_mcp_imported = False
|
|
59
59
|
if typing.TYPE_CHECKING:
|
60
60
|
from mcp import types as mcp_types
|
61
61
|
from mcp import ClientSession as McpClientSession
|
62
|
+
from mcp.types import CallToolResult as McpCallToolResult
|
62
63
|
|
63
64
|
_is_mcp_imported = True
|
64
65
|
else:
|
65
66
|
McpClientSession: typing.Type = Any
|
67
|
+
McpCallToolResult: typing.Type = Any
|
66
68
|
try:
|
67
69
|
from mcp import types as mcp_types
|
68
70
|
from mcp import ClientSession as McpClientSession
|
71
|
+
from mcp.types import CallToolResult as McpCallToolResult
|
69
72
|
|
70
73
|
_is_mcp_imported = True
|
71
74
|
except ImportError:
|
72
75
|
McpClientSession = None
|
76
|
+
McpCallToolResult = None
|
73
77
|
|
74
78
|
logger = logging.getLogger('google_genai.types')
|
75
79
|
|
@@ -845,6 +849,21 @@ class FunctionResponse(_common.BaseModel):
|
|
845
849
|
description="""Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output.""",
|
846
850
|
)
|
847
851
|
|
852
|
+
@classmethod
|
853
|
+
def from_mcp_response(
|
854
|
+
cls, *, name: str, response: McpCallToolResult
|
855
|
+
) -> 'FunctionResponse':
|
856
|
+
if not _is_mcp_imported:
|
857
|
+
raise ValueError(
|
858
|
+
'MCP response is not supported. Please ensure that the MCP library is'
|
859
|
+
' imported.'
|
860
|
+
)
|
861
|
+
|
862
|
+
if response.isError:
|
863
|
+
return cls(name=name, response={'error': 'MCP response is error.'})
|
864
|
+
else:
|
865
|
+
return cls(name=name, response={'result': response.content})
|
866
|
+
|
848
867
|
|
849
868
|
class FunctionResponseDict(TypedDict, total=False):
|
850
869
|
"""A function response."""
|
@@ -1925,12 +1944,16 @@ class FunctionDeclaration(_common.BaseModel):
|
|
1925
1944
|
from . import _automatic_function_calling_util
|
1926
1945
|
|
1927
1946
|
parameters_properties = {}
|
1947
|
+
annotation_under_future = typing.get_type_hints(callable)
|
1928
1948
|
for name, param in inspect.signature(callable).parameters.items():
|
1929
1949
|
if param.kind in (
|
1930
1950
|
inspect.Parameter.POSITIONAL_OR_KEYWORD,
|
1931
1951
|
inspect.Parameter.KEYWORD_ONLY,
|
1932
1952
|
inspect.Parameter.POSITIONAL_ONLY,
|
1933
1953
|
):
|
1954
|
+
# This snippet catches the case when type hints are stored as strings
|
1955
|
+
if isinstance(param.annotation, str):
|
1956
|
+
param = param.replace(annotation=annotation_under_future[name])
|
1934
1957
|
schema = _automatic_function_calling_util._parse_schema_from_parameter(
|
1935
1958
|
api_option, param, callable.__name__
|
1936
1959
|
)
|
@@ -1952,6 +1975,7 @@ class FunctionDeclaration(_common.BaseModel):
|
|
1952
1975
|
declaration.parameters
|
1953
1976
|
)
|
1954
1977
|
)
|
1978
|
+
# TODO: b/421991354 - Remove this check once the bug is fixed.
|
1955
1979
|
if api_option == 'GEMINI_API':
|
1956
1980
|
return declaration
|
1957
1981
|
|
@@ -1959,14 +1983,21 @@ class FunctionDeclaration(_common.BaseModel):
|
|
1959
1983
|
if return_annotation is inspect._empty:
|
1960
1984
|
return declaration
|
1961
1985
|
|
1986
|
+
return_value = inspect.Parameter(
|
1987
|
+
'return_value',
|
1988
|
+
inspect.Parameter.POSITIONAL_OR_KEYWORD,
|
1989
|
+
annotation=return_annotation,
|
1990
|
+
)
|
1991
|
+
|
1992
|
+
# This snippet catches the case when type hints are stored as strings
|
1993
|
+
if isinstance(return_value.annotation, str):
|
1994
|
+
return_value = return_value.replace(
|
1995
|
+
annotation=annotation_under_future['return']
|
1996
|
+
)
|
1962
1997
|
declaration.response = (
|
1963
1998
|
_automatic_function_calling_util._parse_schema_from_parameter(
|
1964
1999
|
api_option,
|
1965
|
-
|
1966
|
-
'return_value',
|
1967
|
-
inspect.Parameter.POSITIONAL_OR_KEYWORD,
|
1968
|
-
annotation=return_annotation,
|
1969
|
-
),
|
2000
|
+
return_value,
|
1970
2001
|
callable.__name__,
|
1971
2002
|
)
|
1972
2003
|
)
|
@@ -2344,6 +2375,42 @@ class UrlContextDict(TypedDict, total=False):
|
|
2344
2375
|
UrlContextOrDict = Union[UrlContext, UrlContextDict]
|
2345
2376
|
|
2346
2377
|
|
2378
|
+
class VertexAISearchDataStoreSpec(_common.BaseModel):
|
2379
|
+
"""Define data stores within engine to filter on in a search call and configurations for those data stores.
|
2380
|
+
|
2381
|
+
For more information, see
|
2382
|
+
https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
|
2383
|
+
"""
|
2384
|
+
|
2385
|
+
data_store: Optional[str] = Field(
|
2386
|
+
default=None,
|
2387
|
+
description="""Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`""",
|
2388
|
+
)
|
2389
|
+
filter: Optional[str] = Field(
|
2390
|
+
default=None,
|
2391
|
+
description="""Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)""",
|
2392
|
+
)
|
2393
|
+
|
2394
|
+
|
2395
|
+
class VertexAISearchDataStoreSpecDict(TypedDict, total=False):
|
2396
|
+
"""Define data stores within engine to filter on in a search call and configurations for those data stores.
|
2397
|
+
|
2398
|
+
For more information, see
|
2399
|
+
https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
|
2400
|
+
"""
|
2401
|
+
|
2402
|
+
data_store: Optional[str]
|
2403
|
+
"""Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`"""
|
2404
|
+
|
2405
|
+
filter: Optional[str]
|
2406
|
+
"""Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)"""
|
2407
|
+
|
2408
|
+
|
2409
|
+
VertexAISearchDataStoreSpecOrDict = Union[
|
2410
|
+
VertexAISearchDataStoreSpec, VertexAISearchDataStoreSpecDict
|
2411
|
+
]
|
2412
|
+
|
2413
|
+
|
2347
2414
|
class VertexAISearch(_common.BaseModel):
|
2348
2415
|
"""Retrieve from Vertex AI Search datastore or engine for grounding.
|
2349
2416
|
|
@@ -2351,6 +2418,10 @@ class VertexAISearch(_common.BaseModel):
|
|
2351
2418
|
https://cloud.google.com/products/agent-builder
|
2352
2419
|
"""
|
2353
2420
|
|
2421
|
+
data_store_specs: Optional[list[VertexAISearchDataStoreSpec]] = Field(
|
2422
|
+
default=None,
|
2423
|
+
description="""Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.""",
|
2424
|
+
)
|
2354
2425
|
datastore: Optional[str] = Field(
|
2355
2426
|
default=None,
|
2356
2427
|
description="""Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`""",
|
@@ -2376,6 +2447,9 @@ class VertexAISearchDict(TypedDict, total=False):
|
|
2376
2447
|
https://cloud.google.com/products/agent-builder
|
2377
2448
|
"""
|
2378
2449
|
|
2450
|
+
data_store_specs: Optional[list[VertexAISearchDataStoreSpecDict]]
|
2451
|
+
"""Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used."""
|
2452
|
+
|
2379
2453
|
datastore: Optional[str]
|
2380
2454
|
"""Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`"""
|
2381
2455
|
|
@@ -2601,6 +2675,10 @@ class VertexRagStore(_common.BaseModel):
|
|
2601
2675
|
default=None,
|
2602
2676
|
description="""Optional. Number of top k results to return from the selected corpora.""",
|
2603
2677
|
)
|
2678
|
+
store_context: Optional[bool] = Field(
|
2679
|
+
default=None,
|
2680
|
+
description="""Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users' ongoing and future interactions.""",
|
2681
|
+
)
|
2604
2682
|
vector_distance_threshold: Optional[float] = Field(
|
2605
2683
|
default=None,
|
2606
2684
|
description="""Optional. Only return results with vector distance smaller than the threshold.""",
|
@@ -2622,6 +2700,9 @@ class VertexRagStoreDict(TypedDict, total=False):
|
|
2622
2700
|
similarity_top_k: Optional[int]
|
2623
2701
|
"""Optional. Number of top k results to return from the selected corpora."""
|
2624
2702
|
|
2703
|
+
store_context: Optional[bool]
|
2704
|
+
"""Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users' ongoing and future interactions."""
|
2705
|
+
|
2625
2706
|
vector_distance_threshold: Optional[float]
|
2626
2707
|
"""Optional. Only return results with vector distance smaller than the threshold."""
|
2627
2708
|
|
@@ -6936,6 +7017,109 @@ ComputeTokensResponseOrDict = Union[
|
|
6936
7017
|
]
|
6937
7018
|
|
6938
7019
|
|
7020
|
+
class Video(_common.BaseModel):
|
7021
|
+
"""A generated video."""
|
7022
|
+
|
7023
|
+
uri: Optional[str] = Field(
|
7024
|
+
default=None, description="""Path to another storage."""
|
7025
|
+
)
|
7026
|
+
video_bytes: Optional[bytes] = Field(
|
7027
|
+
default=None, description="""Video bytes."""
|
7028
|
+
)
|
7029
|
+
mime_type: Optional[str] = Field(
|
7030
|
+
default=None, description="""Video encoding, for example "video/mp4"."""
|
7031
|
+
)
|
7032
|
+
|
7033
|
+
@classmethod
|
7034
|
+
def from_file(
|
7035
|
+
cls, *, location: str, mime_type: Optional[str] = None
|
7036
|
+
) -> 'Video':
|
7037
|
+
"""Loads a video from a local file.
|
7038
|
+
|
7039
|
+
Args:
|
7040
|
+
location: The local path to load the video from.
|
7041
|
+
mime_type: The MIME type of the video. If not provided, the MIME type
|
7042
|
+
will be automatically determined.
|
7043
|
+
|
7044
|
+
Returns:
|
7045
|
+
A loaded video as an `Video` object.
|
7046
|
+
"""
|
7047
|
+
import mimetypes # pylint: disable=g-import-not-at-top
|
7048
|
+
import pathlib # pylint: disable=g-import-not-at-top
|
7049
|
+
|
7050
|
+
video_bytes = pathlib.Path(location).read_bytes()
|
7051
|
+
|
7052
|
+
if not mime_type:
|
7053
|
+
mime_type, _ = mimetypes.guess_type(location)
|
7054
|
+
video = cls(video_bytes=video_bytes, mime_type=mime_type)
|
7055
|
+
return video
|
7056
|
+
|
7057
|
+
def save(
|
7058
|
+
self,
|
7059
|
+
path: str,
|
7060
|
+
) -> None:
|
7061
|
+
"""Saves the video to a file.
|
7062
|
+
|
7063
|
+
Args:
|
7064
|
+
path: Local path where to save the video.
|
7065
|
+
"""
|
7066
|
+
import pathlib # pylint: disable=g-import-not-at-top
|
7067
|
+
|
7068
|
+
if not self.video_bytes:
|
7069
|
+
raise NotImplementedError('Saving remote videos is not supported.')
|
7070
|
+
|
7071
|
+
pathlib.Path(path).write_bytes(self.video_bytes)
|
7072
|
+
|
7073
|
+
def show(self) -> None:
|
7074
|
+
"""Shows the video.
|
7075
|
+
|
7076
|
+
If the video has no mime_type, it is assumed to be video/mp4.
|
7077
|
+
|
7078
|
+
This method only works in a notebook environment.
|
7079
|
+
"""
|
7080
|
+
if self.uri and not self.video_bytes:
|
7081
|
+
raise ValueError('Showing remote videos is not supported.')
|
7082
|
+
if not self.video_bytes:
|
7083
|
+
raise ValueError('Video has no bytes.')
|
7084
|
+
|
7085
|
+
mime_type = self.mime_type or 'video/mp4'
|
7086
|
+
|
7087
|
+
try:
|
7088
|
+
from IPython import display as IPython_display
|
7089
|
+
except ImportError:
|
7090
|
+
IPython_display = None
|
7091
|
+
|
7092
|
+
if IPython_display:
|
7093
|
+
IPython_display.display(
|
7094
|
+
IPython_display.Video(
|
7095
|
+
data=self.video_bytes, mimetype=mime_type, embed=True
|
7096
|
+
)
|
7097
|
+
)
|
7098
|
+
|
7099
|
+
def __repr__(self) -> str:
|
7100
|
+
video_bytes = '<video_bytes>' if self.video_bytes else 'None'
|
7101
|
+
return (
|
7102
|
+
f'Video(uri={self.uri}, video_bytes={video_bytes},'
|
7103
|
+
f' mime_type={self.mime_type})'
|
7104
|
+
)
|
7105
|
+
|
7106
|
+
|
7107
|
+
class VideoDict(TypedDict, total=False):
|
7108
|
+
"""A generated video."""
|
7109
|
+
|
7110
|
+
uri: Optional[str]
|
7111
|
+
"""Path to another storage."""
|
7112
|
+
|
7113
|
+
video_bytes: Optional[bytes]
|
7114
|
+
"""Video bytes."""
|
7115
|
+
|
7116
|
+
mime_type: Optional[str]
|
7117
|
+
"""Video encoding, for example "video/mp4"."""
|
7118
|
+
|
7119
|
+
|
7120
|
+
VideoOrDict = Union[Video, VideoDict]
|
7121
|
+
|
7122
|
+
|
6939
7123
|
class GenerateVideosConfig(_common.BaseModel):
|
6940
7124
|
"""Configuration for generating videos."""
|
6941
7125
|
|
@@ -6987,6 +7171,10 @@ class GenerateVideosConfig(_common.BaseModel):
|
|
6987
7171
|
default=None,
|
6988
7172
|
description="""Whether to generate audio along with the video.""",
|
6989
7173
|
)
|
7174
|
+
last_frame: Optional[Image] = Field(
|
7175
|
+
default=None,
|
7176
|
+
description="""Image to use as the last frame of generated videos. Only supported for image to video use cases.""",
|
7177
|
+
)
|
6990
7178
|
|
6991
7179
|
|
6992
7180
|
class GenerateVideosConfigDict(TypedDict, total=False):
|
@@ -7031,6 +7219,9 @@ class GenerateVideosConfigDict(TypedDict, total=False):
|
|
7031
7219
|
generate_audio: Optional[bool]
|
7032
7220
|
"""Whether to generate audio along with the video."""
|
7033
7221
|
|
7222
|
+
last_frame: Optional[ImageDict]
|
7223
|
+
"""Image to use as the last frame of generated videos. Only supported for image to video use cases."""
|
7224
|
+
|
7034
7225
|
|
7035
7226
|
GenerateVideosConfigOrDict = Union[
|
7036
7227
|
GenerateVideosConfig, GenerateVideosConfigDict
|
@@ -7038,7 +7229,7 @@ GenerateVideosConfigOrDict = Union[
|
|
7038
7229
|
|
7039
7230
|
|
7040
7231
|
class _GenerateVideosParameters(_common.BaseModel):
|
7041
|
-
"""Class that represents the parameters for generating
|
7232
|
+
"""Class that represents the parameters for generating videos."""
|
7042
7233
|
|
7043
7234
|
model: Optional[str] = Field(
|
7044
7235
|
default=None,
|
@@ -7052,7 +7243,12 @@ class _GenerateVideosParameters(_common.BaseModel):
|
|
7052
7243
|
image: Optional[Image] = Field(
|
7053
7244
|
default=None,
|
7054
7245
|
description="""The input image for generating the videos.
|
7055
|
-
Optional if prompt is provided.""",
|
7246
|
+
Optional if prompt or video is provided.""",
|
7247
|
+
)
|
7248
|
+
video: Optional[Video] = Field(
|
7249
|
+
default=None,
|
7250
|
+
description="""The input video for video extension use cases.
|
7251
|
+
Optional if prompt or image is provided.""",
|
7056
7252
|
)
|
7057
7253
|
config: Optional[GenerateVideosConfig] = Field(
|
7058
7254
|
default=None, description="""Configuration for generating videos."""
|
@@ -7060,7 +7256,7 @@ class _GenerateVideosParameters(_common.BaseModel):
|
|
7060
7256
|
|
7061
7257
|
|
7062
7258
|
class _GenerateVideosParametersDict(TypedDict, total=False):
|
7063
|
-
"""Class that represents the parameters for generating
|
7259
|
+
"""Class that represents the parameters for generating videos."""
|
7064
7260
|
|
7065
7261
|
model: Optional[str]
|
7066
7262
|
"""ID of the model to use. For a list of models, see `Google models
|
@@ -7071,7 +7267,11 @@ class _GenerateVideosParametersDict(TypedDict, total=False):
|
|
7071
7267
|
|
7072
7268
|
image: Optional[ImageDict]
|
7073
7269
|
"""The input image for generating the videos.
|
7074
|
-
Optional if prompt is provided."""
|
7270
|
+
Optional if prompt or video is provided."""
|
7271
|
+
|
7272
|
+
video: Optional[VideoDict]
|
7273
|
+
"""The input video for video extension use cases.
|
7274
|
+
Optional if prompt or image is provided."""
|
7075
7275
|
|
7076
7276
|
config: Optional[GenerateVideosConfigDict]
|
7077
7277
|
"""Configuration for generating videos."""
|
@@ -7082,85 +7282,6 @@ _GenerateVideosParametersOrDict = Union[
|
|
7082
7282
|
]
|
7083
7283
|
|
7084
7284
|
|
7085
|
-
class Video(_common.BaseModel):
|
7086
|
-
"""A generated video."""
|
7087
|
-
|
7088
|
-
uri: Optional[str] = Field(
|
7089
|
-
default=None, description="""Path to another storage."""
|
7090
|
-
)
|
7091
|
-
video_bytes: Optional[bytes] = Field(
|
7092
|
-
default=None, description="""Video bytes."""
|
7093
|
-
)
|
7094
|
-
mime_type: Optional[str] = Field(
|
7095
|
-
default=None, description="""Video encoding, for example "video/mp4"."""
|
7096
|
-
)
|
7097
|
-
|
7098
|
-
def save(
|
7099
|
-
self,
|
7100
|
-
path: str,
|
7101
|
-
) -> None:
|
7102
|
-
"""Saves the video to a file.
|
7103
|
-
|
7104
|
-
Args:
|
7105
|
-
path: Local path where to save the video.
|
7106
|
-
"""
|
7107
|
-
import pathlib # pylint: disable=g-import-not-at-top
|
7108
|
-
|
7109
|
-
if not self.video_bytes:
|
7110
|
-
raise NotImplementedError('Saving remote videos is not supported.')
|
7111
|
-
|
7112
|
-
pathlib.Path(path).write_bytes(self.video_bytes)
|
7113
|
-
|
7114
|
-
def show(self) -> None:
|
7115
|
-
"""Shows the video.
|
7116
|
-
|
7117
|
-
If the video has no mime_type, it is assumed to be video/mp4.
|
7118
|
-
|
7119
|
-
This method only works in a notebook environment.
|
7120
|
-
"""
|
7121
|
-
if self.uri and not self.video_bytes:
|
7122
|
-
raise ValueError('Showing remote videos is not supported.')
|
7123
|
-
if not self.video_bytes:
|
7124
|
-
raise ValueError('Video has no bytes.')
|
7125
|
-
|
7126
|
-
mime_type = self.mime_type or 'video/mp4'
|
7127
|
-
|
7128
|
-
try:
|
7129
|
-
from IPython import display as IPython_display
|
7130
|
-
except ImportError:
|
7131
|
-
IPython_display = None
|
7132
|
-
|
7133
|
-
if IPython_display:
|
7134
|
-
IPython_display.display(
|
7135
|
-
IPython_display.Video(
|
7136
|
-
data=self.video_bytes, mimetype=mime_type, embed=True
|
7137
|
-
)
|
7138
|
-
)
|
7139
|
-
|
7140
|
-
def __repr__(self) -> str:
|
7141
|
-
video_bytes = '<video_bytes>' if self.video_bytes else 'None'
|
7142
|
-
return (
|
7143
|
-
f'Video(uri={self.uri}, video_bytes={video_bytes},'
|
7144
|
-
f' mime_type={self.mime_type})'
|
7145
|
-
)
|
7146
|
-
|
7147
|
-
|
7148
|
-
class VideoDict(TypedDict, total=False):
|
7149
|
-
"""A generated video."""
|
7150
|
-
|
7151
|
-
uri: Optional[str]
|
7152
|
-
"""Path to another storage."""
|
7153
|
-
|
7154
|
-
video_bytes: Optional[bytes]
|
7155
|
-
"""Video bytes."""
|
7156
|
-
|
7157
|
-
mime_type: Optional[str]
|
7158
|
-
"""Video encoding, for example "video/mp4"."""
|
7159
|
-
|
7160
|
-
|
7161
|
-
VideoOrDict = Union[Video, VideoDict]
|
7162
|
-
|
7163
|
-
|
7164
7285
|
class GeneratedVideo(_common.BaseModel):
|
7165
7286
|
"""A generated video."""
|
7166
7287
|
|
google/genai/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: google-genai
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.20.0
|
4
4
|
Summary: GenAI Python SDK
|
5
5
|
Author-email: Google LLC <googleapis-packages@google.com>
|
6
6
|
License: Apache-2.0
|
@@ -27,6 +27,8 @@ Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
27
27
|
Requires-Dist: requests<3.0.0,>=2.28.1
|
28
28
|
Requires-Dist: websockets<15.1.0,>=13.0.0
|
29
29
|
Requires-Dist: typing-extensions<5.0.0,>=4.11.0
|
30
|
+
Provides-Extra: aiohttp
|
31
|
+
Requires-Dist: aiohttp<4.0.0; extra == "aiohttp"
|
30
32
|
Dynamic: license-file
|
31
33
|
|
32
34
|
# Google Gen AI SDK
|
@@ -0,0 +1,35 @@
|
|
1
|
+
google/genai/__init__.py,sha256=SYTxz3Ho06pP2TBlvDU0FkUJz8ytbR3MgEpS9HvVYq4,709
|
2
|
+
google/genai/_adapters.py,sha256=Kok38miNYJff2n--l0zEK_hbq0y2rWOH7k75J7SMYbQ,1744
|
3
|
+
google/genai/_api_client.py,sha256=hOwz6yhdKxWws2E62x-4_XwHeOhxZEOaru_Uh_OIeuU,48294
|
4
|
+
google/genai/_api_module.py,sha256=lj8eUWx8_LBGBz-49qz6_ywWm3GYp3d8Bg5JoOHbtbI,902
|
5
|
+
google/genai/_automatic_function_calling_util.py,sha256=IJkPq2fT9pYxYm5Pbu5-e0nBoZKoZla7yT4_txWRKLs,10324
|
6
|
+
google/genai/_base_url.py,sha256=E5H4dew14Y16qfnB3XRnjSCi19cJVlkaMNoM_8ip-PM,1597
|
7
|
+
google/genai/_common.py,sha256=tyzCssr2OIuiMfFjrv3wdegbKBbIPW2mXzLLykZcArQ,12098
|
8
|
+
google/genai/_extra_utils.py,sha256=_w8hB9Ag7giRR94nIOBJFTLiLEufulPXkCZpJG1XY5g,19241
|
9
|
+
google/genai/_live_converters.py,sha256=8J0h9JUdkwkPFugFBAW4EKTMkZATMDZWgNkc9WOh2Hg,115488
|
10
|
+
google/genai/_mcp_utils.py,sha256=khECx-DMuHemKzOQQ3msWp7FivPeEOnl3n1lvWc_b5o,3833
|
11
|
+
google/genai/_replay_api_client.py,sha256=XGnZIVlmkiQHTE9MLb0SQ8iNBNdsTodEHK93Vo8xQTA,21178
|
12
|
+
google/genai/_test_api_client.py,sha256=4ruFIy5_1qcbKqqIBu3HSQbpSOBrxiecBtDZaTGFR1s,4797
|
13
|
+
google/genai/_tokens_converters.py,sha256=IUmpIC7nKjZzp_azavxXgeML35nYSC0KRkCnGG0iZao,51477
|
14
|
+
google/genai/_transformers.py,sha256=Ii8u54Ni8388jU8OAei5sixZAmFP3o-OKbxomzBul4o,35557
|
15
|
+
google/genai/batches.py,sha256=BRKoRGl2nt8P4Hh7K_c9EWkOyOGUiWfaLJ2vlSsO-DE,34944
|
16
|
+
google/genai/caches.py,sha256=5xfb3OZrh11sWmMeMhPqxgeoytWzPhSQrkiD7DfGMRQ,68039
|
17
|
+
google/genai/chats.py,sha256=7HHrXidMqotYS8BJdFzV9Pdfmsuf3Np4-fedokoMcXQ,16759
|
18
|
+
google/genai/client.py,sha256=9AWoFL2g-OQFA4Zqpecg74b7h3i5Q9ZlXF4bFePV0zA,10759
|
19
|
+
google/genai/errors.py,sha256=UebysH1cDeIdtp1O06CW7lQjnNrWtuqZTeVgEJylX48,5589
|
20
|
+
google/genai/files.py,sha256=KTx3oNSS6yaMh77ofM-Rf7dE9ObzzvqlcQabkaME3Xg,39699
|
21
|
+
google/genai/live.py,sha256=ZpXHO7AFayOz2viISxs34rlG85dFH9qk-5-qOC9pcZE,39375
|
22
|
+
google/genai/live_music.py,sha256=lO-nDz2gEJ8bYesJC1Aru4IrsV7raEePf4sH3QQT6yI,7119
|
23
|
+
google/genai/models.py,sha256=FNUGjSWhgtrmNtyeG47TYZ6eiRtPS0gy7Smn4FkN0Cg,242724
|
24
|
+
google/genai/operations.py,sha256=LGM1D8jxrunT23CaK_q9daZce-g3VvIUkogeLKMrQPE,20305
|
25
|
+
google/genai/pagers.py,sha256=nyVYxp92rS-UaewO_oBgP593knofeLU6yOn6RolNoGQ,6797
|
26
|
+
google/genai/py.typed,sha256=RsMFoLwBkAvY05t6izop4UHZtqOPLiKp3GkIEizzmQY,40
|
27
|
+
google/genai/tokens.py,sha256=31HRdGkuN1VkHn21qKBwa6PeiLFGMN-aFldPIGo9WxE,12188
|
28
|
+
google/genai/tunings.py,sha256=pUqkNelsjhJGWvTwzoC1ofnigFjvdiRvZ4c1RiKqaLo,49501
|
29
|
+
google/genai/types.py,sha256=XO2A-0yZr8FUH_o3YhLj2u4WELuXFx1E5kFP42S1nPU,441994
|
30
|
+
google/genai/version.py,sha256=jjryM5ZRQXH3Cl7EdD5TFUVQWLcQ1IyGJJw_T1Pt56E,627
|
31
|
+
google_genai-1.20.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
32
|
+
google_genai-1.20.0.dist-info/METADATA,sha256=IJGEFuj2U-i93YFGHILZGqTfjIiBllpAzxxfoFAeJ94,35652
|
33
|
+
google_genai-1.20.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
34
|
+
google_genai-1.20.0.dist-info/top_level.txt,sha256=_1QvSJIhFAGfxb79D6DhB7SUw2X6T4rwnz_LLrbcD3c,7
|
35
|
+
google_genai-1.20.0.dist-info/RECORD,,
|
@@ -1,35 +0,0 @@
|
|
1
|
-
google/genai/__init__.py,sha256=SYTxz3Ho06pP2TBlvDU0FkUJz8ytbR3MgEpS9HvVYq4,709
|
2
|
-
google/genai/_adapters.py,sha256=Kok38miNYJff2n--l0zEK_hbq0y2rWOH7k75J7SMYbQ,1744
|
3
|
-
google/genai/_api_client.py,sha256=3OAM8kIbcH4e9Jyne40QgvsfgRvxD5jcwUtFECXts4o,38198
|
4
|
-
google/genai/_api_module.py,sha256=lj8eUWx8_LBGBz-49qz6_ywWm3GYp3d8Bg5JoOHbtbI,902
|
5
|
-
google/genai/_automatic_function_calling_util.py,sha256=IJkPq2fT9pYxYm5Pbu5-e0nBoZKoZla7yT4_txWRKLs,10324
|
6
|
-
google/genai/_base_url.py,sha256=E5H4dew14Y16qfnB3XRnjSCi19cJVlkaMNoM_8ip-PM,1597
|
7
|
-
google/genai/_common.py,sha256=hDqunjaAL__GXZzhr37QGOCR6z6PMc_EfiRy_ukAxHo,11545
|
8
|
-
google/genai/_extra_utils.py,sha256=_w8hB9Ag7giRR94nIOBJFTLiLEufulPXkCZpJG1XY5g,19241
|
9
|
-
google/genai/_live_converters.py,sha256=sI_j8iRcDB10wp7MXEeN-EsPO81tYTjxCqV3BU2AdOc,115394
|
10
|
-
google/genai/_mcp_utils.py,sha256=khECx-DMuHemKzOQQ3msWp7FivPeEOnl3n1lvWc_b5o,3833
|
11
|
-
google/genai/_replay_api_client.py,sha256=BrnKkdUVejpuHvqVHK0V4m4TjvL4LaBLHRMv6vw0vGE,21361
|
12
|
-
google/genai/_test_api_client.py,sha256=4ruFIy5_1qcbKqqIBu3HSQbpSOBrxiecBtDZaTGFR1s,4797
|
13
|
-
google/genai/_tokens_converters.py,sha256=UGVfeY6jdOZw0f1jFQjibZAm5OVgovk9iLX7q8EwMYU,51383
|
14
|
-
google/genai/_transformers.py,sha256=Ii8u54Ni8388jU8OAei5sixZAmFP3o-OKbxomzBul4o,35557
|
15
|
-
google/genai/batches.py,sha256=gyNb--psM7cqXEP5RsJ908ismvsFFlDNRxt7mCwhYgM,34943
|
16
|
-
google/genai/caches.py,sha256=YX8dZ64NwxNBvN6kA7FbrJLyxDt9ROO0GSjM6lwh7to,67944
|
17
|
-
google/genai/chats.py,sha256=Hl08SbpSCMS0kYiBNGNzPI8q3rijGEW_up0g2Wun9cY,17044
|
18
|
-
google/genai/client.py,sha256=9AWoFL2g-OQFA4Zqpecg74b7h3i5Q9ZlXF4bFePV0zA,10759
|
19
|
-
google/genai/errors.py,sha256=nLAVglUGuPdLqLcnN_VCifoi7V17u9BQ9AfxUdRzZLg,4795
|
20
|
-
google/genai/files.py,sha256=PB5Rh5WiLOPHcqPR1inGyhqL9PiE0BFHSL4Dz9HKtl8,39516
|
21
|
-
google/genai/live.py,sha256=ZpXHO7AFayOz2viISxs34rlG85dFH9qk-5-qOC9pcZE,39375
|
22
|
-
google/genai/live_music.py,sha256=lO-nDz2gEJ8bYesJC1Aru4IrsV7raEePf4sH3QQT6yI,7119
|
23
|
-
google/genai/models.py,sha256=bEOw_yJZaSyrtRLcQGKbNnCglEaJlaWRfgsYB7bPitk,239064
|
24
|
-
google/genai/operations.py,sha256=wWGngU4N3U2y_JteBkwqTmoNncehk2NcZgPyHaVulfI,20304
|
25
|
-
google/genai/pagers.py,sha256=nyVYxp92rS-UaewO_oBgP593knofeLU6yOn6RolNoGQ,6797
|
26
|
-
google/genai/py.typed,sha256=RsMFoLwBkAvY05t6izop4UHZtqOPLiKp3GkIEizzmQY,40
|
27
|
-
google/genai/tokens.py,sha256=g2gxefzN5-36B5qUkLL6MBSe31IgXgW7k_WEstRZypg,12187
|
28
|
-
google/genai/tunings.py,sha256=aEKTVfpn6rYWEKu0CRaS93mo2iLQtX5K3nSqX6UB_jM,49500
|
29
|
-
google/genai/types.py,sha256=5-K9Kjiz4uJ8l9Rvvz5ECk2KpZIB1TbiO3XMRAm0ec0,436202
|
30
|
-
google/genai/version.py,sha256=o6GbhuHH2YKfI3OQYURWLIO_0gx-b_nyVeW_WdmRq4c,627
|
31
|
-
google_genai-1.18.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
32
|
-
google_genai-1.18.0.dist-info/METADATA,sha256=sW0PT6O5RCIOst08GQj-YduUjspFSxA-GT3bxcMhDjM,35579
|
33
|
-
google_genai-1.18.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
34
|
-
google_genai-1.18.0.dist-info/top_level.txt,sha256=_1QvSJIhFAGfxb79D6DhB7SUw2X6T4rwnz_LLrbcD3c,7
|
35
|
-
google_genai-1.18.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|