IGenerativeModelStreamContentAsync(String, CancellationToken) Method
Streams content generation based on a string message.
Namespace: GenerativeAIAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
IAsyncEnumerable<GenerateContentResponse> StreamContentAsync(
string prompt,
CancellationToken cancellationToken = default
)
- prompt String
- The input prompt to be processed and streamed.
- cancellationToken CancellationToken (Optional)
- A token to observe for cancellation requests.
IAsyncEnumerableGenerateContentResponseAn asynchronous enumerable of generated content responses.