Denomica.OpenAI.Extensions
1.0.0-beta.2
This is a prerelease version of Denomica.OpenAI.Extensions.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Denomica.OpenAI.Extensions --version 1.0.0-beta.2
NuGet\Install-Package Denomica.OpenAI.Extensions -Version 1.0.0-beta.2
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="Denomica.OpenAI.Extensions" Version="1.0.0-beta.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Denomica.OpenAI.Extensions" Version="1.0.0-beta.2" />
<PackageReference Include="Denomica.OpenAI.Extensions" />
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 Denomica.OpenAI.Extensions --version 1.0.0-beta.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Denomica.OpenAI.Extensions, 1.0.0-beta.2"
#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 Denomica.OpenAI.Extensions@1.0.0-beta.2
#: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=Denomica.OpenAI.Extensions&version=1.0.0-beta.2&prerelease
#tool nuget:?package=Denomica.OpenAI.Extensions&version=1.0.0-beta.2&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Denomica.OpenAI.Extensions
Denomica.OpenAI.Extensions is a library that provides extension methods for working with types in Azure.AI.OpenAI
.
Getting Started
The following sample code illustrates how to quickly get started with the library.
using Denomica.OpenAI.Extensions.Chat;
using Denomica.OpenAI.Extensions.Embeddings;
using Denomica.OpenAI.Extensions.Text;
using Microsoft.Extensions.DependencyInjection;
using OpenAI.Chat;
var provider = new ServiceCollection()
.AddOpenAIExtensions()
.WithChunkingService<LineChunkingService>()
.WithChatModel((opt, sp) =>
{
// Add your chat model configuration here.
})
.WithEmbeddingModel((opt, sp) =>
{
// Add your embedding model configuration here.
})
.Services
.BuildServiceProvider();
var chatProvider = provider
.GetRequiredKeyedService<ChatProvider>([name of your chat model deployment]);
var chatResult = await chatProvider.Client.CompleteChatAsync(
new UserChatMessage("Hi! Can I call you Kevin?")
);
var chatContent = chatResult.GetContent().ToList();
var embeddingProvider = provider.GetRequiredKeyedService<EmbeddingProvider>([name of your embedding model deployment]);
var embedding = await embeddingProvider.GenerateEmbeddingAsync("Hello World!");
Version Highlights
The main hihglights in the published versions are outlined below.
v1.0.0-beta.2
- Fixed a typo in the readme file.
v1.0.0-beta.1
The initial version of the library includes the following features.
- A text chunking service that chunks text into smaller pieces.
- An
EmbeddingProvider
service class for working with embeddings. - The
EmbeddingProvider
service uses a configured text chunking service to break up text into smaller chunks. - Combines embeddings generated from the text chunks into a single embedding using a weighted average approach where the total number of tokens consumed by each chunk is used as the weight.
- A ChatProvider service class for working with chat completions.
- Dependency injection support for easy configuration of both embedding models and chat completion models.
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. 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. |
.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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- Azure.AI.OpenAI (>= 2.1.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.0)
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 |
---|---|---|
1.0.0-beta.5 | 98 | 8/16/2025 |
1.0.0-beta.4 | 42 | 8/16/2025 |
1.0.0-beta.3 | 45 | 8/16/2025 |
1.0.0-beta.2 | 45 | 8/16/2025 |
1.0.0-beta.1 | 46 | 8/16/2025 |