Ensure that we can use ERI servers of different versions

This commit is contained in:
Thorsten Sommer 2025-01-05 21:39:09 +01:00
parent b5fbbfae51
commit c1e0bae9a7
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
3 changed files with 12 additions and 4 deletions

View File

@ -1,11 +1,14 @@
using ERI_Client.V1;
// ReSharper disable InconsistentNaming
namespace AIStudio.Settings.DataModel;
/// <summary>
/// An external data source, accessed via an ERI server, cf. https://github.com/MindWorkAI/ERI.
/// </summary>
public readonly record struct DataSourceERI : IDataSource
public readonly record struct DataSourceERI_V1 : IDataSource
{
public DataSourceERI()
public DataSourceERI_V1()
{
}
@ -30,4 +33,9 @@ public readonly record struct DataSourceERI : IDataSource
/// The port of the ERI server.
/// </summary>
public int Port { get; init; }
/// <summary>
/// The authentication method to use.
/// </summary>
public AuthMethod AuthMethod { get; init; } = AuthMethod.NONE;
}

View File

@ -23,5 +23,5 @@ public enum DataSourceType
/// <summary>
/// External data source accessed via an ERI server, cf. https://github.com/MindWorkAI/ERI.
/// </summary>
ERI,
ERI_V1,
}

View File

@ -16,7 +16,7 @@ public static class DataSourceTypeExtension
{
DataSourceType.LOCAL_FILE => "Local File",
DataSourceType.LOCAL_DIRECTORY => "Local Directory",
DataSourceType.ERI => "External ERI Server",
DataSourceType.ERI_V1 => "External ERI Server (v1)",
_ => "None",
};