Table of Contents

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 IDownstreamAPIService

The Orchestration API client.

cosmosDBService IAzureCosmosDBService

The Azure Cosmos DB service.

contentSafetyService IContentSafetyService

The user prompt Content Safety service.

lakeraGuardService ILakeraGuardService

The Lakera Guard service.

enkryptGuardrailsService IEnkryptGuardrailsService

The Enkrypt Guardrails service.

gatekeeperIntegrationAPIService IGatekeeperIntegrationAPIService

The 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 string

The FoundationaLLM instance id.

completionRequest CompletionRequest

The 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 string

The FoundationaLLM instance id.

operationId string

The 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 string

The FoundationaLLM instance id.

completionRequest CompletionRequest

The completion request containing the user prompt and message history.

Returns

Task<LongRunningOperation>

Returns an LongRunningOperation object containing the OperationId and Status.