generateContent

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

Generates content from a prompt template and inputs.

Return

The content generated by the model.

Parameters

templateId

The ID of the prompt template to use.

inputs

A map of variables to substitute into the template.

See also

for types of errors.

Throws

if the request failed.

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

Generates content from a prompt template and inputs.

Return

The content generated by the model.

Parameters

templateId

The ID of the prompt template to use.

inputs

A map of variables to substitute into the template.

See also

for types of errors.

Throws

if the request failed.

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

Generates content from a prompt template and inputs.

Return

The content generated by the model.

Parameters

templateId

The ID of the prompt template to use.

inputs

A map of variables to substitute into the template.

See also

for types of errors.

Throws

if the request failed.