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
stringThe FoundationaLLM instance id.
capabilityCategory
stringThe category of the capability.
capabilityName
stringThe name of the capability to be created.
userIdentity
UnifiedUserIdentityThe 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
CancellationTokenThe CancellationToken signaling cancellation.
Returns
GetEmbeddingOperationResult(string, string, UnifiedUserIdentity)
Retrieves the outcome of an embedding operation.
Task<TextEmbeddingResult> GetEmbeddingOperationResult(string instanceId, string operationId, UnifiedUserIdentity userIdentity)
Parameters
instanceId
stringThe FoundationaLLM instance id.
operationId
stringThe unique identifier of the text embedding operation.
userIdentity
UnifiedUserIdentityThe 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
CancellationTokenThe CancellationToken signaling cancellation.
Returns
StartEmbeddingOperation(string, TextEmbeddingRequest, UnifiedUserIdentity)
Starts an embedding operation.
Task<TextEmbeddingResult> StartEmbeddingOperation(string instanceId, TextEmbeddingRequest embeddingRequest, UnifiedUserIdentity userIdentity)
Parameters
instanceId
stringThe FoundationaLLM instance id.
embeddingRequest
TextEmbeddingRequestThe TextEmbeddingRequest object containing the details of the embedding operation.
userIdentity
UnifiedUserIdentityThe 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
CancellationTokenThe CancellationToken signaling cancellation.