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
CurrentMessageAttachment
Indicates if the file is an attachment to the current message.
[JsonPropertyName("current_message_attachment")]
public required bool CurrentMessageAttachment { get; set; }
Property Value
FilePath
The file path of the attachment in storage.
[JsonPropertyName("file_path")]
public required string FilePath { get; set; }
Property Value
ObjectId
The ObjectID of the file attachment resource.
[JsonPropertyName("object_id")]
public required string ObjectId { get; set; }
Property Value
Order
The order the file was uploaded in the current conversation.
[JsonPropertyName("order")]
public required int Order { get; set; }
Property Value
OriginalFileName
The original file name of the attachment.
[JsonPropertyName("original_file_name")]
public required string OriginalFileName { get; set; }
Property Value
SecondaryProvider
The provider that manages the file.
[JsonPropertyName("secondary_provider")]
public string? SecondaryProvider { get; set; }
Property Value
SecondaryProviderObjectId
The identifier of the file attachment resource in the secondary provider.
[JsonPropertyName("secondary_provider_object_id")]
public string? SecondaryProviderObjectId { get; set; }
Property Value
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
AttachmentFileThe AttachmentFile resource.
Order
intThe order in which the file has appeared in the conversation.
currentMessageAttachment
boolIndicates 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
ContextFileRecordThe ContextFileRecord to convert to FileHistoryItem.
Order
intThe order in which the file appeared in the conversation.
currentMessageAttachment
boolIndicates if the file is an attachment to the current message.
Returns
- FileHistoryItem
The FileHistoryItem object based on the ContextFileRecord.