LiveGenerativeModel
@available(watchOS, unavailable)
public final class LiveGenerativeModelA 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
LiveSessionwith the server for bidirectional streaming.Declaration
Swift
public func connect(sessionResumption: SessionResumptionConfig? = nil) async throws -> LiveSessionParameters
sessionResumptionOptional configuration for session resumption. Must be specified to enable session resumption.
Return Value
A new
LiveSessionthat you can use to stream messages to and from the server.