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 @NonNull LiveSession

Start a LiveSession with the server for bidirectional streaming.

Public methods

connect

public final @NonNull LiveSession connect()

Start a LiveSession with the server for bidirectional streaming.

Returns
@NonNull LiveSession

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.