FileAccessProvider.AllToolsAutoApprovalRule Property

Definition

Gets an auto-approval rule that approves all file access tools, including the tools that modify the file store (WriteToolName, DeleteFileToolName, ReplaceToolName, and ReplaceLinesToolName).

public static Func<Microsoft.Extensions.AI.FunctionCallContent,System.Threading.Tasks.ValueTask<bool>> AllToolsAutoApprovalRule { get; }
static member AllToolsAutoApprovalRule : Func<Microsoft.Extensions.AI.FunctionCallContent, System.Threading.Tasks.ValueTask<bool>>
Public Shared ReadOnly Property AllToolsAutoApprovalRule As Func(Of FunctionCallContent, ValueTask(Of Boolean))

Property Value

Remarks

By default, the tools exposed by FileAccessProvider require approval. Add this rule to AutoApprovalRules to automatically approve every file access tool without prompting the user.

The rule matches on the tool name, returning true for any file access tool and false for all other tool calls so that subsequent rules continue to be evaluated.

Applies to