Table of Contents

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 LLMCompletionRequest

The LLMCompletionRequest being processed by the agent.

resourceProviderServices IEnumerable<IResourceProviderService>

A collection of IResourceProviderService resource providers.

logger ILogger

The ILogger used for logging.

Fields

_configurationResourceProvider

protected readonly IResourceProviderService _configurationResourceProvider

Field Value

IResourceProviderService

_deploymentName

protected string _deploymentName

Field Value

string

_endpointUrl

protected string _endpointUrl

Field Value

string

_llmProvider

protected string _llmProvider

Field Value

string

_logger

protected readonly ILogger _logger

Field Value

ILogger

_request

protected readonly LLMCompletionRequest _request

Field Value

LLMCompletionRequest

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

NotImplementedException

BuildResponseWithOpenAI()

Builds the completion response using OpenAI.

protected virtual Task<LLMCompletionResponse> BuildResponseWithOpenAI()

Returns

Task<LLMCompletionResponse>

A LLMCompletionResponse object containing the completion response.

Exceptions

NotImplementedException

ExpandAndValidateAgent()

Retrieves the agent-specific details from the agent properties payload.

protected virtual Task ExpandAndValidateAgent()

Returns

Task

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

Returns

Task<string>