LiveGenerativeModel

@PublicPreviewAPI
public final class LiveGenerativeModel


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

Summary

Public methods

final @NonNullLiveSession

Start a LiveSession with the server for bidirectional streaming.

Public methods

connect

public final @NonNullLiveSession connect()

Start a LiveSession with the server for bidirectional streaming.

Returns
@NonNullLiveSession

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

Throws
com.google.firebase.vertexai.type.ServiceConnectionHandshakeFailedException com.google.firebase.vertexai.type.ServiceConnectionHandshakeFailedException

If the client was not able to establish a connection with the server.