Class OrchestrationBuilder
- Namespace
- FoundationaLLM.Orchestration.Core.Orchestration
- Assembly
- FoundationaLLM.Orchestration.Core.dll
Builds an orchestration for a FoundationaLLM agent.
public class OrchestrationBuilder
- Inheritance
-
OrchestrationBuilder
- Inherited Members
- Extension Methods
Methods
Build(string, string, CompletionRequest, IOrchestrationContext, IConfiguration, Dictionary<string, IResourceProviderService>, ILLMOrchestrationServiceManager, IUserProfileService, IAzureCosmosDBService, ITemplatingService, IContextServiceClient, IUserPromptRewriteService, ISemanticCacheService, IServiceProvider, ILoggerFactory, Func<LLMCompletionRequest, CompletionRequest, Task>?)
Builds the orchestration used to handle a synchronous completion operation or start an asynchronous completion operation.
public static Task<OrchestrationBase?> Build(string instanceId, string agentName, CompletionRequest originalRequest, IOrchestrationContext callContext, IConfiguration configuration, Dictionary<string, IResourceProviderService> resourceProviderServices, ILLMOrchestrationServiceManager llmOrchestrationServiceManager, IUserProfileService userProfileService, IAzureCosmosDBService cosmosDBService, ITemplatingService templatingService, IContextServiceClient contextServiceClient, IUserPromptRewriteService userPromptRewriteService, ISemanticCacheService semanticCacheService, IServiceProvider serviceProvider, ILoggerFactory loggerFactory, Func<LLMCompletionRequest, CompletionRequest, Task>? completionRequestObserver = null)
Parameters
instanceIdstringThe FoundationaLLM instance ID.
agentNamestringThe unique name of the agent for which the orchestration is built.
originalRequestCompletionRequestThe CompletionRequest request for which the orchestration is built.
callContextIOrchestrationContextThe call context of the request being handled.
configurationIConfigurationThe IConfiguration used to retrieve app settings from configuration.
resourceProviderServicesDictionary<string, IResourceProviderService>A dictionary of IResourceProviderService resource providers hashed by resource provider name.
llmOrchestrationServiceManagerILLMOrchestrationServiceManagerThe ILLMOrchestrationServiceManager that manages internal and external orchestration services.
userProfileServiceIUserProfileServiceThe user profile service that manages user profiles.
cosmosDBServiceIAzureCosmosDBServiceThe IAzureCosmosDBService used to interact with the Cosmos DB database.
templatingServiceITemplatingServiceThe ITemplatingService used to render templates.
contextServiceClientIContextServiceClientThe IContextServiceClient client used to call the Context API.
userPromptRewriteServiceIUserPromptRewriteServiceThe IUserPromptRewriteService used to rewrite user prompts.
semanticCacheServiceISemanticCacheServiceThe ISemanticCacheService used to cache and retrieve completion responses.
serviceProviderIServiceProviderThe IServiceProvider provding dependency injection services for the current scope.
loggerFactoryILoggerFactoryThe logger factory used to create new loggers.
completionRequestObserverFunc<LLMCompletionRequest, CompletionRequest, Task>An optional observer for completion requests.
Returns
Exceptions
BuildForStatus(string, string, IOrchestrationContext, IConfiguration, Dictionary<string, IResourceProviderService>, ILLMOrchestrationServiceManager, IAzureCosmosDBService, ISemanticCacheService, IServiceProvider, ILoggerFactory)
Builds the orchestration used to retrieve the status of an asynchronous completion operation.
public static Task<OrchestrationBase?> BuildForStatus(string instanceId, string operationId, IOrchestrationContext callContext, IConfiguration configuration, Dictionary<string, IResourceProviderService> resourceProviderServices, ILLMOrchestrationServiceManager llmOrchestrationServiceManager, IAzureCosmosDBService cosmosDBService, ISemanticCacheService semanticCacheService, IServiceProvider serviceProvider, ILoggerFactory loggerFactory)
Parameters
instanceIdstringThe FoundationaLLM instance identifier.
operationIdstringThe asynchronous completion operation identifier.
callContextIOrchestrationContextThe call context of the request being handled.
configurationIConfigurationThe IConfiguration used to retrieve app settings from configuration.
resourceProviderServicesDictionary<string, IResourceProviderService>A dictionary of IResourceProviderService resource providers hashed by resource provider name.
llmOrchestrationServiceManagerILLMOrchestrationServiceManagerThe ILLMOrchestrationServiceManager that manages internal and external orchestration services.
cosmosDBServiceIAzureCosmosDBServiceThe IAzureCosmosDBService used to interact with the Cosmos DB database.
semanticCacheServiceISemanticCacheServiceThe ISemanticCacheService used to cache and retrieve completion responses.
serviceProviderIServiceProviderThe IServiceProvider provding dependency injection services for the current scope.
loggerFactoryILoggerFactoryThe logger factory used to create new loggers.