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
instanceIdstringThe FoundationaLLM instance id.
capabilityCategorystringThe category of the capability.
capabilityNamestringThe name of the capability to be created.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing information about the calling user identity.
parametersDictionary<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
cancellationTokenCancellationTokenThe CancellationToken signaling cancellation.
Returns
GetCompletionOperationResult(string, string, UnifiedUserIdentity)
Retrieves the outcome of a completion operation.
Task<TextOperationResult> GetCompletionOperationResult(string instanceId, string operationId, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance id.
operationIdstringThe unique identifier of the text completion operation.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing information about the calling user identity.
Returns
- Task<TextOperationResult>
 A TextOperationResult object with the outcome of the operation.
GetEmbeddingOperationResult(string, string, UnifiedUserIdentity)
Retrieves the outcome of an embedding operation.
Task<TextOperationResult> GetEmbeddingOperationResult(string instanceId, string operationId, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance id.
operationIdstringThe unique identifier of the text embedding operation.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing information about the calling user identity.
Returns
- Task<TextOperationResult>
 A TextOperationResult object with the outcome of the operation.
StartAsync(CancellationToken)
Starts the Gateway service, allowing it to initialize.
Task StartAsync(CancellationToken cancellationToken)
  Parameters
cancellationTokenCancellationTokenThe CancellationToken signaling cancellation.
Returns
StartCompletionOperation(string, TextCompletionRequest, UnifiedUserIdentity)
Starts a completion operation.
Task<TextOperationResult> StartCompletionOperation(string instanceId, TextCompletionRequest completionRequest, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance id.
completionRequestTextCompletionRequestThe TextCompletionRequest object containing the details of the completion operation.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing information about the calling user identity.
Returns
- Task<TextOperationResult>
 A TextOperationResult object with the outcome of the operation.
StartEmbeddingOperation(string, TextEmbeddingRequest, UnifiedUserIdentity)
Starts an embedding operation.
Task<TextOperationResult> StartEmbeddingOperation(string instanceId, TextEmbeddingRequest embeddingRequest, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance id.
embeddingRequestTextEmbeddingRequestThe TextEmbeddingRequest object containing the details of the embedding operation.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing information about the calling user identity.
Returns
- Task<TextOperationResult>
 A TextOperationResult object with the outcome of the operation.
StopAsync(CancellationToken)
Stops the Gateway service, allowing it to cleanup.
Task StopAsync(CancellationToken cancellationToken)
  Parameters
cancellationTokenCancellationTokenThe CancellationToken signaling cancellation.