google-genai 1.20.0__py3-none-any.whl → 1.21.1__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 +170 -103
- google/genai/_common.py +73 -0
- google/genai/_live_converters.py +174 -414
- google/genai/_replay_api_client.py +9 -3
- google/genai/_tokens_converters.py +81 -176
- google/genai/_transformers.py +19 -40
- google/genai/batches.py +46 -64
- google/genai/caches.py +131 -222
- google/genai/chats.py +4 -4
- google/genai/client.py +1 -1
- google/genai/files.py +88 -106
- google/genai/live.py +15 -20
- google/genai/live_music.py +4 -5
- google/genai/models.py +317 -560
- google/genai/operations.py +35 -68
- google/genai/tokens.py +11 -6
- google/genai/tunings.py +64 -113
- google/genai/types.py +132 -9
- google/genai/version.py +1 -1
- {google_genai-1.20.0.dist-info → google_genai-1.21.1.dist-info}/METADATA +45 -1
- google_genai-1.21.1.dist-info/RECORD +35 -0
- google_genai-1.20.0.dist-info/RECORD +0 -35
- {google_genai-1.20.0.dist-info → google_genai-1.21.1.dist-info}/WHEEL +0 -0
- {google_genai-1.20.0.dist-info → google_genai-1.21.1.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.20.0.dist-info → google_genai-1.21.1.dist-info}/top_level.txt +0 -0
google/genai/live_music.py
CHANGED
@@ -58,7 +58,7 @@ class AsyncMusicSession:
|
|
58
58
|
raise NotImplementedError('Live music generation is not supported in Vertex AI.')
|
59
59
|
else:
|
60
60
|
client_content_dict = live_converters._LiveMusicClientContent_to_mldev(
|
61
|
-
|
61
|
+
from_object={'weighted_prompts': prompts}
|
62
62
|
)
|
63
63
|
await self._ws.send(json.dumps({'clientContent': client_content_dict}))
|
64
64
|
|
@@ -70,7 +70,7 @@ class AsyncMusicSession:
|
|
70
70
|
raise NotImplementedError('Live music generation is not supported in Vertex AI.')
|
71
71
|
else:
|
72
72
|
config_dict = live_converters._LiveMusicGenerationConfig_to_mldev(
|
73
|
-
|
73
|
+
from_object=config
|
74
74
|
)
|
75
75
|
await self._ws.send(json.dumps({'musicGenerationConfig': config_dict}))
|
76
76
|
|
@@ -82,7 +82,7 @@ class AsyncMusicSession:
|
|
82
82
|
raise NotImplementedError('Live music generation is not supported in Vertex AI.')
|
83
83
|
else:
|
84
84
|
playback_control_dict = live_converters._LiveMusicClientMessage_to_mldev(
|
85
|
-
|
85
|
+
from_object={'playback_control': playback_control}
|
86
86
|
)
|
87
87
|
await self._ws.send(json.dumps(playback_control_dict))
|
88
88
|
|
@@ -135,7 +135,7 @@ class AsyncMusicSession:
|
|
135
135
|
raise NotImplementedError('Live music generation is not supported in Vertex AI.')
|
136
136
|
else:
|
137
137
|
response_dict = live_converters._LiveMusicServerMessage_from_mldev(
|
138
|
-
|
138
|
+
response
|
139
139
|
)
|
140
140
|
|
141
141
|
return types.LiveMusicServerMessage._from_response(
|
@@ -173,7 +173,6 @@ class AsyncLiveMusic(_api_module.BaseModule):
|
|
173
173
|
# Only mldev supported
|
174
174
|
request_dict = _common.convert_to_dict(
|
175
175
|
live_converters._LiveMusicConnectParameters_to_mldev(
|
176
|
-
api_client=self._api_client,
|
177
176
|
from_object=types.LiveMusicConnectParameters(
|
178
177
|
model=transformed_model,
|
179
178
|
).model_dump(exclude_none=True)
|