Class SemanticKernelAgentBase
- Namespace
- FoundationaLLM.SemanticKernel.Core.Agents
- Assembly
- FoundationaLLM.SemanticKernel.Core.dll
Implements the base functionality for a Semantic Kernel agent.
public class SemanticKernelAgentBase
- Inheritance
-
SemanticKernelAgentBase
- Derived
- Inherited Members
- Extension Methods
Constructors
SemanticKernelAgentBase(LLMCompletionRequest, IEnumerable<IResourceProviderService>, ILogger)
Implements the base functionality for a Semantic Kernel agent.
public SemanticKernelAgentBase(LLMCompletionRequest request, IEnumerable<IResourceProviderService> resourceProviderServices, ILogger logger)
Parameters
request
LLMCompletionRequestThe LLMCompletionRequest being processed by the agent.
resourceProviderServices
IEnumerable<IResourceProviderService>A collection of IResourceProviderService resource providers.
logger
ILoggerThe ILogger used for logging.
Fields
_configurationResourceProvider
protected readonly IResourceProviderService _configurationResourceProvider
Field Value
_deploymentName
protected string _deploymentName
Field Value
_endpointUrl
protected string _endpointUrl
Field Value
_llmProvider
protected string _llmProvider
Field Value
_logger
protected readonly ILogger _logger
Field Value
_request
protected readonly LLMCompletionRequest _request
Field Value
Methods
BuildResponseWithAzureOpenAI()
Builds the completion response using Azure OpenAI.
protected virtual Task<LLMCompletionResponse> BuildResponseWithAzureOpenAI()
Returns
- Task<LLMCompletionResponse>
A LLMCompletionResponse object containing the completion response.
Exceptions
BuildResponseWithOpenAI()
Builds the completion response using OpenAI.
protected virtual Task<LLMCompletionResponse> BuildResponseWithOpenAI()
Returns
- Task<LLMCompletionResponse>
A LLMCompletionResponse object containing the completion response.
Exceptions
ExpandAndValidateAgent()
Retrieves the agent-specific details from the agent properties payload.
protected virtual Task ExpandAndValidateAgent()
Returns
GetCompletion()
Gets the completion for the request.
public Task<LLMCompletionResponse> GetCompletion()
Returns
- Task<LLMCompletionResponse>
A LLMCompletionResponse object containing the completion response.
GetConfigurationValue(string)
protected Task<string> GetConfigurationValue(string configName)
Parameters
configName
string