FileAccessProvider.ReadOnlyToolsAutoApprovalRule Property
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.
Gets an auto-approval rule that approves the read-only file access tools (ReadFileToolName, LsToolName, and GrepToolName).
public static Func<Microsoft.Extensions.AI.FunctionCallContent,System.Threading.Tasks.ValueTask<bool>> ReadOnlyToolsAutoApprovalRule { get; }
static member ReadOnlyToolsAutoApprovalRule : Func<Microsoft.Extensions.AI.FunctionCallContent, System.Threading.Tasks.ValueTask<bool>>
Public Shared ReadOnly Property ReadOnlyToolsAutoApprovalRule 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 only the tools that read from the file store, while still prompting for tools that modify it (WriteToolName, DeleteFileToolName, ReplaceToolName, and ReplaceLinesToolName).
The rule matches on the tool name, returning true for read-only file access tools and false for all other tool calls so that subsequent rules continue to be evaluated.