GenerateContentStreamResult interface
Stay organized with collections
Save and categorize content based on your preferences.
Result object returned from GenerativeModel.generateContentStream() call. Iterate over stream
to get chunks as they come in and/or use the response
promise to get the aggregated response when the stream is done.
Signature:
export interface GenerateContentStreamResult
Properties
GenerateContentStreamResult.response
Signature:
response: Promise<EnhancedGenerateContentResponse>;
GenerateContentStreamResult.stream
Signature:
stream: AsyncGenerator<EnhancedGenerateContentResponse>;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-20 UTC.
[null,null,["Last updated 2025-05-20 UTC."],[],[],null,["Result object returned from [GenerativeModel.generateContentStream()](./ai.generativemodel.md#generativemodelgeneratecontentstream) call. Iterate over `stream` to get chunks as they come in and/or use the `response` promise to get the aggregated response when the stream is done.\n\n**Signature:** \n\n export interface GenerateContentStreamResult \n\nProperties\n\nGenerateContentStreamResult.response\n\n**Signature:** \n\n response: Promise\u003cEnhancedGenerateContentResponse\u003e;\n\nGenerateContentStreamResult.stream\n\n**Signature:** \n\n stream: AsyncGenerator\u003cEnhancedGenerateContentResponse\u003e;"]]