DataContent Class

Definition

Represents binary content with an associated media type (also known as MIME type).

public ref class DataContent : Microsoft::Extensions::AI::AIContent
public class DataContent : Microsoft.Extensions.AI.AIContent
type DataContent = class
    inherit AIContent
Public Class DataContent
Inherits AIContent
Inheritance
DataContent

Remarks

The content represents in-memory data. For references to data at a remote URI, use UriContent instead.

Uri always returns a valid URI string, even if the instance was constructed from a ReadOnlyMemory<T>. In that case, a data URI will be constructed and returned.

Constructors

DataContent(ReadOnlyMemory<Byte>, String)

Initializes a new instance of the DataContent class.

DataContent(String, String)

Initializes a new instance of the DataContent class.

DataContent(Uri, String)

Initializes a new instance of the DataContent class.

Properties

AdditionalProperties

Gets or sets additional properties for the content.

(Inherited from AIContent)
Data

Gets the data represented by this instance.

MediaType

Gets the media type (also known as MIME type) of the content.

RawRepresentation

Gets or sets the raw representation of the content from an underlying implementation.

(Inherited from AIContent)
Uri

Gets the data URI for this DataContent.

Methods

HasTopLevelMediaType(String)

Determines whether the MediaType's top-level type matches the specified topLevelType.

Applies to