AgentToolboxes.CreateVersionAsync Method

Definition

Overloads

Name Description
CreateVersionAsync(String, BinaryContent, RequestOptions)

[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.
CreateVersionAsync(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.

CreateVersionAsync(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.Threading.Tasks.Task<System.ClientModel.ClientResult> CreateVersionAsync(string name, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = default);
abstract member CreateVersionAsync : string * System.ClientModel.BinaryContent * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
override this.CreateVersionAsync : string * System.ClientModel.BinaryContent * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
Public Overridable Function CreateVersionAsync (name As String, content As BinaryContent, Optional options As RequestOptions = Nothing) As Task(Of 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

CreateVersionAsync(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.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ToolboxVersion>> CreateVersionAsync(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 CreateVersionAsync : 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.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ToolboxVersion>>
override this.CreateVersionAsync : 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.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ToolboxVersion>>
Public Overridable Function CreateVersionAsync (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 Task(Of 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.

Applies to