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
orchestrationAPIServiceIDownstreamAPIServiceThe Orchestration API client.
cosmosDBServiceIAzureCosmosDBServiceThe Azure Cosmos DB service.
contentSafetyServiceIContentSafetyServiceThe user prompt Content Safety service.
lakeraGuardServiceILakeraGuardServiceThe Lakera Guard service.
enkryptGuardrailsServiceIEnkryptGuardrailsServiceThe Enkrypt Guardrails service.
gatekeeperIntegrationAPIServiceIGatekeeperIntegrationAPIServiceThe Gatekeeper Integration API client.
gatekeeperServiceSettingsIOptions<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
instanceIdstringThe FoundationaLLM instance id.
completionRequestCompletionRequestThe 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
instanceIdstringThe FoundationaLLM instance id.
operationIdstringThe 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
instanceIdstringThe FoundationaLLM instance id.
completionRequestCompletionRequestThe completion request containing the user prompt and message history.
Returns
- Task<LongRunningOperation>
Returns an LongRunningOperation object containing the OperationId and Status.