IWorkflowExecutionEnvironment.RunStreamingAsync<TInput> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initiates an asynchronous streaming execution using the specified input.
public System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.Workflows.StreamingRun> RunStreamingAsync<TInput>(Microsoft.Agents.AI.Workflows.Workflow workflow, TInput input, string? sessionId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RunStreamingAsync : Microsoft.Agents.AI.Workflows.Workflow * 'Input * string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.Workflows.StreamingRun>
Public Function RunStreamingAsync(Of TInput) (workflow As Workflow, input As TInput, Optional sessionId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of StreamingRun)
Type Parameters
- TInput
A type of input accepted by the workflow. Must be non-nullable.
Parameters
- workflow
- Workflow
The workflow to be executed. Must not be null.
- input
- TInput
The input message to be processed as part of the streaming run.
- sessionId
- String
An optional unique identifier for the session. If not provided, a new identifier will be generated.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
A ValueTask<TResult> that represents the asynchronous operation. The result contains a StreamingRun for managing and interacting with the streaming run.
Remarks
The returned StreamingRun provides methods to observe and control the ongoing streaming execution. The operation will continue until the streaming execution is finished or cancelled.