BetaInternalOptional_sessionResumption: SessionResumptionConfigOptional_webSocketHandler: WebSocketHandlerInternalInitializes connection to the WebSocket. Should be called immediately after instantiation.
OptionalsessionResumption: SessionResumptionConfigBetaCloses this session. All methods on this session will throw an error once this resolves.
BetaYields messages received from the server. This can only be used by one consumer at a time.
An AsyncGenerator that yields server messages as they arrive.
BetaResumes an existing live session with the server.
This closes the current WebSocket connection and establishes a new one using the same configuration (URI, headers, model, system instruction, tools, etc.) as the original session.
OptionalsessionResumption: SessionResumptionConfigThe configuration for session resumption, such as the handle to the previous session state to restore.
BetaSends content to the server.
The message to send to the model.
Indicates if the turn is complete. Defaults to false.
BetaSends audio data to the server in realtime.
The base64-encoded PCM data to send to the server in realtime.
BetaSends function responses to the server.
The function responses to send.
BetaSends realtime input to the server.
The media chunks to send.
BetaThe stream of GenerativeContentBlob to send.
Use sendTextRealtime(), sendAudioRealtime(), and sendVideoRealtime() instead.
Sends a stream of GenerativeContentBlob.
BetaSends video data to the server in realtime.
The base64-encoded video data to send to the server in realtime.
BetaconnectionAllows external code to await the opening of the WebSocket connection.
BetainIndicates whether this Live session is being controlled by an AudioConversationController.
BetaisIndicates whether this Live session is closed.
Represents an active, real-time, bidirectional conversation with the model.
This class should only be instantiated by calling LiveGenerativeModel.connect.