streamGenerateContent method

  1. @override
Stream<Candidates> streamGenerateContent(
  1. String text, {
  2. List<Uint8List>? images,
  3. String? modelName,
  4. List<SafetySetting>? safetySettings,
  5. GenerationConfig? generationConfig,
})

streamGenerateContent By default, the model returns a response after completing the entire generation process. You can achieve faster interactions by not waiting for the entire result, and instead use streaming to handle partial results.

Implementation

@override
Stream<Candidates> streamGenerateContent(String text,
        {List<Uint8List>? images,
        String? modelName,
        List<SafetySetting>? safetySettings,
        GenerationConfig? generationConfig}) =>
    _impl.streamGenerateContent(text,
        images: images,
        generationConfig: generationConfig,
        safetySettings: safetySettings,
        modelName: modelName);