AgentToolboxes.CreateVersion 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
| Name | Description |
|---|---|
| CreateVersion(String, BinaryContent, RequestOptions) |
[Protocol Method] Creates a new toolbox version, provisioning the toolbox itself if it does not already exist.
|
| CreateVersion(String, IEnumerable<ToolboxTool>, String, IDictionary<String,String>, IEnumerable<ToolboxSkill>, ToolboxPolicies, CancellationToken) |
Creates a new toolbox version, provisioning the toolbox itself if it does not already exist. |
CreateVersion(String, BinaryContent, RequestOptions)
- Source:
- AgentToolboxes.cs
[Protocol Method] Creates a new toolbox version, provisioning the toolbox itself if it does not already exist.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.ClientModel.ClientResult CreateVersion(string name, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = default);
abstract member CreateVersion : string * System.ClientModel.BinaryContent * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.ClientResult
override this.CreateVersion : string * System.ClientModel.BinaryContent * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.ClientResult
Public Overridable Function CreateVersion (name As String, content As BinaryContent, Optional options As RequestOptions = Nothing) As ClientResult
Parameters
- name
- String
The name of the toolbox. If the toolbox does not exist, it will be created.
- content
- BinaryContent
The content to send as the body of the request.
- options
- RequestOptions
The request options, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
name or content is null.
name is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Applies to
CreateVersion(String, IEnumerable<ToolboxTool>, String, IDictionary<String,String>, IEnumerable<ToolboxSkill>, ToolboxPolicies, CancellationToken)
- Source:
- AgentToolboxes.cs
Creates a new toolbox version, provisioning the toolbox itself if it does not already exist.
public virtual System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ToolboxVersion> CreateVersion(string name, System.Collections.Generic.IEnumerable<Azure.AI.Projects.Agents.ToolboxTool> tools, string description = default, System.Collections.Generic.IDictionary<string,string> metadata = default, System.Collections.Generic.IEnumerable<Azure.AI.Projects.Agents.ToolboxSkill> skills = default, Azure.AI.Projects.Agents.ToolboxPolicies policies = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateVersion : string * seq<Azure.AI.Projects.Agents.ToolboxTool> * string * System.Collections.Generic.IDictionary<string, string> * seq<Azure.AI.Projects.Agents.ToolboxSkill> * Azure.AI.Projects.Agents.ToolboxPolicies * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ToolboxVersion>
override this.CreateVersion : string * seq<Azure.AI.Projects.Agents.ToolboxTool> * string * System.Collections.Generic.IDictionary<string, string> * seq<Azure.AI.Projects.Agents.ToolboxSkill> * Azure.AI.Projects.Agents.ToolboxPolicies * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ToolboxVersion>
Public Overridable Function CreateVersion (name As String, tools As IEnumerable(Of ToolboxTool), Optional description As String = Nothing, Optional metadata As IDictionary(Of String, String) = Nothing, Optional skills As IEnumerable(Of ToolboxSkill) = Nothing, Optional policies As ToolboxPolicies = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ClientResult(Of ToolboxVersion)
Parameters
- name
- String
The name of the toolbox. If the toolbox does not exist, it will be created.
- tools
- IEnumerable<ToolboxTool>
The list of tools to include in this version.
- description
- String
A human-readable description of the toolbox.
- metadata
- IDictionary<String,String>
Arbitrary key-value metadata to associate with the toolbox.
- skills
- IEnumerable<ToolboxSkill>
The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used.
- policies
- ToolboxPolicies
Policy configuration for this toolbox version.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
Exceptions
name or tools is null.
name is an empty string, and was expected to be non-empty.
Service returned a non-success status code.