AgentsClient.CancelRunAsync 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.
Overloads
CancelRunAsync(String, String, RequestContext) |
[Protocol Method] Cancels a run of an in progress thread.
|
CancelRunAsync(String, String, CancellationToken) |
Cancels a run of an in progress thread. |
CancelRunAsync(String, String, RequestContext)
- Source:
- AgentsClient.cs
[Protocol Method] Cancels a run of an in progress thread.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler CancelRunAsync(String, String, CancellationToken) convenience overload with strongly typed models first.
public virtual System.Threading.Tasks.Task<Azure.Response> CancelRunAsync (string threadId, string runId, Azure.RequestContext context);
abstract member CancelRunAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.CancelRunAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function CancelRunAsync (threadId As String, runId As String, context As RequestContext) As Task(Of Response)
Parameters
- threadId
- String
Identifier of the thread.
- runId
- String
Identifier of the run.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
threadId
or runId
is null.
threadId
or runId
is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Applies to
CancelRunAsync(String, String, CancellationToken)
- Source:
- AgentsClient.cs
Cancels a run of an in progress thread.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.ThreadRun>> CancelRunAsync (string threadId, string runId, System.Threading.CancellationToken cancellationToken = default);
abstract member CancelRunAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.ThreadRun>>
override this.CancelRunAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.ThreadRun>>
Public Overridable Function CancelRunAsync (threadId As String, runId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ThreadRun))
Parameters
- threadId
- String
Identifier of the thread.
- runId
- String
Identifier of the run.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
threadId
or runId
is null.
threadId
or runId
is an empty string, and was expected to be non-empty.
Applies to
Azure SDK for .NET