Condividi tramite


DataContent Class

Definition

Represents data content, such as an image or audio.

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
Derived

Remarks

The represented content may either be the actual bytes stored in this instance, or it may be a URI that references the location of the content.

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)
ContainsData

Gets a value indicating whether the content contains data rather than only being a reference to data.

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 URI for this DataContent.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to