mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 11:47:21 +00:00
Merge
This commit is contained in:
1 parent
7137e58249
commit
abb1e3f52d
43 files changed
+402
-138
No files matched your search
@@ -51,6 +51,9 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
|
||||
/// <inheritdoc />
|
||||
public ERIVersion Version { get; init; } = ERIVersion.V1;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string SelectedRetrievalId { get; init; } = string.Empty;
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(IContent lastPrompt, ChatThread thread, CancellationToken token = default)
|
||||
{
|
||||
@@ -74,7 +77,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
|
||||
|
||||
Thread = await thread.ToERIChatThread(token),
|
||||
MaxMatches = 10,
|
||||
RetrievalProcessId = null, // The ERI server selects the retrieval process when multiple processes are available
|
||||
RetrievalProcessId = string.IsNullOrWhiteSpace(this.SelectedRetrievalId) ? null : this.SelectedRetrievalId,
|
||||
Parameters = null, // The ERI server selects useful default parameters
|
||||
};
|
||||
|
||||
@@ -97,7 +100,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
|
||||
Links = eriContext.Links,
|
||||
Category = eriContext.Type.ToRetrievalContentCategory(),
|
||||
MatchedText = eriContext.MatchedContent,
|
||||
DataSourceName = eriContext.Name,
|
||||
DataSourceName = this.Name,
|
||||
SurroundingContent = eriContext.SurroundingContent,
|
||||
});
|
||||
break;
|
||||
@@ -111,7 +114,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
|
||||
Source = eriContext.MatchedContent,
|
||||
Category = eriContext.Type.ToRetrievalContentCategory(),
|
||||
SourceType = ContentImageSource.BASE64,
|
||||
DataSourceName = eriContext.Name,
|
||||
DataSourceName = this.Name,
|
||||
});
|
||||
break;
|
||||
|
||||
|
||||
@@ -29,4 +29,9 @@ public interface IERIDataSource : IExternalDataSource
|
||||
/// The ERI specification to use.
|
||||
/// </summary>
|
||||
public ERIVersion Version { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The ID of the selected retrieval process.
|
||||
/// </summary>
|
||||
public string SelectedRetrievalId { get; init; }
|
||||
}
|
||||
Reference in new issue
Block a user