InProcessExecution.RunStreamingAsync Method

Definition

Overloads

Name Description
RunStreamingAsync<TInput>(Workflow, TInput, String, CancellationToken)

Initiates an asynchronous streaming execution using the specified input.

RunStreamingAsync<TInput>(Workflow, TInput, CheckpointManager, String, CancellationToken)

Initiates an asynchronous streaming execution using the specified input.

RunStreamingAsync<TInput>(Workflow, TInput, String, CancellationToken)

Initiates an asynchronous streaming execution using the specified input.

public static 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);
static member RunStreamingAsync : Microsoft.Agents.AI.Workflows.Workflow * 'Input * string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.Workflows.StreamingRun>
Public Shared 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.

Applies to

RunStreamingAsync<TInput>(Workflow, TInput, CheckpointManager, String, CancellationToken)

Initiates an asynchronous streaming execution using the specified input.

public static System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.Workflows.StreamingRun> RunStreamingAsync<TInput>(Microsoft.Agents.AI.Workflows.Workflow workflow, TInput input, Microsoft.Agents.AI.Workflows.CheckpointManager checkpointManager, string? sessionId = default, System.Threading.CancellationToken cancellationToken = default);
static member RunStreamingAsync : Microsoft.Agents.AI.Workflows.Workflow * 'Input * Microsoft.Agents.AI.Workflows.CheckpointManager * string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.Workflows.StreamingRun>
Public Shared Function RunStreamingAsync(Of TInput) (workflow As Workflow, input As TInput, checkpointManager As CheckpointManager, 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.

checkpointManager
CheckpointManager
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.

Applies to