IGenerativeModelStreamContentAsync(IEnumerableContent, CancellationToken) Method
Streams generated content as an asynchronous enumerable based on the provided request.
Namespace: GenerativeAIAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
IAsyncEnumerable<GenerateContentResponse> StreamContentAsync(
IEnumerable<Content> contents,
CancellationToken cancellationToken = default
)
- contents IEnumerableContent
[Missing <param name="contents"/> documentation for "M:GenerativeAI.IGenerativeModel.StreamContentAsync(System.Collections.Generic.IEnumerable{GenerativeAI.Types.Content},System.Threading.CancellationToken)"]
- cancellationToken CancellationToken (Optional)
- Optional token to cancel the streaming operation.
IAsyncEnumerableGenerateContentResponseAn asynchronous enumerable of GenerateContentResponse objects.