Class OrchestrationService
- Namespace
- FoundationaLLM.Orchestration.Core.Services
- Assembly
- FoundationaLLM.Orchestration.Core.dll
OrchestrationService class.
public class OrchestrationService : IOrchestrationService
- Inheritance
-
OrchestrationService
- Implements
- Inherited Members
- Extension Methods
Constructors
OrchestrationService(IOptions<OrchestrationServiceSettings>, IEnumerable<IResourceProviderService>, ILLMOrchestrationServiceManager, IAzureCosmosDBService, ITemplatingService, IContextServiceClient, IUserProfileService, IUserPromptRewriteService, ISemanticCacheService, IOrchestrationContext, IConfiguration, IServiceProvider, ILoggerFactory)
Constructor for the Orchestration Service.
public OrchestrationService(IOptions<OrchestrationServiceSettings> options, IEnumerable<IResourceProviderService> resourceProviderServices, ILLMOrchestrationServiceManager llmOrchestrationServiceManager, IAzureCosmosDBService cosmosDBService, ITemplatingService templatingService, IContextServiceClient contextServiceClient, IUserProfileService userProfileService, IUserPromptRewriteService userPromptRewriteService, ISemanticCacheService semanticCacheService, IOrchestrationContext callContext, IConfiguration configuration, IServiceProvider serviceProvider, ILoggerFactory loggerFactory)
Parameters
optionsIOptions<OrchestrationServiceSettings>The options for configuring the service.
resourceProviderServicesIEnumerable<IResourceProviderService>A list of IResourceProviderService resource providers hashed by resource provider name.
llmOrchestrationServiceManagerILLMOrchestrationServiceManagerThe ILLMOrchestrationServiceManager managing the internal and external LLM orchestration services.
cosmosDBServiceIAzureCosmosDBServiceThe IAzureCosmosDBService used to interact with the Cosmos DB database.
templatingServiceITemplatingServiceThe ITemplatingService used to render templates.
contextServiceClientIContextServiceClientThe IContextServiceClient used to call the Context API.
userProfileServiceIUserProfileServiceThe IUserProfileService used to interact with user profiles.
userPromptRewriteServiceIUserPromptRewriteServiceThe IUserPromptRewriteService used to rewrite user prompts.
semanticCacheServiceISemanticCacheServiceThe ISemanticCacheService used to cache and retrieve completion responses.
callContextIOrchestrationContextThe call context of the request being handled.
configurationIConfigurationThe IConfiguration used to retrieve app settings from configuration.
serviceProviderIServiceProviderThe IServiceProvider provding dependency injection services for the current scope.
loggerFactoryILoggerFactoryThe logger factory used to create loggers.
Methods
GetCompletion(string, CompletionRequest)
Retrieve a completion from the configured orchestration service.
public Task<CompletionResponse> GetCompletion(string instanceId, CompletionRequest completionRequest)
Parameters
instanceIdstringThe FoundationaLLM instance id.
completionRequestCompletionRequestThe completion request.
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
instanceIdstringThe FoundationaLLM instance id.
operationIdstringThe OperationId for which to retrieve the status.
Returns
- Task<LongRunningOperation>
Returns an LongRunningOperation object containing the OperationId and Status.
GetStatus(string)
Get the aggredated status of all orchestration services.
public Task<ServiceStatusInfo> GetStatus(string instanceId)
Parameters
instanceIdstringThe FoundationaLLM instance id.
Returns
- Task<ServiceStatusInfo>
The status of the orchestration service.
StartCompletionOperation(string, CompletionRequest)
Begins a completion operation.
public Task<LongRunningOperation> StartCompletionOperation(string instanceId, CompletionRequest completionRequest)
Parameters
instanceIdstringThe FoundationaLLM instance id.
completionRequestCompletionRequestThe completion request containing the user prompt and message history.
Returns
- Task<LongRunningOperation>
Returns an LongRunningOperation object containing the OperationId and Status.