ToolApprovalRequestContentExtensions.CreateAlwaysApproveToolResponse Method

Definition

Creates an approved AlwaysApproveToolApprovalResponseContent that also instructs the middleware to always approve future calls to the same tool, regardless of the arguments provided.

public static Microsoft.Agents.AI.AlwaysApproveToolApprovalResponseContent CreateAlwaysApproveToolResponse(this Microsoft.Extensions.AI.ToolApprovalRequestContent request, string? reason = default);
static member CreateAlwaysApproveToolResponse : Microsoft.Extensions.AI.ToolApprovalRequestContent * string -> Microsoft.Agents.AI.AlwaysApproveToolApprovalResponseContent
<Extension()>
Public Function CreateAlwaysApproveToolResponse (request As ToolApprovalRequestContent, Optional reason As String = Nothing) As AlwaysApproveToolApprovalResponseContent

Parameters

request
ToolApprovalRequestContent

The tool approval request to respond to.

reason
String

An optional reason for the approval.

Returns

An AlwaysApproveToolApprovalResponseContent wrapping an approved ToolApprovalResponseContent with the AlwaysApproveTool flag set to true.

Applies to