Share via


ImageContent Constructors

Definition

Overloads

ImageContent(ReadOnlyMemory<Byte>, String)

Initializes a new instance of the ImageContent class.

ImageContent(String, String)

Initializes a new instance of the ImageContent class.

ImageContent(Uri, String)

Initializes a new instance of the ImageContent class.

ImageContent(ReadOnlyMemory<Byte>, String)

Initializes a new instance of the ImageContent class.

public ImageContent (ReadOnlyMemory<byte> data, string? mediaType = default);
new Microsoft.Extensions.AI.ImageContent : ReadOnlyMemory<byte> * string -> Microsoft.Extensions.AI.ImageContent
Public Sub New (data As ReadOnlyMemory(Of Byte), Optional mediaType As String = Nothing)

Parameters

data
ReadOnlyMemory<Byte>

The byte contents.

mediaType
String

The media type (also known as MIME type) represented by the content.

Applies to

ImageContent(String, String)

Initializes a new instance of the ImageContent class.

[System.Text.Json.Serialization.JsonConstructor]
public ImageContent (string uri, string? mediaType = default);
[<System.Text.Json.Serialization.JsonConstructor>]
new Microsoft.Extensions.AI.ImageContent : string * string -> Microsoft.Extensions.AI.ImageContent
Public Sub New (uri As String, Optional mediaType As String = Nothing)

Parameters

uri
String

The URI of the content. This may be a data URI.

mediaType
String

The media type (also known as MIME type) represented by the content.

Attributes

Applies to

ImageContent(Uri, String)

Initializes a new instance of the ImageContent class.

public ImageContent (Uri uri, string? mediaType = default);
new Microsoft.Extensions.AI.ImageContent : Uri * string -> Microsoft.Extensions.AI.ImageContent
Public Sub New (uri As Uri, Optional mediaType As String = Nothing)

Parameters

uri
Uri

The URI of the content. This may be a data URI.

mediaType
String

The media type (also known as MIME type) represented by the content.

Applies to