mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 19:52:10 +00:00
added a definition DTO for ai studio chat block diagrams
This commit is contained in:
parent
58cc811a58
commit
f54deb287a
29
app/MindWork AI Studio/Chat/ChartDefinition.cs
Normal file
29
app/MindWork AI Studio/Chat/ChartDefinition.cs
Normal file
@ -0,0 +1,29 @@
|
||||
namespace AIStudio.Chat;
|
||||
|
||||
/// <summary>
|
||||
/// A renderer-independent, validated chart definition produced by an AI response.
|
||||
/// </summary>
|
||||
public sealed record ChartDefinition(
|
||||
int SchemaVersion,
|
||||
ChartDefinitionType Type,
|
||||
string Title,
|
||||
string? Caption,
|
||||
IReadOnlyList<string> Categories,
|
||||
IReadOnlyList<ChartDefinitionSeries> Series);
|
||||
|
||||
/// <summary>
|
||||
/// A named series in a chart definition.
|
||||
/// </summary>
|
||||
public sealed record ChartDefinitionSeries(string Name, IReadOnlyList<double> Values);
|
||||
|
||||
/// <summary>
|
||||
/// Chart types supported by version 1 of the AI Studio chart contract.
|
||||
/// </summary>
|
||||
public enum ChartDefinitionType
|
||||
{
|
||||
BAR,
|
||||
STACKED_BAR,
|
||||
LINE,
|
||||
PIE,
|
||||
DONUT,
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user