Language

TaskDefinition<TInput,TOutput>.GetActiveRunAsync Method

Definition

Overloads

Name Description
GetActiveRunAsync(String, CancellationToken)

Returns the in-flight run for a one-shot task keyed by taskId, or null when not in-flight in this process and not reclaimable inline.

GetActiveRunAsync(String, String, CancellationToken)

Returns the in-flight run for a multi-turn task keyed by taskId and inputId, or null when not in-flight.

GetActiveRunAsync(String, CancellationToken)

Source:
TaskDefinition.cs

Returns the in-flight run for a one-shot task keyed by taskId, or null when not in-flight in this process and not reclaimable inline.

public virtual System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Tasks.TaskRun<TOutput>?> GetActiveRunAsync(string taskId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetActiveRunAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Tasks.TaskRun<'Output>>
override this.GetActiveRunAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Tasks.TaskRun<'Output>>
Public Overridable Function GetActiveRunAsync (taskId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TaskRun(Of TOutput))

Parameters

taskId
String

The task id.

cancellationToken
CancellationToken

A cancellation token.

Returns

Task<TaskRun<TOutput>>

The in-flight run, or null.

Applies to

GetActiveRunAsync(String, String, CancellationToken)

Source:
TaskDefinition.cs

Returns the in-flight run for a multi-turn task keyed by taskId and inputId, or null when not in-flight.

public virtual System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Tasks.TaskRun<TOutput>?> GetActiveRunAsync(string taskId, string inputId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetActiveRunAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Tasks.TaskRun<'Output>>
override this.GetActiveRunAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Tasks.TaskRun<'Output>>
Public Overridable Function GetActiveRunAsync (taskId As String, inputId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TaskRun(Of TOutput))

Parameters

taskId
String

The chain id.

inputId
String

The input id of the turn to attach to.

cancellationToken
CancellationToken

A cancellation token.

Returns

Task<TaskRun<TOutput>>

The in-flight run, or null.

Applies to