generate Content
Generates content given a GenAI model and a list of content.
Unless GenerateContentConfig.automaticContinuation is false, a response that ends with finish reason CONTINUATION is continued: the same request is sent again with the response's continuation token until the model finishes. The responses are returned merged into one, with their parts concatenated and their usage metadata summed.
Return
a GenerateContentResponse instance that contains response contents and other metadata
Parameters
the name of the GenAI model to use for generation
a list of Content to send to the generative model
a GenerateContentConfig instance that specifies the optional configurations
Generates content given a GenAI model and a content object.
Automatic continuation works as described on the overload taking a list of content.
Return
a GenerateContentResponse instance that contains response contents and other metadata
Parameters
the name of the GenAI model to use for generation
a Content to send to the generative model
a GenerateContentConfig instance that specifies the optional configurations
Generates content given a GenAI model and a text string.
Automatic continuation works as described on the overload taking a list of content.
Return
a GenerateContentResponse instance that contains response contents and other metadata
Parameters
the name of the GenAI model to use for generation
the text string to send to the generative model
a GenerateContentConfig instance that specifies the optional configurations