FirebaseAILogic Framework Reference

LiveGenerativeModel

@available(watchOS, unavailable)
public final class LiveGenerativeModel

A multimodal model (like Gemini) capable of real-time content generation based on various input types, supporting bidirectional streaming.

You can create a new session via LiveGenerativeModel/connect().

  • Start a LiveSession with the server for bidirectional streaming.

    Declaration

    Swift

    public func connect(sessionResumption: SessionResumptionConfig? = nil) async throws
      -> LiveSession

    Parameters

    sessionResumption

    Optional configuration for session resumption. Must be specified to enable session resumption.

    Return Value

    A new LiveSession that you can use to stream messages to and from the server.