mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 02:07:21 +00:00
Added PowerPoint templates to the Slide Assistant (#1055)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
8c5cfa78b6
commit
6eb23ebbcb
136 files changed
+16535
-522
No files matched your search
@@ -204,7 +204,7 @@ public sealed class Data
|
||||
|
||||
public DataEMail EMail { get; init; } = new();
|
||||
|
||||
public DataSlideBuilder SlideBuilder { get; init; } = new();
|
||||
public DataSlideBuilder SlideBuilder { get; init; } = new(x => x.SlideBuilder);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the managed Assistant Builder defaults.
|
||||
|
||||
@@ -1,14 +1,101 @@
|
||||
using AIStudio.Assistants.SlideBuilder;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
using AIStudio.Assistants.SlideBuilder;
|
||||
using AIStudio.Provider;
|
||||
using AIStudio.Tools.PowerPoint;
|
||||
|
||||
namespace AIStudio.Settings.DataModel;
|
||||
|
||||
public class DataSlideBuilder
|
||||
/// <summary>
|
||||
/// Stores the settings of the Slide Assistant.
|
||||
/// </summary>
|
||||
/// <param name="configSelection">The managed-configuration selector.</param>
|
||||
public class DataSlideBuilder(Expression<Func<Data, DataSlideBuilder>>? configSelection = null)
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes an unmanaged Slide Assistant settings instance.
|
||||
/// </summary>
|
||||
public DataSlideBuilder() : this(null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The PowerPoint presentation or template (.pptx, .potx) whose layouts the slides use.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Empty for no template, which makes the assistant plan an outline only. Like the other
|
||||
/// preselections, the template applies only while preselection is enabled: an organization
|
||||
/// which wants its corporate template used for sure locks PreselectOptions as well.
|
||||
/// </remarks>
|
||||
public string TemplatePath { get; set; } = ManagedConfiguration.Register(configSelection, value => value.TemplatePath, string.Empty);
|
||||
|
||||
/// <summary>
|
||||
/// Preselect the footer text of the slides?
|
||||
/// </summary>
|
||||
public string PreselectedFooterText { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedFooterText, string.Empty);
|
||||
|
||||
/// <summary>
|
||||
/// The most bullet points per slide the user can ask for.
|
||||
/// </summary>
|
||||
public const int MAX_BULLET_POINTS_PER_SLIDE = 7;
|
||||
|
||||
/// <summary>
|
||||
/// Preselect the maximum number of bullet points per slide, all text slots of a slide together?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 0 sets no maximum, as in the assistant, where the LLM decides by the room of each layout. The
|
||||
/// number should fit the room for text in the layouts of the template, which is why organizations
|
||||
/// may dictate it.
|
||||
/// </remarks>
|
||||
public int PreselectedMaxBulletPointsPerSlide { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedMaxBulletPointsPerSlide, 0);
|
||||
|
||||
/// <summary>
|
||||
/// Whether a number of bullet points per slide can be preselected: 0 for no maximum, or up to MAX_BULLET_POINTS_PER_SLIDE.
|
||||
/// </summary>
|
||||
public static bool IsValidMaxBulletPointsPerSlide(int value) => value is >= 0 and <= MAX_BULLET_POINTS_PER_SLIDE;
|
||||
|
||||
/// <summary>
|
||||
/// Preselect keeping the picture placeholders which a new slide has no picture for?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Off by default: the slide leaves them out, as every other placeholder without content. When
|
||||
/// on, PowerPoint shows them while editing, for pictures of the user's own.
|
||||
/// </remarks>
|
||||
public bool PreselectedKeepEmptyPicturePlaceholders { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedKeepEmptyPicturePlaceholders, false);
|
||||
|
||||
/// <summary>
|
||||
/// Preselect the folder of pictures and icons which the LLM may choose from by their names?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Empty for no picture library. Like the template, the folder applies only while preselection
|
||||
/// is enabled, and a configuration plugin may ship it and name it relative to its directory.
|
||||
/// </remarks>
|
||||
public string PreselectedPictureLibraryPath { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedPictureLibraryPath, string.Empty);
|
||||
|
||||
/// <summary>
|
||||
/// Preselect the layouts for kinds of slides, i.e., the name of a layout of the template by kind of slide?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A kind of slide which is missing has no preference, and the LLM decides. Names instead of IDs
|
||||
/// keep the choices valid across sessions, computers, and versions of the template; a name which
|
||||
/// the current template lacks counts as no preference.
|
||||
/// </remarks>
|
||||
public Dictionary<LayoutPurpose, string> PreselectedLayouts { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedLayouts, new Dictionary<LayoutPurpose, string>());
|
||||
|
||||
/// <summary>
|
||||
/// Preselect what the presentation does with the slides of the preselected template, by the number of each slide?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The slides count from 1, in the order of the file, hidden ones included. A slide which is
|
||||
/// missing is left out, as by default. The choices belong to the preselected template: for any
|
||||
/// other template, the assistant ignores them, since its slides are other ones.
|
||||
/// </remarks>
|
||||
public Dictionary<int, TemplateSlideUse> PreselectedTemplateSlideUses { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedTemplateSlideUses, new Dictionary<int, TemplateSlideUse>());
|
||||
|
||||
/// <summary>
|
||||
/// Preselect any Slide Builder options?
|
||||
/// </summary>
|
||||
public bool PreselectOptions { get; set; } = true;
|
||||
public bool PreselectOptions { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectOptions, true);
|
||||
|
||||
/// <summary>
|
||||
/// Preselect a profile?
|
||||
@@ -49,7 +136,17 @@ public class DataSlideBuilder
|
||||
/// Preselect the audience expertise?
|
||||
/// </summary>
|
||||
public AudienceExpertise PreselectedAudienceExpertise { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Preselect the occasion of the presentation?
|
||||
/// </summary>
|
||||
public PresentationOccasion PreselectedOccasion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Preselect any other occasion?
|
||||
/// </summary>
|
||||
public string PreselectedOtherOccasion { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Preselect any important aspects that the Slide Builder should take into account?
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user