LiveModelFutures

@PublicPreviewAPI
public abstract class LiveModelFutures


Wrapper class providing Java compatible methods for LiveGenerativeModel.

Summary

Nested types

public static class LiveModelFutures.Companion

Public methods

abstract @NonNull ListenableFuture<@NonNull LiveSession>

Start a LiveSession with the server for bidirectional streaming.

static final @NonNull LiveModelFutures

Public methods

connect

public abstract @NonNull ListenableFuture<@NonNull LiveSessionconnect()

Start a LiveSession with the server for bidirectional streaming.

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

from

public static final @NonNull LiveModelFutures from(@NonNull LiveGenerativeModel model)
Returns
@NonNull LiveModelFutures

a LiveModelFutures created around the provided LiveGenerativeModel