mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 23:07:23 +00:00
Outbound data restrictions after searching data sources (#1106)
This commit is contained in:
1 parent
7ba5f01388
commit
8c5cfa78b6
61 files changed
+1389
-143
No files matched your search
@@ -59,6 +59,7 @@ public partial class DataSourceLocalFileDialog : MSGComponentBase
|
||||
private bool showExpertSettings;
|
||||
private bool revalidateAfterRender;
|
||||
private ConfidenceLevel dataConfidenceLevel = ConfidenceLevel.UNKNOWN;
|
||||
private OutboundDataRestriction dataOutboundDataRestriction = DataSourceOutboundDataExtensions.DEFAULT_OUTBOUND_DATA_RESTRICTION;
|
||||
|
||||
// We get the form reference from Blazor code to validate it manually:
|
||||
private MudForm form = null!;
|
||||
@@ -108,6 +109,7 @@ public partial class DataSourceLocalFileDialog : MSGComponentBase
|
||||
this.dataMaxChunkTokenLength = this.DataSource.MaxChunkTokenLength;
|
||||
this.dataChunkOverlapTokenLength = this.DataSource.ChunkOverlapTokenLength;
|
||||
this.dataConfidenceLevel = this.DataSource.ConfidenceLevel;
|
||||
this.dataOutboundDataRestriction = this.DataSource.OutboundDataRestriction;
|
||||
this.dataMaxMatches = this.DataSource.MaxMatches;
|
||||
}
|
||||
|
||||
@@ -198,6 +200,22 @@ public partial class DataSourceLocalFileDialog : MSGComponentBase
|
||||
|
||||
private IEnumerable<ConfigurationSelectData<ConfidenceLevel>> ConfidenceLevels => ConfigurationSelectDataFactory.GetDataSourceConfidenceLevelsData();
|
||||
|
||||
private OutboundDataRestriction OrganizationMinimumOutboundDataRestriction => this.SettingsManager.ConfigurationData.DataSourceSecurity.MinimumOutboundDataRestriction;
|
||||
|
||||
/// <summary>
|
||||
/// The level the data source gets: the one chosen, as far as the organization allows it.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The organization may rule out a level while the dialog is open, or after the data source was
|
||||
/// stored with it. The choice itself stays, so the dialog shows it again once the organization
|
||||
/// allows it again.
|
||||
/// </remarks>
|
||||
private OutboundDataRestriction SelectedOutboundDataRestriction
|
||||
{
|
||||
get => this.dataOutboundDataRestriction.StricterOf(this.OrganizationMinimumOutboundDataRestriction);
|
||||
set => this.dataOutboundDataRestriction = value;
|
||||
}
|
||||
|
||||
private string SelectedEmbeddingTokenizerText => this.SelectedEmbedding is null
|
||||
? T("No embedding selected")
|
||||
: string.IsNullOrWhiteSpace(this.SelectedEmbedding.TokenizerPath)
|
||||
@@ -227,6 +245,7 @@ public partial class DataSourceLocalFileDialog : MSGComponentBase
|
||||
MaxChunkTokenLength = this.dataMaxChunkTokenLength,
|
||||
ChunkOverlapTokenLength = this.dataChunkOverlapTokenLength,
|
||||
ConfidenceLevel = this.dataConfidenceLevel,
|
||||
OutboundDataRestriction = this.SelectedOutboundDataRestriction,
|
||||
MaxMatches = this.dataMaxMatches,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user