using System.Linq.Expressions; using AIStudio.Provider; namespace AIStudio.Settings.DataModel; public sealed class DataAgentRetrievalContextValidation(Expression>? configSelection = null) { /// /// The default constructor for the JSON deserializer. /// public DataAgentRetrievalContextValidation() : this(null) { } /// /// Enable the retrieval context validation? /// public bool EnableRetrievalContextValidation { get; set; } = ManagedConfiguration.Register(configSelection, n => n.EnableRetrievalContextValidation, false); /// /// Preselect any retrieval context validation options? /// public bool PreselectAgentOptions { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectAgentOptions, false); /// /// Preselect a retrieval context validation provider? /// public string PreselectedAgentProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedAgentProvider, string.Empty); /// /// The minimum confidence level of the provider which validates the retrieval contexts. /// /// /// It applies only while PreselectAgentOptions is on, and then to every provider which validates them, the fallbacks included. /// public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE); /// /// Configure how many parallel validations to run. /// public int NumParallelValidations { get; set; } = ManagedConfiguration.Register(configSelection, n => n.NumParallelValidations, 3); }