LiveGenerativeModel

@PublicPreviewAPI
class LiveGenerativeModel


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

Summary

Public functions

suspend LiveSession

Start a LiveSession with the server for bidirectional streaming.

Public functions

connect

suspend fun connect(): LiveSession

Start a LiveSession with the server for bidirectional streaming.

Returns
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.