Class ImageContent
Image content in a message
public class ImageContent : MessageContent
- Inheritance
-
ImageContent
- Inherited Members
Constructors
ImageContent(byte[], string)
public ImageContent(byte[] data, string mimeType)
Parameters
ImageContent(string)
public ImageContent(string url)
Parameters
urlstring
Properties
Data
public byte[]? Data { get; set; }
Property Value
- byte[]
IsHighDetail
public bool IsHighDetail { get; set; }
Property Value
MimeType
public string? MimeType { get; set; }
Property Value
Type
public override string Type { get; }
Property Value
Url
public string? Url { get; set; }
Property Value
Methods
EstimateTokens()
Estimates the token count for this content
public override uint EstimateTokens()
Returns
GetBase64Url()
public string GetBase64Url()
Returns
GetDescription()
Gets a display-friendly description of the content
public override string GetDescription()
Returns
ToRequestFormat(string)
Converts the content to the appropriate format for the specified AI provider
public override object ToRequestFormat(string provider)
Parameters
providerstring