mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 08:18:00 +00:00
Defined interfaces for internal & external data sources
This commit is contained in:
5 files changed
+21
-3
No files matched your search
@@ -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>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace AIStudio.Settings;
|
||||
|
||||
public interface IExternalDataSource : IDataSource;
|
||||
@@ -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; }
|
||||
}
|
||||
Reference in new issue
Block a user