Class AzureCosmosDBFileService
- Namespace
- FoundationaLLM.Context.Services.CosmosDB
- Assembly
- FoundationaLLM.Context.dll
Provides the implementation for the Azure Cosmos DB file service.
public class AzureCosmosDBFileService : IAzureCosmosDBFileService
- Inheritance
-
AzureCosmosDBFileService
- Implements
- Inherited Members
- Extension Methods
Constructors
AzureCosmosDBFileService(IAzureCosmosDBServiceBase, ILogger<AzureCosmosDBFileService>)
Provides the implementation for the Azure Cosmos DB file service.
public AzureCosmosDBFileService(IAzureCosmosDBServiceBase azureCosmosDBServiceBase, ILogger<AzureCosmosDBFileService> logger)
Parameters
azureCosmosDBServiceBase
IAzureCosmosDBServiceBaseThe Azure Cosmos DB service that provides core database services.
logger
ILogger<AzureCosmosDBFileService>The ILogger used for logging.
Methods
GetFileRecord(string, string, string)
Gets the file record for a specified file identifier.
public Task<ContextFileRecord> GetFileRecord(string instanceId, string fileId, string userPrincipalName)
Parameters
instanceId
stringThe FoundationaLLM instance identifier.
fileId
stringThe idenfier of the file.
userPrincipalName
stringThe user principal name of the user associated with the code session.
Returns
GetFileRecords(string, string, string, string)
Gets the file records matching the specified criteria.
public Task<List<ContextFileRecord>> GetFileRecords(string instanceId, string conversationId, string fileName, string userPrincipalName)
Parameters
instanceId
stringThe FoundationaLLM instance identifier.
conversationId
stringThe idenfier of the conversation to which the file is associated.
fileName
stringThe name of the file.
userPrincipalName
stringThe user principal name of the user associated with the code session.
Returns
UpsertFileRecord(ContextFileRecord)
Upserts a file record in the Azure Cosmos DB.
public Task UpsertFileRecord(ContextFileRecord fileRecord)
Parameters
fileRecord
ContextFileRecordThe file record to be upserted.