Class ImageContent
- Namespace
- AnthropicClient.Models
- Assembly
- AnthropicClient.dll
Represents image content that is part of a message.
public class ImageContent : Content
- Inheritance
-
ImageContent
- Inherited Members
Constructors
ImageContent(string, string)
Initializes a new instance of the ImageContent class.
public ImageContent(string mediaType, string data)
Parameters
Exceptions
- ArgumentNullException
Thrown when the media type or data is null.
ImageContent(string, string, CacheControl)
Initializes a new instance of the ImageContent class.
public ImageContent(string mediaType, string data, CacheControl cacheControl)
Parameters
mediaType
stringThe media type of the image.
data
stringThe data of the image.
cacheControl
CacheControlThe cache control to be used for the content.
Exceptions
- ArgumentNullException
Thrown when the media type, data, or cache control is null.
Properties
Source
Gets the source of the image.
public ImageSource Source { get; init; }