Files
AI-Studio/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentContentCleaner.razor
T

13 lines
2.5 KiB
Plaintext
Raw Normal View History

@using AIStudio.Settings
2025-01-05 15:11:15 +01:00
@inherits SettingsPanelBase
<ExpansionPanel HeaderIcon="@AppIcons.TEXT_CONTENT_CLEANER" HeaderText="@T("AI Task: Text Content Cleaner")">
2025-01-05 15:11:15 +01:00
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
@T("When an assistant loads content from the web, a model can clean it up: it extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used.")
</MudJustifiedText>
<ConfigurationOption OptionDescription="@T("Preselect text content cleaner options?")" LabelOn="@T("Options are preselected")" LabelOff="@T("No options are preselected")" State="@(() => this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions = updatedState)" OptionHelp="@TA("When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the assistant.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.TextContentCleaner, x => x.PreselectAgentOptions, out var meta) && meta.IsLocked"/>
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.TextContentCleaner.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.TextContentCleaner.MinimumProviderConfidence = selectedValue)" IsLocked="() => ManagedConfiguration.TryGet(x => x.TextContentCleaner, x => x.MinimumProviderConfidence, out var meta) && meta.IsLocked"/>
<ConfigurationProviderSelection Component="Components.AGENT_TEXT_CONTENT_CLEANER" EmptySelectionText="@T("Use the model of the assistant")" Data="@this.AvailableLLMProvidersFunc()" Disabled="@(() => !this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectedAgentProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.TextContentCleaner.PreselectedAgentProvider = selectedValue)" IsLocked="() => ManagedConfiguration.TryGet(x => x.TextContentCleaner, x => x.PreselectedAgentProvider, out var meta) && meta.IsLocked"/>
2025-01-05 15:11:15 +01:00
</MudPaper>
</ExpansionPanel>