mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 18:32:12 +00:00
fixed the expert settings for datasource_file
This commit is contained in:
parent
c8c1e38475
commit
f9263b02dd
@ -138,7 +138,7 @@
|
|||||||
ReadOnly="@true"
|
ReadOnly="@true"
|
||||||
Variant="Variant.Outlined"
|
Variant="Variant.Outlined"
|
||||||
Adornment="Adornment.Start"
|
Adornment="Adornment.Start"
|
||||||
AdornmentIcon="@Icons.Material.Filled.DataObject"
|
AdornmentIcon="@Icons.Material.Filled.TextFields"
|
||||||
AdornmentColor="Color.Info"/>
|
AdornmentColor="Color.Info"/>
|
||||||
}
|
}
|
||||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||||
@ -155,7 +155,7 @@
|
|||||||
HelperText="@T("Maximum number of tokens per chunk for this data source. Use 0 to use the embedding provider setting.")"
|
HelperText="@T("Maximum number of tokens per chunk for this data source. Use 0 to use the embedding provider setting.")"
|
||||||
Variant="Variant.Outlined"
|
Variant="Variant.Outlined"
|
||||||
Adornment="Adornment.Start"
|
Adornment="Adornment.Start"
|
||||||
AdornmentIcon="@Icons.Material.Filled.DataObject"
|
AdornmentIcon="@Icons.Material.Filled.FormatListNumbered"
|
||||||
AdornmentColor="Color.Info"/>
|
AdornmentColor="Color.Info"/>
|
||||||
<MudNumericField
|
<MudNumericField
|
||||||
T="int"
|
T="int"
|
||||||
@ -169,7 +169,16 @@
|
|||||||
Adornment="Adornment.Start"
|
Adornment="Adornment.Start"
|
||||||
AdornmentIcon="@Icons.Material.Filled.CompareArrows"
|
AdornmentIcon="@Icons.Material.Filled.CompareArrows"
|
||||||
AdornmentColor="Color.Info"/>
|
AdornmentColor="Color.Info"/>
|
||||||
<MudNumericField T="ushort" Min="10" @bind-Value="@this.dataMaxMatches" Label="@T("How many matches do you want at most per query?")" Variant="Variant.Outlined" Step="10" />
|
<MudNumericField
|
||||||
|
T="ushort"
|
||||||
|
Min="10"
|
||||||
|
@bind-Value="@this.dataMaxMatches"
|
||||||
|
Label="@T("How many matches do you want at most per query?")"
|
||||||
|
Variant="Variant.Outlined"
|
||||||
|
Step="10"
|
||||||
|
Adornment="Adornment.Start"
|
||||||
|
AdornmentIcon="@Icons.Material.Filled.Search"
|
||||||
|
AdornmentColor="Color.Info"/>
|
||||||
</MudCollapse>
|
</MudCollapse>
|
||||||
</MudStack>
|
</MudStack>
|
||||||
</MudForm>
|
</MudForm>
|
||||||
|
|||||||
@ -99,18 +99,6 @@
|
|||||||
|
|
||||||
@if (!string.IsNullOrWhiteSpace(this.dataEmbeddingId))
|
@if (!string.IsNullOrWhiteSpace(this.dataEmbeddingId))
|
||||||
{
|
{
|
||||||
<MudTextField
|
|
||||||
T="string"
|
|
||||||
Text="@this.SelectedEmbeddingTokenizerText"
|
|
||||||
Label="@T("Tokenizer")"
|
|
||||||
Class="mb-3"
|
|
||||||
ReadOnly="@true"
|
|
||||||
Variant="Variant.Outlined"
|
|
||||||
Adornment="Adornment.Start"
|
|
||||||
AdornmentIcon="@Icons.Material.Filled.DataObject"
|
|
||||||
AdornmentColor="Color.Info"
|
|
||||||
/>
|
|
||||||
|
|
||||||
if (this.SelectedCloudEmbedding)
|
if (this.SelectedCloudEmbedding)
|
||||||
{
|
{
|
||||||
<DataSourceCloudEmbeddingWarning DataSourceType="DataSourceType.LOCAL_FILE" SourcePath="@this.dataFilePath" @bind-UserAcknowledged="@this.dataUserAcknowledgedCloudEmbedding" Validation="@this.dataSourceValidation.ValidateUserAcknowledgedCloudEmbedding"/>
|
<DataSourceCloudEmbeddingWarning DataSourceType="DataSourceType.LOCAL_FILE" SourcePath="@this.dataFilePath" @bind-UserAcknowledged="@this.dataUserAcknowledgedCloudEmbedding" Validation="@this.dataSourceValidation.ValidateUserAcknowledgedCloudEmbedding"/>
|
||||||
@ -121,45 +109,6 @@
|
|||||||
@T("The embedding you selected runs locally or in your organization. Your data is not sent to the cloud.")
|
@T("The embedding you selected runs locally or in your organization. Your data is not sent to the cloud.")
|
||||||
</MudJustifiedText>
|
</MudJustifiedText>
|
||||||
}
|
}
|
||||||
|
|
||||||
<MudStack Class="mb-3">
|
|
||||||
<MudButton OnClick="@this.ToggleExpertSettings" Variant="Variant.Text" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Tune">
|
|
||||||
@(this.showExpertSettings ? T("Hide Expert Settings") : T("Show Expert Settings"))
|
|
||||||
</MudButton>
|
|
||||||
<MudDivider/>
|
|
||||||
<MudCollapse Expanded="@this.showExpertSettings" Class="@this.GetExpertStyles">
|
|
||||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
|
||||||
@T("Optional expert settings for how this data source is split before embedding.")
|
|
||||||
</MudJustifiedText>
|
|
||||||
<MudNumericField
|
|
||||||
T="int"
|
|
||||||
@bind-Value="@this.dataMaxChunkTokenLength"
|
|
||||||
Label="@T("Token limit")"
|
|
||||||
Class="mb-3"
|
|
||||||
Min="0"
|
|
||||||
Immediate="@true"
|
|
||||||
Validation="@this.ValidateMaxChunkTokenLength"
|
|
||||||
HelperText="@T("Maximum number of tokens per chunk for this data source. Use 0 to use the embedding provider setting.")"
|
|
||||||
Variant="Variant.Outlined"
|
|
||||||
Adornment="Adornment.Start"
|
|
||||||
AdornmentIcon="@Icons.Material.Filled.DataObject"
|
|
||||||
AdornmentColor="Color.Info"
|
|
||||||
/>
|
|
||||||
<MudNumericField
|
|
||||||
T="int"
|
|
||||||
@bind-Value="@this.dataChunkOverlapTokenLength"
|
|
||||||
Label="@T("Token overlap")"
|
|
||||||
Min="0"
|
|
||||||
Immediate="@true"
|
|
||||||
Validation="@this.ValidateChunkOverlapTokenLength"
|
|
||||||
HelperText="@T("Number of tokens repeated at the start of the next chunk. Use 0 to use the default overlap.")"
|
|
||||||
Variant="Variant.Outlined"
|
|
||||||
Adornment="Adornment.Start"
|
|
||||||
AdornmentIcon="@Icons.Material.Filled.CompareArrows"
|
|
||||||
AdornmentColor="Color.Info"
|
|
||||||
/>
|
|
||||||
</MudCollapse>
|
|
||||||
</MudStack>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<ManagePandocDependency IntroText="@T("For some data types, such as Office files, MindWork AI Studio requires the open-source application Pandoc.")"/>
|
<ManagePandocDependency IntroText="@T("For some data types, such as Office files, MindWork AI Studio requires the open-source application Pandoc.")"/>
|
||||||
@ -173,7 +122,65 @@
|
|||||||
}
|
}
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
|
|
||||||
<MudNumericField T="ushort" Min="10" @bind-Value="@this.dataMaxMatches" Label="@T("How many matches do you want at most per query?")" Variant="Variant.Outlined" Step="10" />
|
<MudStack Class="mb-3">
|
||||||
|
<MudButton OnClick="@this.ToggleExpertSettings" Variant="Variant.Text" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Tune">
|
||||||
|
@(this.showExpertSettings ? T("Hide Expert Settings") : T("Show Expert Settings"))
|
||||||
|
</MudButton>
|
||||||
|
<MudDivider/>
|
||||||
|
<MudCollapse Expanded="@this.showExpertSettings" Class="@this.GetExpertStyles">
|
||||||
|
@if (!string.IsNullOrWhiteSpace(this.dataEmbeddingId))
|
||||||
|
{
|
||||||
|
<MudTextField
|
||||||
|
T="string"
|
||||||
|
Text="@this.SelectedEmbeddingTokenizerText"
|
||||||
|
Label="@T("Tokenizer")"
|
||||||
|
Class="mb-3"
|
||||||
|
ReadOnly="@true"
|
||||||
|
Variant="Variant.Outlined"
|
||||||
|
Adornment="Adornment.Start"
|
||||||
|
AdornmentIcon="@Icons.Material.Filled.TextFields"
|
||||||
|
AdornmentColor="Color.Info"/>
|
||||||
|
}
|
||||||
|
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||||
|
@T("Optional expert settings for how this data source is split before embedding.")
|
||||||
|
</MudJustifiedText>
|
||||||
|
<MudNumericField
|
||||||
|
T="int"
|
||||||
|
@bind-Value="@this.dataMaxChunkTokenLength"
|
||||||
|
Label="@T("Token limit")"
|
||||||
|
Class="mb-3"
|
||||||
|
Min="0"
|
||||||
|
Immediate="@true"
|
||||||
|
Validation="@this.ValidateMaxChunkTokenLength"
|
||||||
|
HelperText="@T("Maximum number of tokens per chunk for this data source. Use 0 to use the embedding provider setting.")"
|
||||||
|
Variant="Variant.Outlined"
|
||||||
|
Adornment="Adornment.Start"
|
||||||
|
AdornmentIcon="@Icons.Material.Filled.FormatListNumbered"
|
||||||
|
AdornmentColor="Color.Info"/>
|
||||||
|
<MudNumericField
|
||||||
|
T="int"
|
||||||
|
@bind-Value="@this.dataChunkOverlapTokenLength"
|
||||||
|
Label="@T("Token overlap")"
|
||||||
|
Min="0"
|
||||||
|
Immediate="@true"
|
||||||
|
Validation="@this.ValidateChunkOverlapTokenLength"
|
||||||
|
HelperText="@T("Number of tokens repeated at the start of the next chunk. Use 0 to use the default overlap.")"
|
||||||
|
Variant="Variant.Outlined"
|
||||||
|
Adornment="Adornment.Start"
|
||||||
|
AdornmentIcon="@Icons.Material.Filled.CompareArrows"
|
||||||
|
AdornmentColor="Color.Info"/>
|
||||||
|
<MudNumericField
|
||||||
|
T="ushort"
|
||||||
|
Min="10"
|
||||||
|
@bind-Value="@this.dataMaxMatches"
|
||||||
|
Label="@T("How many matches do you want at most per query?")"
|
||||||
|
Variant="Variant.Outlined"
|
||||||
|
Step="10"
|
||||||
|
Adornment="Adornment.Start"
|
||||||
|
AdornmentIcon="@Icons.Material.Filled.Search"
|
||||||
|
AdornmentColor="Color.Info"/>
|
||||||
|
</MudCollapse>
|
||||||
|
</MudStack>
|
||||||
</MudForm>
|
</MudForm>
|
||||||
<Issues IssuesData="@this.dataIssues"/>
|
<Issues IssuesData="@this.dataIssues"/>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user