mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-13 17:07:21 +00:00
Added the choice between formal and informal address to the whole app (#1200)
This commit is contained in:
1 parent
382db4b8d0
commit
c9a376f742
342 files changed
+14378
-1893
No files matched your search
@@ -15,7 +15,7 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
||||
|
||||
protected override string Title => T("Slide Assistant");
|
||||
|
||||
protected override string Description => T("This assistant helps you create clear, structured slides from long texts or documents. Enter a presentation title and provide the content either as text or with one or more documents. Important aspects allow you to add instructions to the LLM regarding output or formatting. Set the number of slides either directly or based on your desired presentation duration. You can also limit the number of bullet points per slide. If the default value of 0 is not changed, the LLM will independently determine how many slides or bullet points to generate. The output can be flexibly generated in various languages and tailored to a specific audience. When you choose a PowerPoint template, the slides use its layouts, and you can create a PowerPoint file in its design from the result.");
|
||||
protected override string Description => TA("This assistant helps you create clear, structured slides from long texts or documents. Enter a presentation title and provide the content either as text or with one or more documents. Important aspects allow you to add instructions to the LLM regarding output or formatting. Set the number of slides either directly or based on your desired presentation duration. You can also limit the number of bullet points per slide. If the default value of 0 is not changed, the LLM will independently determine how many slides or bullet points to generate. The output can be flexibly generated in various languages and tailored to a specific audience. When you choose a PowerPoint template, the slides use its layouts, and you can create a PowerPoint file in its design from the result.");
|
||||
|
||||
// The prompt of this assistant demands JSON for the layouts, so the chat gets a prompt of its own, which keeps the limits of the slides:
|
||||
protected override ChatSystemPromptChoice ChatSystemPrompt => ChatSystemPromptChoice.Custom(this.CreateChatSystemPrompt);
|
||||
@@ -192,7 +192,7 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
||||
ContentType = ContentType.TEXT,
|
||||
Content = new ContentText
|
||||
{
|
||||
Text = this.T("The result of your previous Slide Assistant session."),
|
||||
Text = this.TA("The result of your previous Slide Assistant session."),
|
||||
FileAttachments = [..this.loadedDocumentPaths, ..this.slidePictures],
|
||||
}
|
||||
},
|
||||
@@ -446,14 +446,14 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
||||
private string? ValidatingTitle(string text)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(text))
|
||||
return T("Please provide a title");
|
||||
return TA("Please provide a title");
|
||||
|
||||
return null;
|
||||
}
|
||||
private string? ValidatingContext(string text)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(text) && !this.HasValidInputDocuments())
|
||||
return T("Please provide a text or at least one valid document or image.");
|
||||
return TA("Please provide a text or at least one valid document or image.");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -497,7 +497,7 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
||||
private string? ValidateCustomLanguage(string language)
|
||||
{
|
||||
if(this.selectedTargetLanguage == CommonLanguages.OTHER && string.IsNullOrWhiteSpace(language))
|
||||
return T("Please provide a custom language.");
|
||||
return TA("Please provide a custom language.");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -505,7 +505,7 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
||||
private string? ValidateCustomOccasion(string occasion)
|
||||
{
|
||||
if(this.selectedOccasion == PresentationOccasion.OTHER && string.IsNullOrWhiteSpace(occasion))
|
||||
return T("Please describe the occasion.");
|
||||
return TA("Please describe the occasion.");
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -777,14 +777,14 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
||||
if (deck is null || deck.Slides.Count == 0 || deck.Slides.Any(slide => !SlideDeckSpecValidator.CanWrite(slide, catalog, chosenTemplateSlideUses)))
|
||||
{
|
||||
this.Logger.LogWarning("The slides the model planned cannot be used: {Issues}", string.Join(" | ", issues));
|
||||
await this.MessageBus.SendError(new(AppIcons.SLIDES, T("The LLM did not describe the slides in a usable form, even after a second request. Please try again, or choose another model.")));
|
||||
await this.MessageBus.SendError(new(AppIcons.SLIDES, TA("The LLM did not describe the slides in a usable form, even after a second request. Please try again, or choose another model.")));
|
||||
return;
|
||||
}
|
||||
|
||||
if (issues.Count > 0)
|
||||
{
|
||||
this.Logger.LogInformation("The slides the model planned still have issues after the repair round: {Issues}", string.Join(" | ", issues));
|
||||
await this.MessageBus.SendWarning(new(AppIcons.SLIDES, T("Not every slide fits its layout as planned; for example, a text may run long. Please check the slides before presenting.")));
|
||||
await this.MessageBus.SendWarning(new(AppIcons.SLIDES, TA("Not every slide fits its layout as planned; for example, a text may run long. Please check the slides before presenting.")));
|
||||
}
|
||||
|
||||
this.slideDeck = deck;
|
||||
|
||||
Reference in new issue
Block a user