GenerativeModelFutures


abstract class GenerativeModelFutures


Helper method for interacting with a GenerativeModel from Java.

See also
from

Summary

Public companion functions

GenerativeModelFutures

Public functions

abstract ListenableFuture<GenerateContentResponse>
generateContent(vararg prompt: Content)

Generates a response from the system model for the provided Contents.

abstract Publisher<GenerateContentResponse>
generateContentStream(vararg prompt: Content)

Generates a streaming response from the system model for the provided Contents.

abstract GenerativeModel

Returns the GenerativeModel instance that was used to create this object

Public companion functions

Public functions

generateContent

abstract fun generateContent(vararg prompt: Content): ListenableFuture<GenerateContentResponse>

Generates a response from the system model for the provided Contents.

Parameters
vararg prompt: Content

A group of input Contents to send to the model.

generateContentStream

abstract fun generateContentStream(vararg prompt: Content): Publisher<GenerateContentResponse>

Generates a streaming response from the system model for the provided Contents.

Parameters
vararg prompt: Content

A group of input Contents to send to the model.

getGenerativeModel

abstract fun getGenerativeModel(): GenerativeModel

Returns the GenerativeModel instance that was used to create this object