mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-04 22:09:40 +00:00
Added embedding provider config (#622)
This commit is contained in:
1 parent
30197cf507
commit
7110fb866f
12 files changed
+166
-26
No files matched your search
@@ -27,7 +27,7 @@ public partial class DataSourceLocalDirectoryInfoDialog : MSGComponentBase, IAsy
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
this.embeddingProvider = this.SettingsManager.ConfigurationData.EmbeddingProviders.FirstOrDefault(x => x.Id == this.DataSource.EmbeddingId);
|
||||
this.embeddingProvider = this.SettingsManager.ConfigurationData.EmbeddingProviders.FirstOrDefault(x => x.Id == this.DataSource.EmbeddingId) ?? EmbeddingProvider.NONE;
|
||||
this.directoryInfo = new DirectoryInfo(this.DataSource.Path);
|
||||
|
||||
if (this.directoryInfo.Exists)
|
||||
@@ -46,7 +46,7 @@ public partial class DataSourceLocalDirectoryInfoDialog : MSGComponentBase, IAsy
|
||||
|
||||
private readonly CancellationTokenSource cts = new();
|
||||
|
||||
private EmbeddingProvider embeddingProvider;
|
||||
private EmbeddingProvider embeddingProvider = EmbeddingProvider.NONE;
|
||||
private DirectoryInfo directoryInfo = null!;
|
||||
private long directorySizeBytes;
|
||||
private long directorySizeNumFiles;
|
||||
|
||||
Reference in new issue
Block a user