2025-05-18 19:31:15 +00:00
@inherits MSGComponentBase
2025-01-01 14:49:27 +00:00
<MudDialog>
<DialogContent>
<MudForm @ref="@this.form" @bind-IsValid="@this.dataIsValid" @bind-Errors="@this.dataIssues">
@* ReSharper disable once CSharpWarnings::CS8974 *@
<MudTextField
T="string"
@bind-Text="@this.DataEmbeddingName"
2025-05-18 19:31:15 +00:00
Label="@T("Embedding Name")"
HelperText="@T("The name of the embedding method.")"
2025-01-01 14:49:27 +00:00
Class="mb-3"
Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Label"
AdornmentColor="Color.Info"
Validation="@this.ValidateName"
Counter="26"
MaxLength="26"
Immediate="@true"
UserAttributes="@SPELLCHECK_ATTRIBUTES"
/>
@* ReSharper disable once CSharpWarnings::CS8974 *@
<MudTextField
T="string"
@bind-Text="@this.DataEmbeddingType"
2025-05-18 19:31:15 +00:00
Label="@T("Embedding Type")"
HelperText="@T("What kind of embedding is used. For example, Transformer Embedding, Contextual Word Embedding, Graph Embedding, etc.")"
2025-01-01 14:49:27 +00:00
Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Extension"
AdornmentColor="Color.Info"
Counter="56"
MaxLength="56"
Validation="@this.ValidateType"
Immediate="@true"
UserAttributes="@SPELLCHECK_ATTRIBUTES"
/>
<MudList T="@string" Class="mb-3">
2025-05-18 19:31:15 +00:00
<MudListItem Icon="@Icons.Material.Filled.Link" Href="https://en.wikipedia.org/wiki/Word_embedding" Target="_blank" Text="@T("See Wikipedia for more information about word embeddings")"/>
<MudListItem Icon="@Icons.Material.Filled.Link" Href="https://en.wikipedia.org/wiki/Knowledge_graph_embedding" Target="_blank" Text="@T("See Wikipedia for more information about knowledge graph embeddings")"/>
2025-01-01 14:49:27 +00:00
</MudList>
@* ReSharper disable once CSharpWarnings::CS8974 *@
<MudTextField
T="string"
@bind-Text="@this.DataDescription"
2025-05-18 19:31:15 +00:00
Label="@T("Embedding Description")"
HelperText="@T("A short description of the embedding method.")"
2025-01-01 14:49:27 +00:00
Lines="3"
AutoGrow="@true"
MaxLines="6"
Immediate="@true"
Variant="Variant.Outlined"
Class="mb-3"
Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Extension"
AdornmentColor="Color.Info"
Validation="@this.ValidateDescription"
UserAttributes="@SPELLCHECK_ATTRIBUTES"
/>
@* ReSharper disable once CSharpWarnings::CS8974 *@
<MudTextField
T="string"
@bind-Text="@this.DataUsedWhen"
2025-05-18 19:31:15 +00:00
Label="@T("Used when")"
HelperText="@T("When is this embedding used? When you define multiple embeddings, it is helpful to know when to use which one.")"
2025-01-01 14:49:27 +00:00
Lines="3"
AutoGrow="@true"
MaxLines="6"
Immediate="@true"
Variant="Variant.Outlined"
Class="mb-3"
Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Assessment"
AdornmentColor="Color.Info"
Validation="@this.ValidateUsedWhen"
UserAttributes="@SPELLCHECK_ATTRIBUTES"
/>
@* ReSharper disable once CSharpWarnings::CS8974 *@
<MudTextField
T="string"
@bind-Text="@this.DataLink"
2025-05-18 19:31:15 +00:00
Label="@T("Embedding Link")"
HelperText="@T("A link to the embedding, e.g., to the model, the source code, the paper, it's Wikipedia page, etc.")"
2025-01-01 14:49:27 +00:00
Class="mb-3"
Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Link"
AdornmentColor="Color.Info"
UserAttributes="@SPELLCHECK_ATTRIBUTES"
/>
</MudForm>
<Issues IssuesData="@this.dataIssues"/>
</DialogContent>
<DialogActions>
2025-05-18 19:31:15 +00:00
<MudButton OnClick="@this.Cancel" Variant="Variant.Filled">
@T("Cancel")
</MudButton>
2025-01-01 14:49:27 +00:00
<MudButton OnClick="@this.Store" Variant="Variant.Filled" Color="Color.Primary">
@if(this.IsEditing)
{
2025-05-18 19:31:15 +00:00
@T("Update")
2025-01-01 14:49:27 +00:00
}
else
{
2025-05-18 19:31:15 +00:00
@T("Add")
2025-01-01 14:49:27 +00:00
}
</MudButton>
</DialogActions>
</MudDialog>