generateContent method

Future<GenerateContentResponse> generateContent(
  1. List<Content> request
)

This function generateContent generates the content based on request and returns the Future of GenerateContentResponse. It utilizes the function RequestType.generateContent.

Implementation

Future<GenerateContentResponse> generateContent(List<Content> request) =>
    RequestType.generateContent.fetchJson(
        this,
        GenerateContentRequest(
            contents: request,
            generationConfig: generationConfig,
            safetySettings: safetySettings),
        GenerateContentResponse.fromJson);