mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-11 08:07:21 +00:00
Generated the JSON contracts of visual briefings and model answers at compile time (#1151)
This commit is contained in:
1 parent
24e3c22db3
commit
770c16e20a
101 files changed
+2333
-392
No files matched your search
+1
-15
@@ -121,21 +121,7 @@ internal sealed partial class VisualBriefingBuildOrchestrator
|
||||
var validationDataProperties = compiled.Data.EnumerateObject()
|
||||
.ToDictionary(property => property.Name, property => property.Value.Clone(), StringComparer.Ordinal);
|
||||
|
||||
validationDataProperties["_mwai"] = JsonSerializer.SerializeToElement(new
|
||||
{
|
||||
schemaVersion = VisualBriefingVersions.SCHEMA,
|
||||
runtimeVersion = VisualBriefingVersions.RUNTIME,
|
||||
aiStudioVersion = "validation",
|
||||
assets = content.AssetPlan.ToDictionary(asset => asset.AssetId, _ => "data:image/png;base64,AA==", StringComparer.Ordinal),
|
||||
footer = new
|
||||
{
|
||||
createdWith = "validation",
|
||||
models = "validation",
|
||||
createdAt = "validation",
|
||||
authors = "validation",
|
||||
protection = "validation",
|
||||
},
|
||||
}, VisualBriefingJson.Canonical);
|
||||
validationDataProperties["_mwai"] = JsonSerializer.SerializeToElement(VisualBriefingProtectedData.ForValidation(content.AssetPlan), VisualBriefingJson.Canonical);
|
||||
|
||||
VisualBriefingCompilerInvariant.Guard(
|
||||
VisualBriefingBuildStage.COMPILATION,
|
||||
|
||||
Reference in new issue
Block a user