Interface IFileService
- Namespace
 - FoundationaLLM.Context.Interfaces
 
- Assembly
 - FoundationaLLM.ContextEngine.dll
 
Defines the service interface for the FoundationaLLM File service.
public interface IFileService
  - Extension Methods
 
Methods
CreateFileForAgent(string, string, string, string, string, Stream, UnifiedUserIdentity, Dictionary<string, string>?)
Create a new file.
Task<ContextFileRecord> CreateFileForAgent(string instanceId, string origin, string agentName, string fileName, string contentType, Stream content, UnifiedUserIdentity userIdentity, Dictionary<string, string>? metadata = null)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
originstringThe origin of the file.
agentNamestringThe name of the agent.
fileNamestringThe original name of the file.
contentTypestringThe content type of the file.
contentStreamThe Stream providing the raw content of the file.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing details about the user identity.
metadataDictionary<string, string>Optional metadata dictionary associated with the file.
Returns
- Task<ContextFileRecord>
 A ContextFileRecord instance with details about the newly created file.
CreateFileForConversation(string, string, string, string, string, Stream, UnifiedUserIdentity, Dictionary<string, string>?)
Create a new file.
Task<ContextFileRecord> CreateFileForConversation(string instanceId, string origin, string conversationId, string fileName, string contentType, Stream content, UnifiedUserIdentity userIdentity, Dictionary<string, string>? metadata = null)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
originstringThe origin of the file.
conversationIdstringThe conversation identifier.
fileNamestringThe original name of the file.
contentTypestringThe content type of the file.
contentStreamThe Stream providing the raw content of the file.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing details about the user identity.
metadataDictionary<string, string>Optional metadata dictionary associated with the file.
Returns
- Task<ContextFileRecord>
 A ContextFileRecord instance with details about the newly created file.
DeleteFileRecord(string, string, UnifiedUserIdentity)
Deletes the file record associated with a file.
Task DeleteFileRecord(string instanceId, string fileId, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
fileIdstringThe identifier of the file.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing details about the user identity.
Returns
GetFileContent(string, string, UnifiedUserIdentity)
Get the binary content of a file.
Task<ContextFileContent?> GetFileContent(string instanceId, string fileId, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
fileIdstringThe identifier of the file.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing details about the user identity.
Returns
- Task<ContextFileContent>
 A ContextFileContent instance with the content of the file.
GetFileContent(string, string, string, UnifiedUserIdentity)
Get the binary content of a file.
Task<ContextFileContent?> GetFileContent(string instanceId, string conversationId, string fileName, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
conversationIdstringThe conversation identifier.
fileNamestringThe name of the file to retrieve.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing details about the user identity.
Returns
- Task<ContextFileContent>
 A ContextFileContent instance with the content of the file.
GetFileRecord(string, string, UnifiedUserIdentity)
Get the file record associated with a file.
Task<ContextFileRecord?> GetFileRecord(string instanceId, string fileId, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
fileIdstringThe identifier of the file.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing details about the user identity.
Returns
- Task<ContextFileRecord>
 A ContextFileRecord with the file record.