mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-05 03:29:40 +00:00
Added security checks for confidence levels
This commit is contained in:
1 parent
3eca153f83
commit
185a99c9ed
22 files changed
+322
-125
No files matched your search
@@ -49,7 +49,6 @@ public partial class DataSourceLocalFileDialog : MSGComponentBase
|
||||
private int dataChunkOverlapTokenLength;
|
||||
private ushort dataMaxMatches = 10;
|
||||
private bool showExpertSettings;
|
||||
private DataSourceSecurity dataSecurityPolicy;
|
||||
private ConfidenceLevel dataComplianceLevel = ConfidenceLevel.UNKNOWN;
|
||||
|
||||
// We get the form reference from Blazor code to validate it manually:
|
||||
@@ -60,6 +59,10 @@ public partial class DataSourceLocalFileDialog : MSGComponentBase
|
||||
this.dataSourceValidation = new()
|
||||
{
|
||||
GetSelectedCloudEmbedding = () => this.SelectedCloudEmbedding,
|
||||
GetSelectedEmbeddingProvider = () => this.SelectedEmbedding,
|
||||
GetSecurityPolicy = () => DataSourceSecurity.ALLOW_ANY,
|
||||
GetComplianceLevel = () => this.dataComplianceLevel,
|
||||
GetSettingsManager = () => this.SettingsManager,
|
||||
GetPreviousDataSourceName = () => this.dataEditingPreviousInstanceName,
|
||||
GetUsedDataSourceNames = () => this.UsedDataSourcesNames,
|
||||
};
|
||||
@@ -87,7 +90,6 @@ public partial class DataSourceLocalFileDialog : MSGComponentBase
|
||||
this.dataFilePath = this.DataSource.FilePath;
|
||||
this.dataMaxChunkTokenLength = this.DataSource.MaxChunkTokenLength;
|
||||
this.dataChunkOverlapTokenLength = this.DataSource.ChunkOverlapTokenLength;
|
||||
this.dataSecurityPolicy = this.DataSource.SecurityPolicy;
|
||||
this.dataComplianceLevel = this.DataSource.ComplianceLevel;
|
||||
this.dataMaxMatches = this.DataSource.MaxMatches;
|
||||
this.showExpertSettings = this.dataMaxChunkTokenLength > 0 || this.dataChunkOverlapTokenLength > 0;
|
||||
@@ -143,7 +145,7 @@ public partial class DataSourceLocalFileDialog : MSGComponentBase
|
||||
FilePath = this.CanChangeSourceAndEmbedding ? this.dataFilePath : this.DataSource.FilePath,
|
||||
MaxChunkTokenLength = this.dataMaxChunkTokenLength,
|
||||
ChunkOverlapTokenLength = this.dataChunkOverlapTokenLength,
|
||||
SecurityPolicy = this.dataSecurityPolicy,
|
||||
SecurityPolicy = DataSourceSecurity.ALLOW_ANY,
|
||||
ComplianceLevel = this.dataComplianceLevel,
|
||||
MaxMatches = this.dataMaxMatches,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user