generateContentStream

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

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

Return

A Flow which will emit responses as they are returned 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 fun generateContentStream(templateId: String, inputs: Map<String, Any>): Flow<GenerateContentResponse>(source)

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

Return

A Flow which will emit responses as they are returned 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 fun generateContentStream(templateId: String, inputs: Map<String, Any>): Flow<GenerateContentResponse>(source)

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

Return

A Flow which will emit responses as they are returned 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.