OptionalwebSocketFactory: WebSocketFactoryOptionaloptions: GoogleGenAIRequestOptionsExperimentalOptionaloptions: GoogleGenAIRequestOptionsExperimentalConnects a WebSocket session to an existing live interaction.
Experimental: Live Interactions SDK support is experimental and may change in future versions.
receive() yields server events continuously until a terminal server event
(interaction.completed or interaction.canceled) arrives, the server
closes the WebSocket cleanly (code 1000) after
interaction.requires_reconnection, or the connection detaches.
Terminal server events, errors, and await connection.cancel()
automatically close the local WebSocket. Call connection.detach() to
disconnect locally while leaving the server interaction resumable, or call
await connection.complete() and consume connection.receive() until
interaction.completed to finish.
Optionalparams: InteractionConnectParams & { transport?: "websocket" }Optionaloptions: GoogleGenAIRequestOptionsExperimentalConnects a WebSocket or WebRTC session to an existing live interaction.
Experimental: Live Interactions SDK support is experimental and may change in future versions.
Optionalparams: InteractionConnectParamsOptionaloptions: GoogleGenAIRequestOptionsCreates a model interaction. Long decodes are continued automatically
across hops and merged into one interaction unless
automatic_continuation: false is passed; see
AutomaticContinuationOption.
Optionaloptions: GoogleGenAIRequestOptionsCreates an agent interaction. Agent loops are managed by the server, so
automatic_continuation has no effect; see
AutomaticContinuationOption.
Optionaloptions: GoogleGenAIRequestOptionsCreates a streaming model interaction. Long decodes are continued
automatically: the returned stream yields the events of every hop unless
automatic_continuation: false is passed; see
AutomaticContinuationOption.
Optionaloptions: GoogleGenAIRequestOptionsCreates a streaming agent interaction. Agent loops are managed by the
server, so automatic_continuation has no effect; see
AutomaticContinuationOption.
Optionaloptions: GoogleGenAIRequestOptionsCreates a streaming interaction; see AutomaticContinuationOption.
Optionaloptions: GoogleGenAIRequestOptionsCreates an interaction; see AutomaticContinuationOption.
Optionaloptions: GoogleGenAIRequestOptionsCreates an interaction; see AutomaticContinuationOption.
Optionaloptions: GoogleGenAIRequestOptionsOptionaloptions: GoogleGenAIRequestOptionsOptionalparams: null | GetInteractionByIdParamsNonStreamingOptionaloptions: GoogleGenAIRequestOptionsOptionaloptions: GoogleGenAIRequestOptionsOptionalparams: null | GetInteractionByIdParamsOptionaloptions: GoogleGenAIRequestOptions
Connects a WebRTC session to an existing live interaction.
Experimental: Live Interactions SDK support is experimental and may change in future versions.
receive()yields server events continuously over the"events"data channel until a terminal server event (interaction.completedorinteraction.canceled) arrives, the server closes the data channel afterinteraction.requires_reconnection, or the connection detaches.Terminal server events, errors, and
await connection.cancel()automatically flush and close the local WebRTC transport. Callconnection.detach()to disconnect locally while leaving the server interaction resumable, or callawait connection.complete()and consumeconnection.receive()untilinteraction.completedto finish.