mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-11 23:07:21 +00:00
20 lines
793 B
C#
20 lines
793 B
C#
namespace AIStudio.Provider.OpenAI;
|
|
|
|
/// <summary>
|
|
/// Image sub-content for multimodal messages.
|
|
/// </summary>
|
|
public record SubContentImageUrl(SubContentType Type, string ImageUrl) : ISubContent
|
|
{
|
|
//
|
|
// 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 SubContentType Type { get; set; } = Type;
|
|
public string ImageUrl { get; set; } = ImageUrl;
|
|
|
|
public SubContentImageUrl() : this(SubContentType.IMAGE_URL, string.Empty)
|
|
{
|
|
}
|
|
} |