mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 17:39:47 +00:00
Defined interfaces for internal & external data sources
This commit is contained in:
parent
3ad627566a
commit
bcbb7d2d92
@ -6,7 +6,7 @@ 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_V1 : IDataSource
|
||||
public readonly record struct DataSourceERI_V1 : IExternalDataSource
|
||||
{
|
||||
public DataSourceERI_V1()
|
||||
{
|
||||
|
@ -3,7 +3,7 @@ namespace AIStudio.Settings.DataModel;
|
||||
/// <summary>
|
||||
/// Represents a local directory as a data source.
|
||||
/// </summary>
|
||||
public readonly record struct DataSourceLocalDirectory : IDataSource
|
||||
public readonly record struct DataSourceLocalDirectory : IInternalDataSource
|
||||
{
|
||||
public DataSourceLocalDirectory()
|
||||
{
|
||||
@ -21,6 +21,9 @@ public readonly record struct DataSourceLocalDirectory : IDataSource
|
||||
/// <inheritdoc />
|
||||
public DataSourceType Type { get; init; } = DataSourceType.NONE;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string EmbeddingId { get; init; } = Guid.Empty.ToString();
|
||||
|
||||
/// <summary>
|
||||
/// The path to the directory.
|
||||
/// </summary>
|
||||
|
@ -3,7 +3,7 @@ namespace AIStudio.Settings.DataModel;
|
||||
/// <summary>
|
||||
/// Represents one local file as a data source.
|
||||
/// </summary>
|
||||
public readonly record struct DataSourceLocalFile : IDataSource
|
||||
public readonly record struct DataSourceLocalFile : IInternalDataSource
|
||||
{
|
||||
public DataSourceLocalFile()
|
||||
{
|
||||
@ -21,6 +21,9 @@ public readonly record struct DataSourceLocalFile : IDataSource
|
||||
/// <inheritdoc />
|
||||
public DataSourceType Type { get; init; } = DataSourceType.NONE;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string EmbeddingId { get; init; } = Guid.Empty.ToString();
|
||||
|
||||
/// <summary>
|
||||
/// The path to the file.
|
||||
/// </summary>
|
||||
|
3
app/MindWork AI Studio/Settings/IExternalDataSource.cs
Normal file
3
app/MindWork AI Studio/Settings/IExternalDataSource.cs
Normal file
@ -0,0 +1,3 @@
|
||||
namespace AIStudio.Settings;
|
||||
|
||||
public interface IExternalDataSource : IDataSource;
|
9
app/MindWork AI Studio/Settings/IInternalDataSource.cs
Normal file
9
app/MindWork AI Studio/Settings/IInternalDataSource.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace AIStudio.Settings;
|
||||
|
||||
public interface IInternalDataSource : IDataSource
|
||||
{
|
||||
/// <summary>
|
||||
/// The unique identifier of the embedding method used by this internal data source.
|
||||
/// </summary>
|
||||
public string EmbeddingId { get; init; }
|
||||
}
|
Loading…
Reference in New Issue
Block a user