AI-Studio/app/MindWork AI Studio/Tools/PluginSystem/Assistants/DataModel/AssistantImage.cs

33 lines
1.0 KiB
C#
Raw Normal View History

namespace AIStudio.Tools.PluginSystem.Assistants.DataModel;
public class AssistantImage : AssistantComponentBase
{
public override AssistantComponentType Type => AssistantComponentType.IMAGE;
public Dictionary<string, object> Props { get; set; } = new();
public List<IAssistantComponent> Children { get; set; } = new();
public string Src
{
get => this.Props.TryGetValue(nameof(this.Src), out var v)
? v.ToString() ?? string.Empty
: string.Empty;
set => this.Props[nameof(this.Src)] = value;
}
public string Alt
{
get => this.Props.TryGetValue(nameof(this.Alt), out var v)
? v.ToString() ?? string.Empty
: string.Empty;
set => this.Props[nameof(this.Alt)] = value;
}
public string Caption
{
get => this.Props.TryGetValue(nameof(this.Caption), out var v)
? v.ToString() ?? string.Empty
: string.Empty;
set => this.Props[nameof(this.Caption)] = value;
}
}