Freigeben über


AIProjectAgentsOperations.CreateAgentVersionAsync Method

Definition

Create a new agent version.

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

Parameters

agentName
String

The name of the agent for which a new version should be created.

options
AgentVersionCreationOptions

Options, including the definition, for the new agent version to create.

cancellationToken
CancellationToken

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

Returns

Exceptions

agentName or options is null.

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

Service returned a non-success status code.

Applies to