google-genai 0.6.0__py3-none-any.whl → 0.8.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/live.py CHANGED
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
  #
15
15
 
16
- """Live client."""
16
+ """Live client. The live module is experimental."""
17
17
 
18
18
  import asyncio
19
19
  import base64
@@ -25,6 +25,7 @@ from typing import AsyncIterator, Optional, Sequence, Union
25
25
  import google.auth
26
26
  from websockets import ConnectionClosed
27
27
 
28
+ from . import _api_module
28
29
  from . import _common
29
30
  from . import _transformers as t
30
31
  from . import client
@@ -60,7 +61,7 @@ _FUNCTION_RESPONSE_REQUIRES_ID = (
60
61
 
61
62
 
62
63
  class AsyncSession:
63
- """AsyncSession."""
64
+ """AsyncSession. The live module is experimental."""
64
65
 
65
66
  def __init__(self, api_client: client.ApiClient, websocket: ClientConnection):
66
67
  self._api_client = api_client
@@ -74,7 +75,6 @@ class AsyncSession:
74
75
  types.ContentListUnionDict,
75
76
  types.LiveClientContentOrDict,
76
77
  types.LiveClientRealtimeInputOrDict,
77
- types.LiveClientRealtimeInputOrDict,
78
78
  types.LiveClientToolResponseOrDict,
79
79
  types.FunctionResponseOrDict,
80
80
  Sequence[types.FunctionResponseOrDict],
@@ -111,6 +111,8 @@ class AsyncSession:
111
111
  is function call, user must call `send` with the function response to
112
112
  continue the turn.
113
113
 
114
+ The live module is experimental.
115
+
114
116
  Yields:
115
117
  The model responses from the server.
116
118
 
@@ -142,6 +144,8 @@ class AsyncSession:
142
144
  input stream to the model and the other task will be used to receive the
143
145
  responses from the model.
144
146
 
147
+ The live module is experimental.
148
+
145
149
  Args:
146
150
  stream: An iterator that yields the model response.
147
151
  mime_type: The MIME type of the data in the stream.
@@ -470,8 +474,8 @@ class AsyncSession:
470
474
  await self._ws.close()
471
475
 
472
476
 
473
- class AsyncLive(_common.BaseModule):
474
- """AsyncLive."""
477
+ class AsyncLive(_api_module.BaseModule):
478
+ """AsyncLive. The live module is experimental."""
475
479
 
476
480
  def _LiveSetup_to_mldev(
477
481
  self, model: str, config: Optional[types.LiveConnectConfigOrDict] = None
@@ -638,6 +642,8 @@ class AsyncLive(_common.BaseModule):
638
642
  ) -> AsyncSession:
639
643
  """Connect to the live server.
640
644
 
645
+ The live module is experimental.
646
+
641
647
  Usage:
642
648
 
643
649
  .. code-block:: python