Table of Contents

Class GatekeeperAPIService

Namespace
FoundationaLLM.Core.Services
Assembly
FoundationaLLM.Core.dll

Contains methods for interacting with the Gatekeeper API.

public class GatekeeperAPIService : IGatekeeperAPIService
Inheritance
GatekeeperAPIService
Implements
Inherited Members
Extension Methods

Constructors

GatekeeperAPIService(IOrchestrationContext, IHttpClientFactoryService)

Initializes a new instance of the GatekeeperAPIService class.

public GatekeeperAPIService(IOrchestrationContext callContext, IHttpClientFactoryService httpClientFactoryService)

Parameters

callContext IOrchestrationContext

Stores context information extracted from the current HTTP request. This information is primarily used to inject HTTP headers into downstream HTTP calls.

httpClientFactoryService IHttpClientFactoryService

The IHttpClientFactoryService used to retrieve an HttpClient instance that contains required headers for Gateway API requests.

Methods

AddMemory(object, string, Action<object, float[]>)

Adds the entity to the orchestrator's memory used by the RAG service.

public Task AddMemory(object item, string itemName, Action<object, float[]> vectorizer)

Parameters

item object

The entity to add to memory.

itemName string

The type name of the entity.

vectorizer Action<object, float[]>

The embedded entity and its vector.

Returns

Task

GetCompletion(string, CompletionRequest)

Requests a completion from the downstream APIs via the Gatekeeper API.

public Task<CompletionResponse> GetCompletion(string instanceId, CompletionRequest completionRequest)

Parameters

instanceId string

The FoundationaLLM instance id.

completionRequest CompletionRequest

The completion request object.

Returns

Task<CompletionResponse>

RemoveMemory(object)

Removes the entity from the orchestrator's memory used by the RAG service.

public Task RemoveMemory(object item)

Parameters

item object

The entity to remove from memory.

Returns

Task