using System.Linq.Expressions; using AIStudio.Provider; namespace AIStudio.Settings.DataModel; /// /// Stores the options of the Model Comparison assistant, which an organization may manage except for the preset. /// /// The managed-configuration selector. public sealed class DataModelComparison(Expression>? configSelection = null) { /// /// The value of a model setting which preselects no model at all. /// /// /// An empty text already means the provider which the whole app preselects, as in every other assistant, so /// "no model" needs a value of its own. It is the ID of Provider.NONE, an empty GUID, which a configuration /// plugin can set as well, since the plugin reads these settings as GUIDs. ConfigurationProviderSelection /// offers the same value for its entry without a provider. /// public static readonly string NO_MODEL = Provider.NONE.Id; /// /// Initializes unmanaged options of the Model Comparison assistant. /// public DataModelComparison() : this(null) { } /// /// Gets or sets whether the options below apply. Without them, new presets and comparison series start with the /// provider of the whole app as their first model and without a judge. /// public bool PreselectOptions { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectOptions, false); /// /// Gets or sets the minimum confidence which every model of a comparison needs, the judge included. /// public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, value => value.MinimumProviderConfidence, ConfidenceLevel.NONE); /// /// Gets or sets the model which every new preset and every new comparison series starts with as its first model, /// e.g., the model the user works with every day and wants to test new models against. /// /// /// NO_MODEL preselects none, and an empty text the provider which the whole app preselects. /// public string PreselectedProvider { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedProvider, NO_MODEL); /// /// Gets or sets the judge which every new preset and every new comparison series starts with. A preselected /// judge also switches the judge on. /// /// /// NO_MODEL preselects none and leaves the judge off, and an empty text the provider which the whole app preselects. /// public string PreselectedJudgeProvider { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedJudgeProvider, NO_MODEL); /// /// Gets or sets the ID of the preset which the mode Answer Variance opens with, or an empty text for none. /// /// /// Not managed: the presets belong to the user alone, as files of the data directory, so no organization can /// know their IDs. /// public string PreselectedPresetId { get; set; } = string.Empty; }