Class AzureOpenAIDirectService
- Namespace
- FoundationaLLM.Orchestration.Core.Services
- Assembly
- FoundationaLLM.Orchestration.Core.dll
The Azure OpenAI direct orchestration service.
public class AzureOpenAIDirectService : IAzureOpenAIDirectService, ILLMOrchestrationService
- Inheritance
-
AzureOpenAIDirectService
- Implements
- Inherited Members
- Extension Methods
Constructors
AzureOpenAIDirectService(ILogger<AzureOpenAIDirectService>, IOrchestrationContext, IHttpClientFactoryService, IEnumerable<IResourceProviderService>)
The Azure OpenAI direct orchestration service.
public AzureOpenAIDirectService(ILogger<AzureOpenAIDirectService> logger, IOrchestrationContext callContext, IHttpClientFactoryService httpClientFactoryService, IEnumerable<IResourceProviderService> resourceProviderServices)
Parameters
logger
ILogger<AzureOpenAIDirectService>The logger used for logging.
callContext
IOrchestrationContextStores context information extracted from the current HTTP request. This information is primarily used to inject HTTP headers into downstream HTTP calls.
httpClientFactoryService
IHttpClientFactoryServiceThe HTTP client factory service.
resourceProviderServices
IEnumerable<IResourceProviderService>A dictionary of IResourceProviderService resource providers hashed by resource provider name.
Properties
Name
The name of the LLM orchestration service.
public string Name { get; }
Property Value
Methods
GetCompletion(string, LLMCompletionRequest)
Method for retrieving a completion from the orchestration service.
public Task<LLMCompletionResponse> GetCompletion(string instanceId, LLMCompletionRequest request)
Parameters
instanceId
stringThe FoundationaLLM instance ID.
request
LLMCompletionRequestHub populated request object containing agent, prompt, language model, and data source information
Returns
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 status of the orchestration service.
public Task<ServiceStatusInfo> GetStatus(string instanceId)
Parameters
instanceId
stringThe FoundationaLLM instance ID.
Returns
StartCompletionOperation(string, LLMCompletionRequest)
Begins a completion operation.
public Task<LongRunningOperation> StartCompletionOperation(string instanceId, LLMCompletionRequest completionRequest)
Parameters
instanceId
stringThe FoundationaLLM instance id.
completionRequest
LLMCompletionRequestThe completion request containing the user prompt and message history.
Returns
- Task<LongRunningOperation>
Returns an LongRunningOperation object containing the OperationId and Status.