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
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ProjectsAgentVersion>> CreateAgentVersionFromCodeAsync(string agentName, string filePath, string contentType, string foundryFeatures = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateAgentVersionFromCodeAsync : string * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ProjectsAgentVersion>>
override this.CreateAgentVersionFromCodeAsync : string * string * string * string * 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, contentType As String, Optional foundryFeatures As String = Nothing, 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.
- contentType
- String
The contentType to use which has the multipart/form-data boundary.
- foundryFeatures
- String
A feature flag opt-in required when using preview operations or modifying persisted preview resources.
- 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.