namespace AIStudio.Provider.OpenAI; /// /// A multimodal chat message model that can contain various types of content. /// /// The list of sub-contents in the message. /// The role of the message. public record MultimodalMessage(List Content, string Role) : IMessage> { // // The properties of the parameters, declared again to be settable. The source generation of System.Text.Json // sets every init-only property while it creates the object, also one missing in the JSON, so its value from // the parameterless constructor would get lost. Keep them first and in the order of the parameters, which is // the order they get written in: // public List Content { get; set; } = Content; public string Role { get; set; } = Role; public MultimodalMessage() : this([], string.Empty) { } }