mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 21:59:48 +00:00
Renamed embedding dialog for embedding providers
This commit is contained in:
parent
720c530e28
commit
07df50bbb7
@ -8,7 +8,7 @@ using Host = AIStudio.Provider.SelfHosted.Host;
|
|||||||
|
|
||||||
namespace AIStudio.Dialogs;
|
namespace AIStudio.Dialogs;
|
||||||
|
|
||||||
public partial class EmbeddingDialog : ComponentBase, ISecretId
|
public partial class EmbeddingProviderDialog : ComponentBase, ISecretId
|
||||||
{
|
{
|
||||||
[CascadingParameter]
|
[CascadingParameter]
|
||||||
private MudDialogInstance MudDialog { get; set; } = null!;
|
private MudDialogInstance MudDialog { get; set; } = null!;
|
||||||
@ -97,7 +97,7 @@ public partial class EmbeddingDialog : ComponentBase, ISecretId
|
|||||||
private readonly Encryption encryption = Program.ENCRYPTION;
|
private readonly Encryption encryption = Program.ENCRYPTION;
|
||||||
private readonly ProviderValidation providerValidation;
|
private readonly ProviderValidation providerValidation;
|
||||||
|
|
||||||
public EmbeddingDialog()
|
public EmbeddingProviderDialog()
|
||||||
{
|
{
|
||||||
this.providerValidation = new()
|
this.providerValidation = new()
|
||||||
{
|
{
|
@ -183,12 +183,12 @@ public partial class Settings : ComponentBase, IMessageBusReceiver, IDisposable
|
|||||||
|
|
||||||
private async Task AddEmbeddingProvider()
|
private async Task AddEmbeddingProvider()
|
||||||
{
|
{
|
||||||
var dialogParameters = new DialogParameters<EmbeddingDialog>
|
var dialogParameters = new DialogParameters<EmbeddingProviderDialog>
|
||||||
{
|
{
|
||||||
{ x => x.IsEditing, false },
|
{ x => x.IsEditing, false },
|
||||||
};
|
};
|
||||||
|
|
||||||
var dialogReference = await this.DialogService.ShowAsync<EmbeddingDialog>("Add Embedding Provider", dialogParameters, DialogOptions.FULLSCREEN);
|
var dialogReference = await this.DialogService.ShowAsync<EmbeddingProviderDialog>("Add Embedding Provider", dialogParameters, DialogOptions.FULLSCREEN);
|
||||||
var dialogResult = await dialogReference.Result;
|
var dialogResult = await dialogReference.Result;
|
||||||
if (dialogResult is null || dialogResult.Canceled)
|
if (dialogResult is null || dialogResult.Canceled)
|
||||||
return;
|
return;
|
||||||
@ -205,7 +205,7 @@ public partial class Settings : ComponentBase, IMessageBusReceiver, IDisposable
|
|||||||
|
|
||||||
private async Task EditEmbeddingProvider(EmbeddingProvider embeddingProvider)
|
private async Task EditEmbeddingProvider(EmbeddingProvider embeddingProvider)
|
||||||
{
|
{
|
||||||
var dialogParameters = new DialogParameters<EmbeddingDialog>
|
var dialogParameters = new DialogParameters<EmbeddingProviderDialog>
|
||||||
{
|
{
|
||||||
{ x => x.DataNum, embeddingProvider.Num },
|
{ x => x.DataNum, embeddingProvider.Num },
|
||||||
{ x => x.DataId, embeddingProvider.Id },
|
{ x => x.DataId, embeddingProvider.Id },
|
||||||
@ -218,7 +218,7 @@ public partial class Settings : ComponentBase, IMessageBusReceiver, IDisposable
|
|||||||
{ x => x.DataHost, embeddingProvider.Host },
|
{ x => x.DataHost, embeddingProvider.Host },
|
||||||
};
|
};
|
||||||
|
|
||||||
var dialogReference = await this.DialogService.ShowAsync<EmbeddingDialog>("Edit Embedding Provider", dialogParameters, DialogOptions.FULLSCREEN);
|
var dialogReference = await this.DialogService.ShowAsync<EmbeddingProviderDialog>("Edit Embedding Provider", dialogParameters, DialogOptions.FULLSCREEN);
|
||||||
var dialogResult = await dialogReference.Result;
|
var dialogResult = await dialogReference.Result;
|
||||||
if (dialogResult is null || dialogResult.Canceled)
|
if (dialogResult is null || dialogResult.Canceled)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user