Table of Contents

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 ILLMOrchestrationServiceManager

The ILLMOrchestrationServiceManager managing the internal and external LLM orchestration services.

cosmosDBService IAzureCosmosDBService

The IAzureCosmosDBService used to interact with the Cosmos DB database.

templatingService ITemplatingService

The ITemplatingService used to render templates.

contextServiceClient IContextServiceClient

The IContextServiceClient used to call the Context API.

userProfileService IUserProfileService

The IUserProfileService used to interact with user profiles.

userPromptRewriteService IUserPromptRewriteService

The IUserPromptRewriteService used to rewrite user prompts.

semanticCacheService ISemanticCacheService

The ISemanticCacheService used to cache and retrieve completion responses.

callContext IOrchestrationContext

The call context of the request being handled.

configuration IConfiguration

The IConfiguration used to retrieve app settings from configuration.

serviceProvider IServiceProvider

The IServiceProvider provding dependency injection services for the current scope.

loggerFactory ILoggerFactory

The 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 string

The FoundationaLLM instance id.

completionRequest CompletionRequest

The 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 string

The FoundationaLLM instance id.

operationId string

The 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 string

The 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 string

The FoundationaLLM instance id.

completionRequest CompletionRequest

The completion request containing the user prompt and message history.

Returns

Task<LongRunningOperation>

Returns an LongRunningOperation object containing the OperationId and Status.