Freigeben über


CreateResponseExtensions.GetToolChoiceExpanded(CreateResponse) Method

Definition

Expands the ToolChoice BinaryData into a typed ToolChoiceParam. String shorthands ("auto", "required") are expanded to ToolChoiceAllowed with the corresponding mode. "none" returns null.

public static Azure.AI.AgentServer.Responses.Models.ToolChoiceParam? GetToolChoiceExpanded(this Azure.AI.AgentServer.Responses.Models.CreateResponse request);
static member GetToolChoiceExpanded : Azure.AI.AgentServer.Responses.Models.CreateResponse -> Azure.AI.AgentServer.Responses.Models.ToolChoiceParam
<Extension()>
Public Function GetToolChoiceExpanded (request As CreateResponse) As ToolChoiceParam

Parameters

request
CreateResponse

The create-response request.

Returns

The typed tool choice, or null if the tool choice is "none" or unset.

Exceptions

request is null.

The ToolChoice BinaryData contains a JSON value that is neither a recognized string nor a valid ToolChoiceParam object.

Applies to