using AIStudio.Provider; using Microsoft.AspNetCore.Components; namespace AIStudio.Components; /// /// A provider selection with the confidence of the selected provider next to it, for a page which lets the user choose /// several providers: the confidence card in the footer of an assistant knows only one of them. /// /// /// The confidence shows only when the user wants to see it, see DataConfidence.ShowProviderConfidence. Like /// ProviderSelection, this takes the component from the cascading parameter of its page. /// public partial class ProviderSelectionWithConfidence : MSGComponentBase { /// /// Gets or sets the selected provider. /// [Parameter] public AIStudio.Settings.Provider ProviderSettings { get; set; } = AIStudio.Settings.Provider.NONE; /// /// Gets or sets what happens when the user selects another provider. /// [Parameter] public EventCallback ProviderSettingsChanged { get; set; } /// /// Gets or sets the validation of the selected provider, which returns an issue or null. /// [Parameter] public Func ValidateProvider { get; set; } = _ => null; /// /// Gets or sets the confidence a provider needs at least to be offered, when it is higher than the minimum of the /// component, see ProviderSelection.ExplicitMinimumConfidence. /// [Parameter] public ConfidenceLevel ExplicitMinimumConfidence { get; set; } = ConfidenceLevel.UNKNOWN; /// /// Gets or sets whether the selection is disabled, see ProviderSelection.Disabled. /// [Parameter] public bool Disabled { get; set; } }