ToolApprovalRequestContentExtensions.CreateAlwaysApproveToolResponse Method
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.
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.