HostAIProviderPermissions class
What the user allows an AI model to do, by the three boxes under the model in the AI group of IDE Options. Reached through HostAIProvider.Permissions.
Important
The IDE does not enforce these permissions; the add-in does. Before it registers a tool that reads the project’s files, changes them or runs code, an add-in checks the matching property, and leaves the tool out when it is False. The dialog says so under each model: Permissions are enforced by each individual Add-In.
Private Sub AddTools(ByVal Provider As HostAIProvider, ByVal Chat As AIConversation)
If Provider.Permissions.AllowRead Then
Chat.RegisterTool "read_file", "Returns the text of a file of the project", _
"{""type"": ""object"", ""properties"": {""path"": {""type"": ""string""}}, ""required"": [""path""]}"
End If
End Sub
Properties
AllowExecute
True when Allow AI to execute code is ticked. Boolean, read-only.
AllowRead
True when Allow AI to read source files is ticked. Boolean, read-only.
AllowWrite
True when Allow AI to write source files is ticked. Boolean, read-only.
See Also
- HostAIProvider.Permissions property
- AIConversation.RegisterTool method