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
EmbedContentInRequest
Gets or sets a value indicating whether the content of the file should be embedded in the request.
[JsonPropertyName("embed_content_in_request")]
public required bool EmbedContentInRequest { 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
attachmentFileAttachmentFileThe AttachmentFile resource.
OrderintThe order in which the file has appeared in the conversation.
currentMessageAttachmentboolIndicates if the file is an attachment to the current message.
Returns
- FileHistoryItem
 The FileHistoryItem object based on the AttachmentFile.
FromContextFileRecord(ContextFileRecord, int, bool, 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, bool allowContentEmbeddingInRequest)
  Parameters
fileRecordContextFileRecordThe ContextFileRecord to convert to FileHistoryItem.
orderintThe order in which the file appeared in the conversation.
currentMessageAttachmentboolIndicates if the file is an attachment to the current message.
allowContentEmbeddingInRequestboolIndicates if the content of the file is allowed be embedded in the request.
Returns
- FileHistoryItem
 The FileHistoryItem object based on the ContextFileRecord.
Remarks
Content embedding in the request is only allowed for files with FileProcessingType of CompletionRequestContext.
When allowContentEmbeddingInRequest is false, the content will not be embedded regardless of the file processing type.
This case handles files that are part of the message history but not directly attached to the current message.