Allow to manage multiple ERI server configurations

This commit is contained in:
tsommer committed 2024-12-28 14:35:11 +01:00
1 parent ff8eb071b9
commit ece0788842
4 files changed
+344 -201

No files matched your search

@@ -1,8 +1,5 @@
using AIStudio.Assistants.ERI;
using AIStudio.Provider;
using OperatingSystem = AIStudio.Assistants.ERI.OperatingSystem;
namespace AIStudio.Settings.DataModel;
public sealed class DataERI
@@ -18,94 +15,9 @@ public sealed class DataERI
public bool PreselectOptions { get; set; } = true;
/// <summary>
/// Preselect the server name?
/// Data for the ERI servers.
/// </summary>
public string PreselectedServerName { get; set; } = string.Empty;
/// <summary>
/// Preselect the server description?
/// </summary>
public string PreselectedServerDescription { get; set; } = string.Empty;
/// <summary>
/// Preselect the ERI version?
/// </summary>
public ERIVersion PreselectedERIVersion { get; set; } = ERIVersion.NONE;
/// <summary>
/// Preselect the language for implementing the ERI?
/// </summary>
public ProgrammingLanguages PreselectedProgrammingLanguage { get; set; }
/// <summary>
/// Do you want to preselect any other language?
/// </summary>
public string PreselectedOtherProgrammingLanguage { get; set; } = string.Empty;
/// <summary>
/// Preselect a data source?
/// </summary>
public DataSources PreselectedDataSource { get; set; }
/// <summary>
/// Do you want to preselect a product name for the data source?
/// </summary>
public string PreselectedDataSourceProductName { get; set; } = string.Empty;
/// <summary>
/// Do you want to preselect any other data source?
/// </summary>
public string PreselectedOtherDataSource { get; set; } = string.Empty;
/// <summary>
/// Do you want to preselect a hostname for the data source?
/// </summary>
public string PreselectedDataSourceHostname { get; set; } = string.Empty;
/// <summary>
/// Do you want to preselect a port for the data source?
/// </summary>
public int? PreselectedDataSourcePort { get; set; }
/// <summary>
/// Did the user type the port number?
/// </summary>
public bool UserTypedPort { get; set; } = false;
/// <summary>
/// Preselect any authentication methods?
/// </summary>
public HashSet<Auth> PreselectedAuthMethods { get; set; } = [];
/// <summary>
/// Do you want to preselect any authentication description?
/// </summary>
public string PreselectedAuthDescription { get; set; } = string.Empty;
/// <summary>
/// Do you want to preselect an operating system? This is necessary when SSO with Kerberos is used.
/// </summary>
public OperatingSystem PreselectedOperatingSystem { get; set; } = OperatingSystem.NONE;
/// <summary>
/// Do you want to preselect which LLM providers are allowed?
/// </summary>
public AllowedLLMProviders PreselectedAllowedLLMProviders { get; set; } = AllowedLLMProviders.NONE;
/// <summary>
/// Do you want to predefine any embedding information?
/// </summary>
public List<EmbeddingInfo> PreselectedEmbeddingInfos { get; set; } = new();
/// <summary>
/// Do you want to predefine any retrieval information?
/// </summary>
public List<RetrievalInfo> PreselectedRetrievalInfos { get; set; } = new();
/// <summary>
/// Do you want to preselect any additional libraries?
/// </summary>
public string PreselectedAdditionalLibraries { get; set; } = string.Empty;
public List<DataERIServer> ERIServers { get; set; } = new();
/// <summary>
/// The minimum confidence level required for a provider to be considered.
@@ -0,0 +1,98 @@
using AIStudio.Assistants.ERI;
using OperatingSystem = AIStudio.Assistants.ERI.OperatingSystem;
namespace AIStudio.Settings.DataModel;
public sealed class DataERIServer
{
/// <summary>
/// Preselect the server name?
/// </summary>
public string ServerName { get; set; } = string.Empty;
/// <summary>
/// Preselect the server description?
/// </summary>
public string ServerDescription { get; set; } = string.Empty;
/// <summary>
/// Preselect the ERI version?
/// </summary>
public ERIVersion ERIVersion { get; set; } = ERIVersion.NONE;
/// <summary>
/// Preselect the language for implementing the ERI?
/// </summary>
public ProgrammingLanguages ProgrammingLanguage { get; set; }
/// <summary>
/// Do you want to preselect any other language?
/// </summary>
public string OtherProgrammingLanguage { get; set; } = string.Empty;
/// <summary>
/// Preselect a data source?
/// </summary>
public DataSources DataSource { get; set; }
/// <summary>
/// Do you want to preselect a product name for the data source?
/// </summary>
public string DataSourceProductName { get; set; } = string.Empty;
/// <summary>
/// Do you want to preselect any other data source?
/// </summary>
public string OtherDataSource { get; set; } = string.Empty;
/// <summary>
/// Do you want to preselect a hostname for the data source?
/// </summary>
public string DataSourceHostname { get; set; } = string.Empty;
/// <summary>
/// Do you want to preselect a port for the data source?
/// </summary>
public int? DataSourcePort { get; set; }
/// <summary>
/// Did the user type the port number?
/// </summary>
public bool UserTypedPort { get; set; } = false;
/// <summary>
/// Preselect any authentication methods?
/// </summary>
public HashSet<Auth> AuthMethods { get; set; } = [];
/// <summary>
/// Do you want to preselect any authentication description?
/// </summary>
public string AuthDescription { get; set; } = string.Empty;
/// <summary>
/// Do you want to preselect an operating system? This is necessary when SSO with Kerberos is used.
/// </summary>
public OperatingSystem OperatingSystem { get; set; } = OperatingSystem.NONE;
/// <summary>
/// Do you want to preselect which LLM providers are allowed?
/// </summary>
public AllowedLLMProviders AllowedLLMProviders { get; set; } = AllowedLLMProviders.NONE;
/// <summary>
/// Do you want to predefine any embedding information?
/// </summary>
public List<EmbeddingInfo> EmbeddingInfos { get; set; } = new();
/// <summary>
/// Do you want to predefine any retrieval information?
/// </summary>
public List<RetrievalInfo> RetrievalInfos { get; set; } = new();
/// <summary>
/// Do you want to preselect any additional libraries?
/// </summary>
public string AdditionalLibraries { get; set; } = string.Empty;
}