Share via


HostedFileContent Class

Definition

Represents a file that is hosted by the AI service.

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

Remarks

Unlike DataContent which contains the data for a file or blob, this class represents a file that is hosted by the AI service and referenced by an identifier. Such identifiers are specific to the provider.

Constructors

Name Description
HostedFileContent(String)

Initializes a new instance of the HostedFileContent class.

Properties

Name Description
AdditionalProperties

Gets or sets additional properties for the content.

(Inherited from AIContent)
Annotations

Gets or sets a list of annotations on this content.

(Inherited from AIContent)
CreatedAt

Gets or sets when the file was created.

FileId

Gets or sets the ID of the hosted file.

MediaType

Gets or sets an optional media type (also known as MIME type) associated with the file.

Name

Gets or sets an optional name associated with the file.

Purpose

Gets or sets the purpose for which the file was uploaded.

RawRepresentation

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

(Inherited from AIContent)
Scope

Gets or sets the scope (e.g. container ID) in which the file resides.

SizeInBytes

Gets or sets the size of the file in bytes.

Methods

Name Description
HasTopLevelMediaType(String)

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

Applies to