Member Junction
    Preparing search index...

    The minimal subset of @google/genai's Session that the realtime driver depends on. Declaring the seam as an interface (rather than the concrete SDK Session) lets unit tests inject a fully in-memory fake that drives the registered callbacks with Gemini-shaped messages and captures outbound calls — no websocket, no network.

    interface GeminiLiveSession {
        close(): void;
        sendClientContent(
            params: { turnComplete?: boolean; turns?: Content[] },
        ): void;
        sendRealtimeInput(
            params: {
                activityEnd?: ActivityEnd;
                activityStart?: ActivityStart;
                audio?: Blob_2;
                media?: Blob_2;
                text?: string;
            },
        ): void;
        sendToolResponse(
            params: { functionResponses: FunctionResponse | FunctionResponse[] },
        ): void;
    }
    Index

    Methods

    • Appends client content (used to seed initial context) to the conversation.

      Parameters

      • params: { turnComplete?: boolean; turns?: Content[] }

      Returns void

    • Streams realtime user input to the model — media frames (audio now) AND mid-session text. Realtime text is the Live API's "respond now" path for in-conversation messages: native-audio models treat sendClientContent as history seeding only and will NOT generate from it mid-call, while realtime text triggers immediately.

      Parameters

      • params: {
            activityEnd?: ActivityEnd;
            activityStart?: ActivityStart;
            audio?: Blob_2;
            media?: Blob_2;
            text?: string;
        }
        • OptionalactivityEnd?: ActivityEnd
        • OptionalactivityStart?: ActivityStart

          Manual activity markers — used in MEETING mode (automatic activity detection disabled).

        • Optionalaudio?: Blob_2
        • Optionalmedia?: Blob_2
        • Optionaltext?: string

      Returns void

    • Replies to a server tool call with one or more function responses.

      Parameters

      • params: { functionResponses: FunctionResponse | FunctionResponse[] }

      Returns void