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
options
IOptions<OrchestrationServiceSettings>The options for configuring the service.
resourceProviderServices
IEnumerable<IResourceProviderService>A list of IResourceProviderService resource providers hashed by resource provider name.
llmOrchestrationServiceManager
ILLMOrchestrationServiceManagerThe ILLMOrchestrationServiceManager managing the internal and external LLM orchestration services.
cosmosDBService
IAzureCosmosDBServiceThe IAzureCosmosDBService used to interact with the Cosmos DB database.
templatingService
ITemplatingServiceThe ITemplatingService used to render templates.
contextServiceClient
IContextServiceClientThe IContextServiceClient used to call the Context API.
userProfileService
IUserProfileServiceThe IUserProfileService used to interact with user profiles.
userPromptRewriteService
IUserPromptRewriteServiceThe IUserPromptRewriteService used to rewrite user prompts.
semanticCacheService
ISemanticCacheServiceThe ISemanticCacheService used to cache and retrieve completion responses.
callContext
IOrchestrationContextThe call context of the request being handled.
configuration
IConfigurationThe IConfiguration used to retrieve app settings from configuration.
serviceProvider
IServiceProviderThe IServiceProvider provding dependency injection services for the current scope.
loggerFactory
ILoggerFactoryThe 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
instanceId
stringThe FoundationaLLM instance id.
completionRequest
CompletionRequestThe 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
instanceId
stringThe FoundationaLLM instance id.
operationId
stringThe 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
instanceId
stringThe 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
instanceId
stringThe FoundationaLLM instance id.
completionRequest
CompletionRequestThe completion request containing the user prompt and message history.
Returns
- Task<LongRunningOperation>
Returns an LongRunningOperation object containing the OperationId and Status.