Models

class Models

Provides methods for interacting with the available GenAI models. Instantiating this class is not required. After instantiating a Client, access methods through client.models directly.

Functions

Link copied to clipboard
suspend fun generateContent(model: String, content: Content, config: GenerateContentConfig? = null): GenerateContentResponse

Generates content given a GenAI model and a content object.

suspend fun generateContent(model: String, text: String, config: GenerateContentConfig? = null): GenerateContentResponse

Generates content given a GenAI model and a text string.

suspend fun generateContent(model: String, contents: List<Content>, config: GenerateContentConfig? = null): GenerateContentResponse

Generates content given a GenAI model and a list of content.

Link copied to clipboard

Generates content with streaming support given a GenAI model and a content object.

Generates content with streaming support given a GenAI model and a text string.

Generates content with streaming support given a GenAI model and a list of content.