Add optional "Important Aspects" field to Slide Assistant

This commit is contained in:
hart_s3 2026-02-23 14:09:53 +01:00
parent ac3135f84d
commit 6d00f176fd
4 changed files with 28 additions and 0 deletions

View File

@ -1348,6 +1348,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SLIDEBUILDER::SLIDEASSISTANT::T1883918574
-- Target language
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SLIDEBUILDER::SLIDEASSISTANT::T237828418"] = "Target language"
-- (Optional) Important Aspects
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SLIDEBUILDER::SLIDEASSISTANT::T24391765"] = "(Optional) Important Aspects"
-- Target group
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SLIDEBUILDER::SLIDEASSISTANT::T2709966651"] = "Target group"
@ -1357,6 +1360,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SLIDEBUILDER::SLIDEASSISTANT::T3079776593
-- Please a title
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SLIDEBUILDER::SLIDEASSISTANT::T3359269886"] = "Please a title"
-- (Optional) Specify aspects that the LLM should consider when creating the slides. For example, the use of emojis or specific topics that should be highlighted.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SLIDEBUILDER::SLIDEASSISTANT::T3476149293"] = "(Optional) Specify aspects that the LLM should consider when creating the slides. For example, the use of emojis or specific topics that should be highlighted."
-- Custom target language
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SLIDEBUILDER::SLIDEASSISTANT::T3848935911"] = "Custom target language"

View File

@ -4,6 +4,7 @@
<MudTextField T="string" @bind-Text="@this.inputTitle" Validation="@this.ValidatingText" Adornment="Adornment.Start" Label="@T("Your title")" Variant="Variant.Outlined" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
<MudTextField T="string" @bind-Text="@this.inputContext" Adornment="Adornment.Start" Lines="6" MaxLines="12" AutoGrow="@false" Label="@T("Your content")" Variant="Variant.Outlined" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
<MudTextField T="string" AutoGrow="true" Lines="2" @bind-Text="@this.importantAspects" class="mb-3" Label="@T("(Optional) Important Aspects")" HelperText="@T("(Optional) Specify aspects that the LLM should consider when creating the slides. For example, the use of emojis or specific topics that should be highlighted.")" ShrinkLabel="true" Variant="Variant.Outlined" AdornmentIcon="@Icons.Material.Filled.List" Adornment="Adornment.Start"/>
<ReadFileContent @bind-FileContent="@this.inputContext"/>
<MudGrid>

View File

@ -22,6 +22,9 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
# Content
- You get the following inputs: PRESENTATION_TITLE and PRESENTATION_CONTENT.
# Important aspects
- Emphasize the following aspects in your presentation {{{this.PromptImportantAspects()}}}
# Subheadings
- Rule for creating the individual subheadings:
@ -97,6 +100,7 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
this.selectedTargetLanguage = this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedTargetLanguage;
this.customTargetLanguage = this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedOtherLanguage;
this.selectedTargetGroup = this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedTargetGroup;
this.importantAspects = this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedImportantAspects;
return true;
}
@ -112,6 +116,7 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
private double numberOfBulletPoints;
private double timeSpecification;
private int calculatedNumberOfSlides = 0;
private string importantAspects = string.Empty;
#region Overrides of ComponentBase
@ -147,6 +152,17 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
return this.calculatedNumberOfSlides = (int)Math.Round(this.timeSpecification / 1.5);
}
private string PromptImportantAspects()
{
if (string.IsNullOrWhiteSpace(this.importantAspects))
return string.Empty;
return $"""
Emphasize the following aspects in your slides:
{this.importantAspects}
""";
}
private async Task CreateSlideBuilder()
{
await this.form!.Validate();

View File

@ -35,6 +35,11 @@ public class DataSlideBuilder
/// </summary>
public TargetGroup PreselectedTargetGroup { get; set; }
/// <summary>
/// Preselect any important aspects that the Slide Builder should take into account?
/// </summary>
public string PreselectedImportantAspects { get; set; } = string.Empty;
/// <summary>
/// The minimum confidence level required for a provider to be considered.
/// </summary>