Encamina.Enmarcha.SemanticKernel.Abstractions
8.1.8-preview-07
See the version list below for details.
dotnet add package Encamina.Enmarcha.SemanticKernel.Abstractions --version 8.1.8-preview-07
NuGet\Install-Package Encamina.Enmarcha.SemanticKernel.Abstractions -Version 8.1.8-preview-07
<PackageReference Include="Encamina.Enmarcha.SemanticKernel.Abstractions" Version="8.1.8-preview-07" />
paket add Encamina.Enmarcha.SemanticKernel.Abstractions --version 8.1.8-preview-07
#r "nuget: Encamina.Enmarcha.SemanticKernel.Abstractions, 8.1.8-preview-07"
// Install Encamina.Enmarcha.SemanticKernel.Abstractions as a Cake Addin #addin nuget:?package=Encamina.Enmarcha.SemanticKernel.Abstractions&version=8.1.8-preview-07&prerelease // Install Encamina.Enmarcha.SemanticKernel.Abstractions as a Cake Tool #tool nuget:?package=Encamina.Enmarcha.SemanticKernel.Abstractions&version=8.1.8-preview-07&prerelease
Semantic Kernel - Abstractions
This project mainly contains abstractions used by other ENMARCHA NuGet packages. Additionally, it includes extension methods and utilities primarily related to Semantic Kernel.
Setup
Nuget package
First, install NuGet. Then, install Encamina.Enmarcha.SemanticKernel.Abstractions from the package manager console:
PM> Install-Package Encamina.Enmarcha.SemanticKernel.Abstractions
.NET CLI:
Install .NET CLI. Next, install Encamina.Enmarcha.SemanticKernel.Abstractions from the .NET CLI:
dotnet add package Encamina.Enmarcha.SemanticKernel.Abstractions
How to use
In addition to the abstractions such as interfaces or abstract classes, which have their implementations in other ENMARCHA NuGets (for example, IMemoryManager/MemoryManager), there are some utilities that can be used directly.
ILengthFunctions
// Entry point
var tokenCount = ILengthFunctions.LengthByTokenCount("This text contains 5 tokens");
// tokenCount = 5
The above code returns the number of tokens in the text using the GPT-3 tokenizer.
SemanticKernelOptions
// ...
"SemanticKernelOptions": {
"ChatModelName": "gpt-35-turbo", // Name (sort of a unique identifier) of the model to use for chat
"ChatModelDeploymentName": "gpt-35-turbo", // Model deployment name on the LLM (for example OpenAI) to use for chat
"EmbeddingsModelName": "text-embedding-ada-002", // Name (sort of a unique identifier) of the model to use for embeddings
"EmbeddingsModelDeploymentName": "text-embedding-ada-002", // Model deployment name on the LLM (for example OpenAI) to use for embeddings
"Endpoint": "https://your-url.openai.azure.com/", // Uri for an LLM resource (like OpenAI). This should include protocol and hostname.
"Key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", // Key credential used to authenticate to an LLM resource
// ....
},
// ...
The above section is taken from a JSON file that is typically added to the appsettings.json
. This provides the necessary configurations for Semantic Kernel to operate.
Once these configurations are defined, they can be added to the application's configuration.
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
{
// ...
});
// ...
// Or others configuration providers...
builder.Configuration.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
builder.Services.AddOptions<SemanticKernelOptions>().Bind(builder.Configuration.GetSection(nameof(SemanticKernelOptions)))
.ValidateDataAnnotations()
.ValidateOnStart();
SKContextExtensions
This class provides some static methods to obtain information/functionality about SKContext
.
// ...
var resultContext = await kernel.RunAsync(contextVariables);
// Extensions method from SKContextExtensions
resultContext.ValidateAndThrowIfErrorOccurred();
var maxWordCount = resultContext.GetContextVariable("dummycontextvariable");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- CommunityToolkit.Diagnostics (>= 8.2.2)
- Encamina.Enmarcha.AI.Abstractions (>= 8.1.8-preview-07)
- Encamina.Enmarcha.Core (>= 8.1.8-preview-07)
- Microsoft.SemanticKernel.Connectors.OpenAI (>= 1.15.0)
- Microsoft.SemanticKernel.Core (>= 1.15.0)
- SharpToken (>= 2.0.3)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Encamina.Enmarcha.SemanticKernel.Abstractions:
Package | Downloads |
---|---|
Encamina.Enmarcha.SemanticKernel
Package Description |
|
Encamina.Enmarcha.SemanticKernel.Plugins.Chat
Package Description |
|
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
Package Description |
|
Encamina.Enmarcha.SemanticKernel.Plugins.Memory
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.2.0 | 518 | 10/22/2024 |
8.2.0-preview-01-m01 | 164 | 9/17/2024 |
8.1.9-preview-03 | 112 | 11/19/2024 |
8.1.9-preview-02 | 119 | 10/22/2024 |
8.1.9-preview-01 | 375 | 10/4/2024 |
8.1.8 | 328 | 9/23/2024 |
8.1.8-preview-07 | 650 | 9/12/2024 |
8.1.8-preview-06 | 318 | 9/11/2024 |
8.1.8-preview-05 | 160 | 9/10/2024 |
8.1.8-preview-04 | 464 | 8/16/2024 |
8.1.8-preview-03 | 236 | 8/13/2024 |
8.1.8-preview-02 | 162 | 8/13/2024 |
8.1.8-preview-01 | 171 | 8/12/2024 |
8.1.7 | 167 | 8/7/2024 |
8.1.7-preview-09 | 270 | 7/3/2024 |
8.1.7-preview-08 | 148 | 7/2/2024 |
8.1.7-preview-07 | 145 | 6/10/2024 |
8.1.7-preview-06 | 130 | 6/10/2024 |
8.1.7-preview-05 | 168 | 6/6/2024 |
8.1.7-preview-04 | 138 | 6/6/2024 |
8.1.7-preview-03 | 162 | 5/24/2024 |
8.1.7-preview-02 | 140 | 5/10/2024 |
8.1.7-preview-01 | 168 | 5/8/2024 |
8.1.6 | 1,351 | 5/7/2024 |
8.1.6-preview-08 | 120 | 5/2/2024 |
8.1.6-preview-07 | 150 | 4/29/2024 |
8.1.6-preview-06 | 518 | 4/26/2024 |
8.1.6-preview-05 | 159 | 4/24/2024 |
8.1.6-preview-04 | 181 | 4/22/2024 |
8.1.6-preview-03 | 141 | 4/22/2024 |
8.1.6-preview-02 | 197 | 4/17/2024 |
8.1.6-preview-01 | 247 | 4/15/2024 |
8.1.5 | 175 | 4/15/2024 |
8.1.5-preview-15 | 153 | 4/10/2024 |
8.1.5-preview-14 | 180 | 3/20/2024 |
8.1.5-preview-13 | 135 | 3/18/2024 |
8.1.5-preview-12 | 166 | 3/13/2024 |
8.1.5-preview-11 | 146 | 3/13/2024 |
8.1.5-preview-10 | 163 | 3/13/2024 |
8.1.5-preview-09 | 121 | 3/12/2024 |
8.1.5-preview-08 | 166 | 3/12/2024 |
8.1.5-preview-07 | 164 | 3/8/2024 |
8.1.5-preview-06 | 376 | 3/8/2024 |
8.1.5-preview-05 | 152 | 3/7/2024 |
8.1.5-preview-04 | 159 | 3/7/2024 |
8.1.5-preview-03 | 160 | 3/7/2024 |
8.1.5-preview-02 | 266 | 2/28/2024 |
8.1.5-preview-01 | 219 | 2/19/2024 |
8.1.4 | 328 | 2/15/2024 |
8.1.3 | 198 | 2/13/2024 |
8.1.3-preview-07 | 150 | 2/13/2024 |
8.1.3-preview-06 | 157 | 2/12/2024 |
8.1.3-preview-05 | 159 | 2/9/2024 |
8.1.3-preview-04 | 171 | 2/8/2024 |
8.1.3-preview-03 | 139 | 2/7/2024 |
8.1.3-preview-02 | 149 | 2/2/2024 |
8.1.3-preview-01 | 143 | 2/2/2024 |
8.1.2 | 285 | 2/1/2024 |
8.1.2-preview-9 | 162 | 1/22/2024 |
8.1.2-preview-8 | 135 | 1/19/2024 |
8.1.2-preview-7 | 144 | 1/19/2024 |
8.1.2-preview-6 | 148 | 1/19/2024 |
8.1.2-preview-5 | 138 | 1/19/2024 |
8.1.2-preview-4 | 144 | 1/19/2024 |
8.1.2-preview-3 | 146 | 1/18/2024 |
8.1.2-preview-2 | 186 | 1/18/2024 |
8.1.2-preview-16 | 147 | 1/31/2024 |
8.1.2-preview-15 | 141 | 1/31/2024 |
8.1.2-preview-14 | 265 | 1/25/2024 |
8.1.2-preview-13 | 140 | 1/25/2024 |
8.1.2-preview-12 | 150 | 1/23/2024 |
8.1.2-preview-11 | 153 | 1/23/2024 |
8.1.2-preview-10 | 121 | 1/22/2024 |
8.1.2-preview-1 | 134 | 1/18/2024 |
8.1.1 | 214 | 1/18/2024 |
8.1.0 | 151 | 1/18/2024 |
8.0.3 | 322 | 12/29/2023 |
8.0.1 | 198 | 12/14/2023 |
8.0.0 | 230 | 12/7/2023 |
6.0.4.3 | 289 | 12/29/2023 |
6.0.4.2 | 272 | 12/20/2023 |
6.0.4.1 | 315 | 12/19/2023 |
6.0.4 | 290 | 12/4/2023 |
6.0.3.20 | 234 | 11/27/2023 |
6.0.3.19 | 240 | 11/22/2023 |