mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 11:47:21 +00:00
Added tests which guard the JSON of visual briefings and model answers before source generation
This commit is contained in:
22 files changed
+1102
-12
No files matched your search
@@ -7,7 +7,7 @@ namespace AIStudio.Tools.PowerPoint;
|
||||
|
||||
internal sealed partial record SlideDeckSpec
|
||||
{
|
||||
private static readonly JsonSerializerOptions JSON_OPTIONS = new()
|
||||
internal static readonly JsonSerializerOptions JSON_OPTIONS = new()
|
||||
{
|
||||
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower,
|
||||
PropertyNameCaseInsensitive = true,
|
||||
@@ -158,17 +158,18 @@ internal sealed partial record SlideDeckSpec
|
||||
private static string Clean(string? text) => text?.Trim() ?? string.Empty;
|
||||
|
||||
//
|
||||
// What the model writes, before anything is checked. Every value may be missing or null.
|
||||
// What the model writes, before anything is checked. Every value may be missing or null. Internal
|
||||
// rather than private, so that the JSON context of the deck can name them:
|
||||
//
|
||||
|
||||
private sealed class DeckDto
|
||||
internal sealed class DeckDto
|
||||
{
|
||||
public string? Title { get; set; }
|
||||
|
||||
public List<SlideDto?>? Slides { get; set; }
|
||||
}
|
||||
|
||||
private sealed class SlideDto
|
||||
internal sealed class SlideDto
|
||||
{
|
||||
public int? TemplateSlide { get; set; }
|
||||
|
||||
@@ -191,7 +192,7 @@ internal sealed partial record SlideDeckSpec
|
||||
public JsonElement? Remove { get; set; }
|
||||
}
|
||||
|
||||
private sealed class TableDto
|
||||
internal sealed class TableDto
|
||||
{
|
||||
public List<JsonElement>? Headers { get; set; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user