Freigeben über


AIProjectAgentsOperations.GetAgentVersionAsync Method

Definition

Retrieves a specific version of an agent.

public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.OpenAI.AgentVersion>> GetAgentVersionAsync(string agentName, string agentVersion, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAgentVersionAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.OpenAI.AgentVersion>>
override this.GetAgentVersionAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.OpenAI.AgentVersion>>
Public Overridable Function GetAgentVersionAsync (agentName As String, agentVersion As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of AgentVersion))

Parameters

agentName
String

The name of the agent to retrieve.

agentVersion
String

The version of the agent to retrieve.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

agentName or agentVersion is null.

agentName or agentVersion is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to