generateContent method

  1. @experimental
Future<GenerateContentResponse> generateContent(
  1. String templateId, {
  2. required Map<String, Object?> inputs,
  3. TemplateToolConfig? toolConfig,
})

Generates content from a template with the given templateId and inputs.

Sends a "templateGenerateContent" API request for the configured model.

Implementation

@experimental
Future<GenerateContentResponse> generateContent(String templateId,
        {required Map<String, Object?> inputs,
        TemplateToolConfig? toolConfig}) =>
    makeTemplateRequest(
        TemplateTask.templateGenerateContent,
        templateId,
        inputs,
        null, // history
        null, // tools
        toolConfig,
        _serializationStrategy.parseGenerateContentResponse);