Share via


IWorkflowExecutionEnvironment.OpenStreamAsync 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> OpenStreamAsync(Microsoft.Agents.AI.Workflows.Workflow workflow, string? runId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member OpenStreamAsync : Microsoft.Agents.AI.Workflows.Workflow * string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.Workflows.StreamingRun>
Public Function OpenStreamAsync (workflow As Workflow, Optional runId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of StreamingRun)

Parameters

workflow
Workflow

The workflow to execute. Cannot be null.

runId
String

An optional identifier for the run. If null, a new run 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