GenerativeModelStreamContentAsync(IEnumerablePart, CancellationToken) Method
Streams content generation based on a GenerateContentRequest asynchronously.
Namespace: GenerativeAIAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
public IAsyncEnumerable<GenerateContentResponse> StreamContentAsync(
IEnumerable<Part> parts,
CancellationToken cancellationToken = default
)
- parts IEnumerablePart
[Missing <param name="parts"/> documentation for "M:GenerativeAI.GenerativeModel.StreamContentAsync(System.Collections.Generic.IEnumerable{GenerativeAI.Types.Part},System.Threading.CancellationToken)"]
- cancellationToken CancellationToken (Optional)
- A token to monitor for cancellation requests.
IAsyncEnumerableGenerateContentResponseAn asynchronous stream of GenerateContentResponse objects representing the generated content.
IGenerativeModelStreamContentAsync(IEnumerablePart, CancellationToken)