LiveModelFutures

@PublicPreviewAPI
abstract class LiveModelFutures


Wrapper class providing Java compatible methods for LiveGenerativeModel.

Summary

Public companion functions

LiveModelFutures

Public functions

abstract ListenableFuture<LiveSession>

Start a LiveSession with the server for bidirectional streaming.

Public companion functions

from

fun from(model: LiveGenerativeModel): LiveModelFutures
Returns
LiveModelFutures

a LiveModelFutures created around the provided LiveGenerativeModel

Public functions

connect

abstract fun connect(): ListenableFuture<LiveSession>

Start a LiveSession with the server for bidirectional streaming.

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