FirebaseAI Framework Reference

LiveGenerativeModel

@available(iOS 15.0, macOS 12.0, tvOS 15.0, *)
@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 connect().

  • Start a LiveSession with the server for bidirectional streaming.

    Declaration

    Swift

    public func connect() async throws -> LiveSession

    Return Value

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