Interface IFileService
- Namespace
- FoundationaLLM.Context.Interfaces
- Assembly
- FoundationaLLM.Context.dll
Defines the service interface for the FoundationaLLM File service.
public interface IFileService
- Extension Methods
Methods
CreateFile(string, string, string, string, string, Stream, UnifiedUserIdentity, Dictionary<string, string>?)
Create a new file.
Task<ContextFileRecord> CreateFile(string instanceId, string origin, string conversationId, string fileName, string contentType, Stream content, UnifiedUserIdentity userIdentity, Dictionary<string, string>? metadata = null)
Parameters
instanceId
stringThe FoundationaLLM instance identifier.
origin
stringThe origin of the file.
conversationId
stringThe conversation identifier.
fileName
stringThe original name of the file.
contentType
stringThe content type of the file.
content
StreamThe Stream providing the raw content of the file.
userIdentity
UnifiedUserIdentityThe UnifiedUserIdentity providing details about the user identity.
metadata
Dictionary<string, string>Optional metadata dictionary associated with the file.
Returns
- Task<ContextFileRecord>
A ContextFileRecord instance with details about the newly created file.
GetFileContent(string, string, UnifiedUserIdentity)
Get the binary content of a file.
Task<ContextFileContent?> GetFileContent(string instanceId, string fileId, UnifiedUserIdentity userIdentity)
Parameters
instanceId
stringThe FoundationaLLM instance identifier.
fileId
stringThe identifier of the file.
userIdentity
UnifiedUserIdentityThe 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
instanceId
stringThe FoundationaLLM instance identifier.
conversationId
stringThe conversation identifier.
fileName
stringThe name of the file to retrieve.
userIdentity
UnifiedUserIdentityThe 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
instanceId
stringThe FoundationaLLM instance identifier.
fileId
stringThe identifier of the file.
userIdentity
UnifiedUserIdentityThe UnifiedUserIdentity providing details about the user identity.
Returns
- Task<ContextFileRecord>
A ContextFileRecord with the file record.