Share via


AgentToolboxes.CreateToolboxVersionAsync Method

Definition

Overloads

Name Description
CreateToolboxVersionAsync(String, BinaryContent, RequestOptions)

[Protocol Method] Create a new version of a toolbox. If the toolbox does not exist, it will be created.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
CreateToolboxVersionAsync(String, IEnumerable<ProjectsAgentTool>, String, IDictionary<String,String>, ToolboxPolicies, CancellationToken)

Create a new version of a toolbox. If the toolbox does not exist, it will be created.

CreateToolboxVersionAsync(String, BinaryContent, RequestOptions)

Source:
AgentToolboxes.cs

[Protocol Method] Create a new version of a toolbox. If the toolbox does not exist, it will be created.

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

CreateToolboxVersionAsync(String, IEnumerable<ProjectsAgentTool>, String, IDictionary<String,String>, ToolboxPolicies, CancellationToken)

Source:
AgentToolboxes.cs

Create a new version of a toolbox. If the toolbox does not exist, it will be created.

public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ToolboxVersion>> CreateToolboxVersionAsync(string name, System.Collections.Generic.IEnumerable<Azure.AI.Projects.Agents.ProjectsAgentTool> tools, string description = default, System.Collections.Generic.IDictionary<string,string> metadata = default, Azure.AI.Projects.Agents.ToolboxPolicies policies = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateToolboxVersionAsync : string * seq<Azure.AI.Projects.Agents.ProjectsAgentTool> * string * System.Collections.Generic.IDictionary<string, string> * Azure.AI.Projects.Agents.ToolboxPolicies * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ToolboxVersion>>
override this.CreateToolboxVersionAsync : string * seq<Azure.AI.Projects.Agents.ProjectsAgentTool> * string * System.Collections.Generic.IDictionary<string, string> * Azure.AI.Projects.Agents.ToolboxPolicies * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.ToolboxVersion>>
Public Overridable Function CreateToolboxVersionAsync (name As String, tools As IEnumerable(Of ProjectsAgentTool), Optional description As String = Nothing, Optional metadata As IDictionary(Of String, String) = 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<ProjectsAgentTool>

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.

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