Table of Contents

Interface IGatewayCore

Namespace
FoundationaLLM.Gateway.Interfaces
Assembly
FoundationaLLM.Gateway.dll

Defines the interface of the FoundationaLLM Gateway core.

public interface IGatewayCore
Extension Methods

Methods

CreateAgentCapability(string, string, string, UnifiedUserIdentity, Dictionary<string, object>?)

Creates a new LLM-based agent capability.

Task<Dictionary<string, object>> CreateAgentCapability(string instanceId, string capabilityCategory, string capabilityName, UnifiedUserIdentity userIdentity, Dictionary<string, object>? parameters = null)

Parameters

instanceId string

The FoundationaLLM instance id.

capabilityCategory string

The category of the capability.

capabilityName string

The name of the capability to be created.

userIdentity UnifiedUserIdentity

The UnifiedUserIdentity providing information about the calling user identity.

parameters Dictionary<string, object>

A dictionary of parameter values used to create the capability.

Returns

Task<Dictionary<string, object>>

A dictionary of output values.

Remarks

The supported categories are:

  • OpenAI.Assistants (the names of the keys for the parameters and output dictionaries are defined in OpenAIAgentCapabilityParameterNames)

ExecuteAsync(CancellationToken)

Executes the Gateway service until cancellation is signaled.

Task ExecuteAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The CancellationToken signaling cancellation.

Returns

Task

GetEmbeddingOperationResult(string, string, UnifiedUserIdentity)

Retrieves the outcome of an embedding operation.

Task<TextEmbeddingResult> GetEmbeddingOperationResult(string instanceId, string operationId, UnifiedUserIdentity userIdentity)

Parameters

instanceId string

The FoundationaLLM instance id.

operationId string

The unique identifier of the text embedding operation.

userIdentity UnifiedUserIdentity

The UnifiedUserIdentity providing information about the calling user identity.

Returns

Task<TextEmbeddingResult>

A TextEmbeddingResult object with the outcome of the operation.

StartAsync(CancellationToken)

Starts the Gateway service, allowing it to initialize.

Task StartAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The CancellationToken signaling cancellation.

Returns

Task

StartEmbeddingOperation(string, TextEmbeddingRequest, UnifiedUserIdentity)

Starts an embedding operation.

Task<TextEmbeddingResult> StartEmbeddingOperation(string instanceId, TextEmbeddingRequest embeddingRequest, UnifiedUserIdentity userIdentity)

Parameters

instanceId string

The FoundationaLLM instance id.

embeddingRequest TextEmbeddingRequest

The TextEmbeddingRequest object containing the details of the embedding operation.

userIdentity UnifiedUserIdentity

The UnifiedUserIdentity providing information about the calling user identity.

Returns

Task<TextEmbeddingResult>

A TextEmbeddingResult object with the outcome of the operation.

StopAsync(CancellationToken)

Stops the Gateway service, allowing it to cleanup.

Task StopAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The CancellationToken signaling cancellation.

Returns

Task