Class AzureCosmosDBCodeSessionService
- Namespace
- FoundationaLLM.Context.Services.CosmosDB
- Assembly
- FoundationaLLM.Context.dll
Provides the implementation for the Azure Cosmos DB code session service.
public class AzureCosmosDBCodeSessionService : IAzureCosmosDBCodeSessionService
- Inheritance
-
AzureCosmosDBCodeSessionService
- Implements
- Inherited Members
- Extension Methods
Constructors
AzureCosmosDBCodeSessionService(IAzureCosmosDBServiceBase, ILogger<AzureCosmosDBCodeSessionService>)
Provides the implementation for the Azure Cosmos DB code session service.
public AzureCosmosDBCodeSessionService(IAzureCosmosDBServiceBase azureCosmosDBServiceBase, ILogger<AzureCosmosDBCodeSessionService> logger)
Parameters
azureCosmosDBServiceBase
IAzureCosmosDBServiceBaseThe Azure Cosmos DB service that provides core database services.
logger
ILogger<AzureCosmosDBCodeSessionService>The ILogger used for logging.
Methods
GetCodeSessionFileUploadRecord(string, string, string, string)
Gets a code session file upload record from the Azure Cosmos DB.
public Task<ContextCodeSessionFileUploadRecord?> GetCodeSessionFileUploadRecord(string instanceId, string sessionId, string operationId, string userPrincipalName)
Parameters
instanceId
stringThe FoundationaLLM instance identifier.
sessionId
stringThe identifier of the code session.
operationId
stringThe identifier of the code session file upload record.
userPrincipalName
stringThe user principal name of the user associated with the code session file upload.
Returns
- Task<ContextCodeSessionFileUploadRecord>
The requested code session file upload record.
GetCodeSessionRecord(string, string, string)
Gets a code session record from the Azure Cosmos DB.
public Task<ContextCodeSessionRecord?> GetCodeSessionRecord(string instanceId, string sessionId, string userPrincipalName)
Parameters
instanceId
stringThe FoundationaLLM instance identifier.
sessionId
stringThe identifier of the code session.
userPrincipalName
stringThe user principal name of the user associated with the code session.
Returns
- Task<ContextCodeSessionRecord>
The requests code session record.
UpsertCodeSessionFileUploadRecord(ContextCodeSessionFileUploadRecord)
Upserts a code session file upload record in the Azure Cosmos DB.
public Task UpsertCodeSessionFileUploadRecord(ContextCodeSessionFileUploadRecord codeSessionFileUploadRecord)
Parameters
codeSessionFileUploadRecord
ContextCodeSessionFileUploadRecordThe code session file upload record to be upserted.
Returns
UpsertCodeSessionRecord(ContextCodeSessionRecord)
Upserts a code session record in the Azure Cosmos DB.
public Task UpsertCodeSessionRecord(ContextCodeSessionRecord codeSessionRecord)
Parameters
codeSessionRecord
ContextCodeSessionRecordThe code session record to be upserted.