Files
AI-Studio/app/MindWork AI Studio/Settings/DataModel/DataDataSourceSelection.cs
T

33 lines
1.3 KiB
C#
Raw Normal View History

using System.Linq.Expressions;
using AIStudio.Provider;
namespace AIStudio.Settings.DataModel;
2026-11-27 12:08:00 +01:00
public sealed class DataDataSourceSelection(Expression<Func<Data, DataDataSourceSelection>>? configSelection = null)
{
/// <summary>
/// The default constructor for the JSON deserializer.
/// </summary>
2026-11-27 12:08:00 +01:00
public DataDataSourceSelection() : this(null)
{
}
/// <summary>
/// Preselect any data source selection options?
/// </summary>
2026-11-27 12:08:00 +01:00
public bool PreselectOptions { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectOptions, false);
/// <summary>
/// Preselect a data source selection provider?
/// </summary>
2026-11-27 12:08:00 +01:00
public string PreselectedProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedProvider, string.Empty);
/// <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.
/// </remarks>
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE);
}