Table of Contents

Class FileHistoryItem

Namespace
FoundationaLLM.Common.Models.Orchestration.Request
Assembly
FoundationaLLM.Common.dll

Represents a file history item in a conversation.

public class FileHistoryItem
Inheritance
FileHistoryItem
Inherited Members
Extension Methods

Properties

ContentType

The content type of the attachment.

[JsonPropertyName("content_type")]
public string? ContentType { get; set; }

Property Value

string

CurrentMessageAttachment

Indicates if the file is an attachment to the current message.

[JsonPropertyName("current_message_attachment")]
public required bool CurrentMessageAttachment { get; set; }

Property Value

bool

FilePath

The file path of the attachment in storage.

[JsonPropertyName("file_path")]
public required string FilePath { get; set; }

Property Value

string

ObjectId

The ObjectID of the file attachment resource.

[JsonPropertyName("object_id")]
public required string ObjectId { get; set; }

Property Value

string

Order

The order the file was uploaded in the current conversation.

[JsonPropertyName("order")]
public required int Order { get; set; }

Property Value

int

OriginalFileName

The original file name of the attachment.

[JsonPropertyName("original_file_name")]
public required string OriginalFileName { get; set; }

Property Value

string

SecondaryProvider

The provider that manages the file.

[JsonPropertyName("secondary_provider")]
public string? SecondaryProvider { get; set; }

Property Value

string

SecondaryProviderObjectId

The identifier of the file attachment resource in the secondary provider.

[JsonPropertyName("secondary_provider_object_id")]
public string? SecondaryProviderObjectId { get; set; }

Property Value

string

Methods

FromAttachmentFile(AttachmentFile, int, bool)

Creates an instance of FileHistoryItem based on an AttachmentFile.

public static FileHistoryItem FromAttachmentFile(AttachmentFile attachmentFile, int Order, bool currentMessageAttachment)

Parameters

attachmentFile AttachmentFile

The AttachmentFile resource.

Order int

The order in which the file has appeared in the conversation.

currentMessageAttachment bool

Indicates if the file is an attachment to the current message.

Returns

FileHistoryItem

The FileHistoryItem object based on the AttachmentFile.

FromContextFileRecord(ContextFileRecord, int, bool)

Creates an instance of FileHistoryItem based on a ContextFileRecord. Context files are managed entirely by FoundationaLLM.

public static FileHistoryItem FromContextFileRecord(ContextFileRecord fileRecord, int Order, bool currentMessageAttachment)

Parameters

fileRecord ContextFileRecord

The ContextFileRecord to convert to FileHistoryItem.

Order int

The order in which the file appeared in the conversation.

currentMessageAttachment bool

Indicates if the file is an attachment to the current message.

Returns

FileHistoryItem

The FileHistoryItem object based on the ContextFileRecord.