AgentAdministrationClient.CreateAgentVersionFromCodeAsync 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.
CreateAgentVersionFromCode
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ProjectsAgentVersion>> CreateAgentVersionFromCodeAsync(string agentName, string filePath, Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateAgentVersionFromCodeAsync : string * string * Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ProjectsAgentVersion>>
override this.CreateAgentVersionFromCodeAsync : string * string * Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ProjectsAgentVersion>>
Public Overridable Function CreateAgentVersionFromCodeAsync (agentName As String, filePath As String, metadata As CreateAgentVersionFromCodeMetadata, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of ProjectsAgentVersion))
Parameters
- agentName
- String
The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.
- Must start and end with alphanumeric characters,
- Can contain hyphens in the middle
- Must not exceed 63 characters.
- filePath
- String
The path to the entry point file.
- metadata
- CreateAgentVersionFromCodeMetadata
Metadata, including metadata itself, hosted agent definition and agent description.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
The response returned from the service.
Exceptions
agentName, filePath or is null.
agentName or filePath is an empty string, and was expected to be non-empty.
Service returned a non-success status code.