ResponseExtensions.GetToolChoiceExpanded(ResponseObject) 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.ResponseObject response);
static member GetToolChoiceExpanded : Azure.AI.AgentServer.Responses.Models.ResponseObject -> Azure.AI.AgentServer.Responses.Models.ToolChoiceParam
<Extension()>
Public Function GetToolChoiceExpanded (response As ResponseObject) As ToolChoiceParam

Parameters

response
ResponseObject

The response.

Returns

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

Exceptions

response is null.

The ToolChoice BinaryData contains an unrecognized value.

Applies to