mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-05 01:29:40 +00:00
Add configuration for maximum matches per query across data sources (#484)
This commit is contained in:
1 parent
c08881784d
commit
1e19c05c57
17 files changed
+115
-2
No files matched your search
@@ -53,6 +53,9 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
|
||||
|
||||
/// <inheritdoc />
|
||||
public string SelectedRetrievalId { get; init; } = string.Empty;
|
||||
|
||||
/// <inheritdoc />
|
||||
public ushort MaxMatches { get; init; } = 10;
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(IContent lastPrompt, ChatThread thread, CancellationToken token = default)
|
||||
@@ -76,7 +79,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
|
||||
},
|
||||
|
||||
Thread = await thread.ToERIChatThread(token),
|
||||
MaxMatches = 10,
|
||||
MaxMatches = this.MaxMatches,
|
||||
RetrievalProcessId = string.IsNullOrWhiteSpace(this.SelectedRetrievalId) ? null : this.SelectedRetrievalId,
|
||||
Parameters = null, // The ERI server selects useful default parameters
|
||||
};
|
||||
|
||||
@@ -30,6 +30,9 @@ public readonly record struct DataSourceLocalDirectory : IInternalDataSource
|
||||
/// <inheritdoc />
|
||||
public DataSourceSecurity SecurityPolicy { get; init; } = DataSourceSecurity.NOT_SPECIFIED;
|
||||
|
||||
/// <inheritdoc />
|
||||
public ushort MaxMatches { get; init; } = 10;
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(IContent lastPrompt, ChatThread thread, CancellationToken token = default)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,9 @@ public readonly record struct DataSourceLocalFile : IInternalDataSource
|
||||
/// <inheritdoc />
|
||||
public DataSourceSecurity SecurityPolicy { get; init; } = DataSourceSecurity.NOT_SPECIFIED;
|
||||
|
||||
/// <inheritdoc />
|
||||
public ushort MaxMatches { get; init; } = 10;
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(IContent lastPrompt, ChatThread thread, CancellationToken token = default)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user