Class GatekeeperService
- Namespace
- FoundationaLLM.Gatekeeper.Core.Services
- Assembly
- FoundationaLLM.Gatekeeper.Core.dll
Implements the IGatekeeperService interface.
public class GatekeeperService : IGatekeeperService
- Inheritance
-
GatekeeperService
- Implements
- Inherited Members
- Extension Methods
Remarks
Constructor for the Gatekeeper service.
Constructors
GatekeeperService(IDownstreamAPIService, IAzureCosmosDBService, IContentSafetyService, ILakeraGuardService, IEnkryptGuardrailsService, IGatekeeperIntegrationAPIService, IOptions<GatekeeperServiceSettings>)
Implements the IGatekeeperService interface.
public GatekeeperService(IDownstreamAPIService orchestrationAPIService, IAzureCosmosDBService cosmosDBService, IContentSafetyService contentSafetyService, ILakeraGuardService lakeraGuardService, IEnkryptGuardrailsService enkryptGuardrailsService, IGatekeeperIntegrationAPIService gatekeeperIntegrationAPIService, IOptions<GatekeeperServiceSettings> gatekeeperServiceSettings)
Parameters
orchestrationAPIService
IDownstreamAPIServiceThe Orchestration API client.
cosmosDBService
IAzureCosmosDBServiceThe Azure Cosmos DB service.
contentSafetyService
IContentSafetyServiceThe user prompt Content Safety service.
lakeraGuardService
ILakeraGuardServiceThe Lakera Guard service.
enkryptGuardrailsService
IEnkryptGuardrailsServiceThe Enkrypt Guardrails service.
gatekeeperIntegrationAPIService
IGatekeeperIntegrationAPIServiceThe Gatekeeper Integration API client.
gatekeeperServiceSettings
IOptions<GatekeeperServiceSettings>The configuration options for the Gatekeeper service.
Remarks
Constructor for the Gatekeeper service.
Methods
GetCompletion(string, CompletionRequest)
Gets a completion from the Gatekeeper service.
public Task<CompletionResponse> GetCompletion(string instanceId, CompletionRequest completionRequest)
Parameters
instanceId
stringThe FoundationaLLM instance id.
completionRequest
CompletionRequestThe completion request containing the user prompt and message history.
Returns
- Task<CompletionResponse>
The completion response.
GetCompletionOperationStatus(string, string)
Gets the status of a completion operation.
public Task<LongRunningOperation> GetCompletionOperationStatus(string instanceId, string operationId)
Parameters
instanceId
stringThe FoundationaLLM instance id.
operationId
stringThe OperationId to retrieve the status for.
Returns
- Task<LongRunningOperation>
Returns an LongRunningOperation object containing the OperationId and Status.
StartCompletionOperation(string, CompletionRequest)
Begins a completion operation.
public Task<LongRunningOperation> StartCompletionOperation(string instanceId, CompletionRequest completionRequest)
Parameters
instanceId
stringThe FoundationaLLM instance id.
completionRequest
CompletionRequestThe completion request containing the user prompt and message history.
Returns
- Task<LongRunningOperation>
Returns an LongRunningOperation object containing the OperationId and Status.