Constructors

Properties

Methods

Constructors

Properties

Methods

  • Experimental

    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.completed or interaction.canceled) arrives, the server closes the data channel after interaction.requires_reconnection, or the connection detaches.

    Terminal server events, errors, and await connection.cancel() automatically flush and close the local WebRTC transport. 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.

    Parameters

    • id: string
    • params: InteractionConnectParams & { transport: "webrtc" | InteractionWebRTCTransport }
    • Optionaloptions: GoogleGenAIRequestOptions

    Returns Promise<InteractionWebRTCConnection>

  • Experimental

    Connects 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.

    Parameters

    Returns Promise<InteractionWebSocketConnection>

  • Experimental

    Connects a WebSocket or WebRTC session to an existing live interaction.

    Experimental: Live Interactions SDK support is experimental and may change in future versions.

    Parameters

    Returns Promise<InteractionWebSocketConnection | InteractionWebRTCConnection>