streamGenerateContent

fun streamGenerateContent(inputJson: GenerateContentRequest, model: String = "gemini-pro"): Flow<GenerateContentResponse>

Generates content stream based on the provided input JSON using a specified model.

Return

The response from the Gemini API as a Flow of GenerateContentResponse object.

Parameters

inputJson

The request payload for content generation.

model

The model to be used for content generation. Defaults to "gemini-pro".