SemanticPluginForge.OpenApi
2.0.2-alpha
This is a prerelease version of SemanticPluginForge.OpenApi.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package SemanticPluginForge.OpenApi --version 2.0.2-alpha
NuGet\Install-Package SemanticPluginForge.OpenApi -Version 2.0.2-alpha
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SemanticPluginForge.OpenApi" Version="2.0.2-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SemanticPluginForge.OpenApi" Version="2.0.2-alpha" />
<PackageReference Include="SemanticPluginForge.OpenApi" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SemanticPluginForge.OpenApi --version 2.0.2-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SemanticPluginForge.OpenApi, 2.0.2-alpha"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SemanticPluginForge.OpenApi@2.0.2-alpha
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SemanticPluginForge.OpenApi&version=2.0.2-alpha&prerelease
#tool nuget:?package=SemanticPluginForge.OpenApi&version=2.0.2-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SemanticPluginForge
SemanticPluginForge is a .NET library for extending Semantic Kernel plugins with metadata support.
Installation
You can install the SemanticPluginForge package via NuGet:
dotnet add package SemanticPluginForge
Usage
Implementing a Custom Metadata Provider
Implement the IPluginMetadataProvider interface. The following code is a sample provider that overrides the description of a function from the TimePlugin.
public class CustomTimeYearMetadataProvider : IPluginMetadataProvider
{
public PluginMetadata? GetPluginMetadata(KernelPlugin plugin) => null;
public FunctionMetadata GetFunctionMetadata(KernelPlugin plugin, KernelFunctionMetadata metadata) =>
plugin.Name == "TimePlugin" && metadata.Name == "Year"
? new FunctionMetadata(metadata.Name) { Description = "Get the current year in 4-digit number format." }
: null;
}
Registering the Metadata Provider
Register the custom metadata provider with the service collection.
services.AddSingleton<IPluginMetadataProvider, CustomTimeYearMetadataProvider>();
Adding Plugins with Patched Metadata
Use the extension methods from this library to add plugins with patched metadata.
var kernelBuilder = services.AddKernel();
var kernel = kernelBuilder.Build();
kernel.AddFromOpenApiWithMetadataAsync("SamplePlugin", "sample_open_api_spec.json");
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.SemanticKernel.Plugins.OpenApi.Extensions (>= 1.48.0-alpha)
- SemanticPluginForge.Core (>= 2.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.1-alpha | 305 | 7/8/2025 |
| 2.1.0-alpha | 154 | 6/26/2025 |
| 2.0.1-alpha | 182 | 5/8/2025 |
| 2.0.0-alpha | 168 | 5/2/2025 |