Soenneker.Azure.OpenAI.Client.Chat 4.0.1557

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Azure.OpenAI.Client.Chat --version 4.0.1557
                    
NuGet\Install-Package Soenneker.Azure.OpenAI.Client.Chat -Version 4.0.1557
                    
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="Soenneker.Azure.OpenAI.Client.Chat" Version="4.0.1557" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Azure.OpenAI.Client.Chat" Version="4.0.1557" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Azure.OpenAI.Client.Chat" />
                    
Project file
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 Soenneker.Azure.OpenAI.Client.Chat --version 4.0.1557
                    
#r "nuget: Soenneker.Azure.OpenAI.Client.Chat, 4.0.1557"
                    
#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 Soenneker.Azure.OpenAI.Client.Chat@4.0.1557
                    
#: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=Soenneker.Azure.OpenAI.Client.Chat&version=4.0.1557
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Azure.OpenAI.Client.Chat&version=4.0.1557
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.OpenAI.Client.Chat

An async thread-safe singleton for the Azure OpenAI Chat (completions) client

This library provides an implementation for interacting with Azure's OpenAI service. It allows you to configure and utilize a ChatClient to perform various tasks using OpenAI's models.

For the direct from OpenAI version of this: Soenneker.OpenAI.Client.Chat

Installation

dotnet add package Soenneker.Azure.OpenAI.Client.Chat

Register:

builder.services.AddAzureOpenAIChatClientAsSingleton();

IConfiguration values:

"Azure:OpenAI:Chat:Deployment"
"Azure:OpenAI:ApiKey"
"Azure:OpenAI:Uri"

Usage

public class OpenAIService
{
    private readonly IAzureOpenAIChatClient _chatClient;

    public OpenAIService(IAzureOpenAIChatClient chatClient)
    {
        _chatClient = chatClient;
    }

    public async ValueTask<string> Chat(string prompt, CancellationToken cancellationToken = default)
    {
        var client = await _chatClient.Get(cancellationToken);
        ChatCompletion completion = await client.CompleteChatAsync(prompt);
    }
}
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

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
4.0.1573 722 2/28/2026
4.0.1572 71 2/28/2026
4.0.1571 207 2/27/2026
4.0.1570 45 2/27/2026
4.0.1569 48 2/26/2026
4.0.1568 1,210 2/22/2026
4.0.1567 309 2/21/2026
4.0.1566 103 2/20/2026
4.0.1565 222 2/12/2026
4.0.1564 89 2/10/2026
4.0.1563 96 2/10/2026
4.0.1562 113 2/10/2026
4.0.1561 101 2/5/2026
4.0.1560 114 2/4/2026
4.0.1559 108 1/28/2026
4.0.1558 145 1/22/2026
4.0.1557 96 1/22/2026
4.0.1556 120 1/21/2026
4.0.1555 167 1/19/2026
4.0.1554 104 1/18/2026
Loading failed