ToolChoiceAllowed Constructor
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.
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
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.