generateContentStream method
- @experimental
- String templateId, {
- required Map<
String, Object?> inputs, - TemplateToolConfig? toolConfig,
Generates a stream of content responding to templateId and inputs.
Sends a "templateStreamGenerateContent" API request for the server template, and waits for the response.
Implementation
@experimental
Stream<GenerateContentResponse> generateContentStream(String templateId,
{required Map<String, Object?> inputs, TemplateToolConfig? toolConfig}) {
return streamTemplateRequest(
TemplateTask.templateStreamGenerateContent,
templateId,
inputs,
null, // history
null, // tools
toolConfig,
_serializationStrategy.parseGenerateContentResponse);
}