2026-07-05 14:46:31 +02:00
|
|
|
using System.Linq.Expressions;
|
|
|
|
|
|
2026-11-21 19:47:10 +01:00
|
|
|
using AIStudio.Provider;
|
|
|
|
|
|
2025-02-17 12:33:34 +01:00
|
|
|
namespace AIStudio.Settings.DataModel;
|
|
|
|
|
|
2026-11-27 12:08:00 +01:00
|
|
|
public sealed class DataDataSourceSelection(Expression<Func<Data, DataDataSourceSelection>>? configSelection = null)
|
2025-02-17 12:33:34 +01:00
|
|
|
{
|
2026-07-05 14:46:31 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// The default constructor for the JSON deserializer.
|
|
|
|
|
/// </summary>
|
2026-11-27 12:08:00 +01:00
|
|
|
public DataDataSourceSelection() : this(null)
|
2026-07-05 14:46:31 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-17 12:33:34 +01:00
|
|
|
/// <summary>
|
2025-02-22 20:51:06 +01:00
|
|
|
/// Preselect any data source selection options?
|
2025-02-17 12:33:34 +01:00
|
|
|
/// </summary>
|
2026-11-27 12:08:00 +01:00
|
|
|
public bool PreselectOptions { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectOptions, false);
|
2025-02-17 12:33:34 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
2025-02-22 20:51:06 +01:00
|
|
|
/// Preselect a data source selection provider?
|
2025-02-17 12:33:34 +01:00
|
|
|
/// </summary>
|
2026-11-27 12:08:00 +01:00
|
|
|
public string PreselectedProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedProvider, string.Empty);
|
2026-11-21 19:47:10 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The minimum confidence level of the provider which selects the data sources.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
2026-11-27 12:08:00 +01:00
|
|
|
/// It applies only while PreselectOptions is on, and then to every provider which selects them, the fallbacks included.
|
2026-11-21 19:47:10 +01:00
|
|
|
/// </remarks>
|
|
|
|
|
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE);
|
2025-02-17 12:33:34 +01:00
|
|
|
}
|