ToolChoiceAllowed Constructor

Definition

Initializes a new instance of ToolChoiceAllowed.

public ToolChoiceAllowed(Azure.AI.AgentServer.Responses.Models.ToolChoiceAllowedMode mode, System.Collections.Generic.IEnumerable<System.Collections.Generic.IDictionary<string,BinaryData>> tools);
new Azure.AI.AgentServer.Responses.Models.ToolChoiceAllowed : Azure.AI.AgentServer.Responses.Models.ToolChoiceAllowedMode * seq<System.Collections.Generic.IDictionary<string, BinaryData>> -> Azure.AI.AgentServer.Responses.Models.ToolChoiceAllowed
Public Sub New (mode As ToolChoiceAllowedMode, tools As IEnumerable(Of IDictionary(Of String, BinaryData)))

Parameters

mode
ToolChoiceAllowedMode

Constrains the tools available to the model to a pre-defined set. auto allows the model to pick from among the allowed tools and generate a message. required requires the model to call one or more of the allowed tools.

tools
IEnumerable<IDictionary<String,BinaryData>>

A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like:

[
  { "type": "function", "name": "get_weather" },
  { "type": "mcp", "server_label": "deepwiki" },
  { "type": "image_generation" }
]

Exceptions

tools is null.

Applies to