Share via


IWorkflowExecutionEnvironment.OpenStreamingAsync Method

Definition

Initiates a streaming run of the specified workflow without sending any initial input. Note that the starting Executor will not be invoked until an input message is received.

public System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.Workflows.StreamingRun> OpenStreamingAsync(Microsoft.Agents.AI.Workflows.Workflow workflow, string? sessionId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member OpenStreamingAsync : Microsoft.Agents.AI.Workflows.Workflow * string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.Workflows.StreamingRun>
Public Function OpenStreamingAsync (workflow As Workflow, Optional sessionId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of StreamingRun)

Parameters

workflow
Workflow

The workflow to execute. Cannot be null.

sessionId
String

An optional identifier for the session. If null, a new identifier will be generated.

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the streaming operation.

Returns

A ValueTask that represents the asynchronous operation. The result contains a StreamingRun object for accessing the streamed workflow output.

Applies to