TemplateGenerativeModel

Represents a multimodal model (like Gemini), capable of generating content based on various templated input types.

Represents a multimodal model (like Gemini), capable of generating content based on various templated input types.

Represents a multimodal model (like Gemini), capable of generating content based on various templated input types.

Functions

Link copied to clipboard
actual suspend fun generateContent(templateId: String, inputs: Map<String, Any>): GenerateContentResponse

Generates content from a prompt template and inputs.

expect suspend fun generateContent(templateId: String, inputs: Map<String, Any>): GenerateContentResponse

Generates content from a prompt template and inputs.

actual suspend fun generateContent(templateId: String, inputs: Map<String, Any>): GenerateContentResponse

Generates content from a prompt template and inputs.

Link copied to clipboard
actual fun generateContentStream(templateId: String, inputs: Map<String, Any>): Flow<GenerateContentResponse>

Generates content as a stream from a prompt template and inputs.

expect fun generateContentStream(templateId: String, inputs: Map<String, Any>): Flow<GenerateContentResponse>

Generates content as a stream from a prompt template and inputs.

actual fun generateContentStream(templateId: String, inputs: Map<String, Any>): Flow<GenerateContentResponse>

Generates content as a stream from a prompt template and inputs.

Link copied to clipboard
actual fun startChat(templateId: String, inputs: Map<String, Any>, history: List<Content>): TemplateChat

Creates a TemplateChat instance using this model with the optionally provided history.

expect fun startChat(templateId: String, inputs: Map<String, Any>, history: List<Content> = emptyList()): TemplateChat

Creates a TemplateChat instance using this model with the optionally provided history.

actual fun startChat(templateId: String, inputs: Map<String, Any>, history: List<Content>): TemplateChat

Creates a TemplateChat instance using this model with the optionally provided history.