Soenneker.OpenAI.Client.Chat 3.0.549

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

// Install Soenneker.OpenAI.Client.Chat as a Cake Tool
#tool nuget:?package=Soenneker.OpenAI.Client.Chat&version=3.0.549                

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 OpenAI Chat (completions) client

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

For the Azure version of this: Soenneker.Azure.OpenAI.Client.Chat

Installation

dotnet add package Soenneker.OpenAI.Client.Chat

Register:

builder.services.AddOpenAIChatClientAsSingleton();

IConfiguration values:

"OpenAI:ApiKey"
"OpenAI:Model"

Usage

public class OpenAIService
{
    private readonly IOpenAIChatClient _chatClient;

    public OpenAIService(IOpenAIChatClient 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 net9.0 is compatible. 
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
3.0.553 0 12/22/2024
3.0.552 0 12/22/2024
3.0.551 0 12/22/2024
3.0.550 0 12/22/2024
3.0.549 5 12/22/2024
3.0.548 22 12/22/2024
3.0.547 21 12/22/2024
3.0.546 32 12/22/2024
3.0.545 30 12/22/2024
3.0.544 35 12/22/2024
3.0.543 38 12/21/2024
3.0.542 35 12/21/2024
3.0.541 39 12/21/2024
3.0.540 36 12/21/2024
3.0.539 34 12/21/2024
3.0.538 36 12/21/2024
3.0.537 36 12/21/2024
3.0.536 37 12/21/2024
3.0.535 38 12/21/2024
3.0.534 35 12/21/2024
3.0.533 42 12/21/2024
3.0.532 39 12/21/2024
3.0.531 36 12/21/2024
3.0.530 41 12/20/2024
3.0.529 40 12/20/2024
3.0.528 37 12/20/2024
3.0.527 39 12/20/2024
3.0.526 39 12/20/2024
3.0.525 35 12/20/2024
3.0.524 33 12/20/2024
3.0.523 37 12/20/2024
3.0.522 39 12/20/2024
3.0.521 43 12/19/2024
3.0.520 36 12/19/2024
3.0.519 29 12/19/2024
3.0.518 34 12/19/2024
3.0.517 30 12/19/2024
3.0.516 34 12/19/2024
3.0.515 36 12/19/2024
3.0.514 44 12/18/2024
3.0.513 35 12/18/2024
3.0.512 37 12/18/2024
3.0.511 44 12/17/2024
3.0.509 43 12/17/2024
3.0.508 43 12/17/2024
3.0.507 43 12/17/2024
3.0.506 55 12/17/2024
3.0.505 61 12/17/2024
3.0.504 57 12/16/2024
3.0.503 52 12/16/2024
3.0.502 56 12/16/2024
3.0.501 69 12/10/2024
3.0.500 73 12/10/2024
3.0.499 67 12/10/2024
3.0.498 64 12/10/2024
3.0.497 65 12/10/2024
3.0.496 72 12/9/2024
3.0.495 61 12/9/2024
3.0.494 76 12/9/2024
3.0.493 65 12/9/2024
3.0.492 69 12/9/2024
3.0.491 61 12/9/2024
3.0.490 63 12/9/2024
3.0.489 66 12/9/2024
3.0.488 73 12/7/2024
3.0.487 82 12/6/2024
3.0.486 70 12/6/2024
3.0.485 71 12/6/2024
3.0.484 78 12/6/2024
3.0.483 81 12/6/2024
3.0.482 67 12/6/2024
3.0.481 74 12/6/2024
3.0.480 80 12/6/2024
3.0.479 72 12/6/2024
3.0.478 70 12/6/2024
3.0.477 75 12/6/2024
3.0.476 73 12/6/2024
3.0.475 76 12/6/2024
3.0.474 69 12/6/2024
3.0.473 75 12/6/2024
3.0.472 73 12/6/2024
3.0.471 83 12/6/2024
3.0.470 82 12/6/2024
3.0.469 67 12/6/2024
3.0.468 75 12/6/2024
3.0.467 72 12/6/2024
3.0.466 76 12/6/2024
3.0.465 74 12/6/2024
3.0.464 78 12/6/2024
3.0.463 74 12/6/2024
3.0.462 74 12/6/2024
3.0.460 76 12/5/2024
3.0.459 75 12/5/2024
3.0.458 69 12/5/2024
3.0.457 75 12/5/2024
3.0.456 78 12/5/2024
3.0.455 74 12/5/2024
3.0.454 67 12/5/2024
3.0.453 78 12/5/2024
3.0.452 71 12/5/2024
3.0.451 72 12/5/2024
3.0.450 69 12/5/2024
3.0.449 82 12/5/2024
3.0.448 74 12/5/2024
3.0.447 72 12/5/2024
3.0.446 74 12/4/2024
3.0.445 69 12/4/2024
3.0.444 71 12/4/2024
3.0.443 73 12/4/2024
3.0.442 75 12/4/2024
3.0.441 71 12/4/2024
3.0.440 81 12/4/2024
3.0.439 74 12/4/2024
3.0.438 77 12/4/2024
3.0.437 78 12/4/2024
3.0.436 77 12/4/2024
3.0.435 75 12/3/2024
3.0.434 78 12/3/2024
3.0.433 81 12/3/2024
3.0.432 80 12/3/2024
3.0.431 81 12/3/2024
3.0.430 78 12/3/2024
3.0.429 78 12/3/2024
3.0.428 73 12/3/2024
3.0.427 71 12/3/2024
3.0.426 61 12/3/2024
3.0.425 62 12/3/2024
3.0.424 63 12/3/2024
3.0.423 63 12/2/2024
3.0.422 68 12/2/2024
3.0.421 61 12/2/2024
3.0.420 69 12/2/2024
3.0.419 67 12/2/2024
3.0.418 66 12/2/2024
3.0.417 62 12/2/2024
3.0.416 72 12/2/2024
3.0.415 66 12/2/2024
3.0.414 62 12/2/2024
3.0.413 74 12/1/2024
3.0.412 70 12/1/2024
3.0.411 71 12/1/2024
3.0.410 75 12/1/2024
3.0.409 71 12/1/2024
3.0.408 65 12/1/2024
3.0.407 66 12/1/2024
3.0.406 65 12/1/2024
3.0.405 72 11/29/2024
3.0.404 74 11/29/2024
3.0.403 67 11/29/2024
3.0.402 67 11/29/2024
3.0.401 69 11/29/2024
3.0.400 83 11/21/2024
3.0.399 78 11/21/2024
3.0.398 76 11/21/2024
3.0.397 79 11/20/2024
3.0.396 85 11/20/2024
3.0.395 76 11/20/2024
3.0.394 73 11/20/2024
3.0.393 80 11/20/2024
3.0.392 76 11/20/2024
3.0.391 78 11/20/2024
3.0.390 85 11/20/2024
3.0.389 76 11/20/2024
3.0.388 76 11/20/2024
3.0.387 76 11/20/2024
3.0.386 77 11/20/2024
3.0.385 75 11/20/2024
3.0.384 74 11/20/2024
3.0.383 73 11/20/2024
3.0.382 76 11/19/2024
3.0.381 78 11/19/2024
3.0.380 75 11/19/2024
3.0.378 70 11/19/2024
3.0.377 79 11/19/2024
3.0.376 82 11/19/2024
3.0.375 77 11/19/2024
3.0.374 81 11/19/2024
3.0.373 70 11/19/2024
3.0.372 73 11/19/2024
3.0.371 73 11/19/2024
3.0.370 79 11/15/2024
3.0.369 70 11/14/2024
3.0.368 74 11/14/2024
3.0.367 74 11/14/2024
3.0.366 75 11/14/2024
3.0.365 76 11/14/2024
3.0.364 72 11/14/2024
3.0.363 74 11/14/2024
3.0.362 72 11/14/2024
3.0.361 69 11/14/2024
3.0.360 75 11/14/2024
3.0.359 78 11/14/2024
3.0.358 79 11/14/2024
3.0.357 74 11/14/2024
3.0.356 82 11/14/2024
3.0.355 80 11/14/2024
3.0.354 79 11/14/2024
3.0.353 80 11/14/2024
2.1.352 82 11/13/2024
2.1.351 83 11/13/2024
2.1.350 75 11/13/2024
2.1.349 81 11/13/2024
2.1.348 83 11/13/2024
2.1.347 76 11/13/2024
2.1.346 80 11/13/2024
2.1.345 78 11/13/2024
2.1.344 84 11/12/2024
2.1.343 79 11/12/2024
2.1.342 76 11/12/2024
2.1.341 82 11/12/2024
2.1.340 81 11/9/2024
2.1.339 86 11/9/2024
2.1.338 84 11/9/2024
2.1.337 77 11/9/2024
2.1.336 76 11/9/2024
2.1.335 78 11/9/2024
2.1.334 81 11/9/2024
2.1.333 75 11/8/2024
2.1.332 71 11/8/2024
2.1.331 74 11/8/2024
2.1.330 80 11/8/2024
2.1.329 77 11/8/2024
2.1.328 79 11/8/2024
2.1.327 74 11/8/2024
2.1.326 78 11/8/2024
2.1.325 73 11/8/2024
2.1.324 72 11/8/2024
2.1.323 76 11/8/2024
2.1.322 77 11/6/2024
2.1.321 78 11/1/2024
2.1.320 83 11/1/2024
2.1.319 82 11/1/2024
2.1.318 83 11/1/2024
2.1.317 72 11/1/2024
2.1.316 79 10/29/2024
2.1.315 74 10/29/2024
2.1.314 84 10/29/2024
2.1.313 75 10/29/2024
2.1.312 73 10/29/2024
2.1.311 77 10/29/2024
2.1.310 77 10/29/2024
2.1.309 84 10/29/2024
2.1.308 71 10/29/2024
2.1.307 71 10/29/2024
2.1.306 71 10/28/2024
2.1.305 69 10/28/2024
2.1.304 73 10/28/2024
2.1.303 76 10/26/2024
2.1.302 78 10/26/2024
2.1.301 76 10/26/2024
2.1.300 76 10/26/2024
2.1.299 78 10/22/2024
2.1.298 77 10/22/2024
2.1.297 75 10/22/2024
2.1.296 91 10/22/2024
2.1.295 81 10/22/2024
2.1.294 81 10/22/2024
2.1.293 74 10/22/2024
2.1.292 91 10/22/2024
2.1.291 86 10/22/2024
2.1.290 82 10/22/2024
2.1.289 103 10/18/2024
2.1.288 71 10/17/2024
2.1.287 70 10/17/2024
2.1.286 78 10/17/2024
2.1.285 65 10/17/2024
2.1.284 93 10/15/2024
2.1.283 83 10/15/2024
2.1.282 79 10/15/2024
2.1.281 78 10/15/2024
2.1.280 84 10/14/2024
2.1.279 81 10/14/2024
2.1.278 83 10/12/2024
2.1.277 84 10/12/2024
2.1.276 81 10/12/2024
2.1.275 81 10/11/2024
2.1.274 83 10/11/2024
2.1.273 95 10/11/2024
2.1.272 86 10/9/2024
2.1.271 85 10/9/2024
2.1.270 84 10/9/2024
2.1.269 80 10/9/2024
2.1.268 82 10/9/2024
2.1.267 79 10/9/2024
2.1.266 88 10/8/2024
2.1.265 84 10/8/2024
2.1.264 85 10/8/2024
2.1.263 84 10/8/2024
2.1.262 80 10/8/2024
2.1.261 84 10/8/2024
2.1.260 83 10/8/2024
2.1.259 78 10/8/2024
2.1.258 84 10/8/2024
2.1.257 79 10/3/2024
2.1.256 68 10/3/2024
2.1.255 78 10/3/2024
2.1.254 79 10/3/2024
2.1.253 80 10/3/2024
2.1.252 83 10/3/2024
2.1.251 76 10/3/2024
2.1.250 79 10/3/2024
2.1.249 73 10/3/2024
2.1.248 77 10/2/2024
2.1.247 81 10/2/2024
2.1.246 79 10/2/2024
2.1.245 76 10/2/2024
2.1.244 77 10/2/2024
2.1.243 74 10/2/2024
2.1.242 82 10/2/2024
2.1.241 81 10/2/2024
2.1.240 75 10/2/2024
2.1.239 80 10/2/2024
2.1.238 77 10/1/2024
2.1.237 79 10/1/2024
2.1.236 81 10/1/2024
2.1.235 79 10/1/2024
2.1.234 77 10/1/2024
2.1.233 78 10/1/2024
2.1.232 82 10/1/2024
2.1.231 79 10/1/2024
2.1.230 81 10/1/2024
2.1.229 57 9/30/2024
2.1.228 54 9/29/2024
2.1.227 52 9/29/2024
2.1.226 58 9/29/2024
2.1.225 50 9/29/2024
2.1.224 50 9/29/2024
2.1.223 53 9/29/2024
2.1.222 54 9/29/2024
2.1.221 54 9/29/2024
2.1.220 52 9/29/2024
2.1.219 55 9/28/2024
2.1.218 48 9/27/2024
2.1.217 49 9/27/2024
2.1.216 53 9/27/2024
2.1.215 55 9/27/2024
2.1.214 56 9/27/2024
2.1.213 54 9/27/2024
2.1.212 53 9/27/2024
2.1.211 50 9/27/2024
2.1.210 54 9/27/2024
2.1.209 54 9/27/2024
2.1.208 52 9/27/2024
2.1.207 53 9/26/2024
2.1.206 49 9/26/2024
2.1.205 52 9/26/2024
2.1.204 50 9/26/2024
2.1.203 53 9/26/2024
2.1.202 52 9/26/2024
2.1.201 52 9/26/2024
2.1.200 55 9/26/2024
2.1.199 52 9/26/2024
2.1.198 53 9/26/2024
2.1.197 50 9/26/2024
2.1.195 54 9/26/2024
2.1.194 50 9/26/2024
2.1.193 53 9/23/2024
2.1.192 52 9/23/2024
2.1.191 52 9/23/2024
2.1.190 52 9/23/2024
2.1.189 52 9/23/2024
2.1.188 58 9/23/2024
2.1.187 56 9/23/2024
2.1.186 55 9/23/2024
2.1.185 54 9/23/2024
2.1.184 51 9/23/2024
2.1.183 55 9/23/2024
2.1.182 49 9/23/2024
2.1.181 56 9/23/2024
2.1.180 46 9/23/2024
2.1.179 55 9/23/2024
2.1.178 55 9/23/2024
2.1.177 47 9/23/2024
2.1.176 57 9/23/2024
2.1.175 54 9/23/2024
2.1.174 51 9/23/2024
2.1.173 50 9/23/2024
2.1.172 46 9/20/2024
2.1.171 53 9/18/2024
2.1.170 55 9/18/2024
2.1.169 57 9/18/2024
2.1.168 51 9/18/2024
2.1.167 58 9/18/2024
2.1.166 56 9/18/2024
2.1.165 53 9/18/2024
2.1.163 56 9/17/2024
2.1.162 53 9/17/2024
2.1.161 58 9/17/2024
2.1.160 58 9/17/2024
2.1.159 58 9/17/2024
2.1.158 59 9/17/2024
2.1.157 53 9/17/2024
2.1.156 53 9/17/2024
2.1.155 56 9/17/2024
2.1.154 58 9/17/2024
2.1.153 53 9/17/2024
2.1.152 54 9/17/2024
2.1.151 63 9/17/2024
2.1.150 55 9/17/2024
2.1.149 59 9/17/2024
2.1.148 58 9/17/2024
2.1.147 50 9/17/2024
2.1.146 53 9/17/2024
2.1.145 52 9/16/2024
2.1.144 76 9/16/2024
2.1.143 59 9/16/2024
2.1.142 61 9/16/2024
2.1.141 54 9/16/2024
2.1.140 57 9/12/2024
2.1.139 55 9/12/2024
2.1.138 59 9/12/2024
2.1.137 56 9/12/2024
2.1.136 55 9/12/2024
2.1.135 62 9/12/2024
2.1.134 58 9/11/2024
2.1.133 58 9/11/2024
2.1.132 60 9/11/2024
2.1.131 54 9/11/2024
2.1.130 59 9/11/2024
2.1.129 58 9/11/2024
2.1.128 59 9/11/2024
2.1.127 58 9/11/2024
2.1.125 62 9/11/2024
2.1.123 61 9/11/2024
2.1.122 55 9/11/2024
2.1.121 60 9/11/2024
2.1.120 60 9/11/2024
2.1.119 62 9/10/2024
2.1.118 52 9/10/2024
2.1.117 57 9/10/2024
2.1.116 55 9/10/2024
2.1.115 55 9/10/2024
2.1.114 54 9/10/2024
2.1.113 60 9/10/2024
2.1.112 53 9/9/2024
2.1.111 56 9/9/2024
2.1.108 55 9/9/2024
2.1.105 61 9/9/2024
2.1.104 59 9/9/2024
2.1.103 57 9/9/2024
2.1.102 55 9/9/2024
2.1.101 55 9/9/2024
2.1.100 55 9/9/2024
2.1.99 53 9/9/2024
2.1.98 63 9/9/2024
2.1.97 60 9/7/2024
2.1.96 65 9/7/2024
2.1.95 60 9/7/2024
2.1.94 62 9/7/2024
2.1.93 58 9/7/2024
2.1.92 64 9/6/2024
2.1.91 61 9/6/2024
2.1.90 58 9/6/2024
2.1.89 62 9/6/2024
2.1.88 60 9/6/2024
2.1.87 62 9/5/2024
2.1.86 51 9/5/2024
2.1.85 58 9/5/2024
2.1.84 58 9/5/2024
2.1.83 55 9/5/2024
2.1.82 58 9/5/2024
2.1.81 63 9/5/2024
2.1.80 62 9/5/2024
2.1.79 62 9/5/2024
2.1.78 57 9/5/2024
2.1.77 61 9/5/2024
2.1.76 61 9/5/2024
2.1.75 65 9/5/2024
2.1.74 56 9/5/2024
2.1.73 59 9/4/2024
2.1.72 52 9/4/2024
2.1.71 63 9/4/2024
2.1.70 62 9/4/2024
2.1.69 57 9/4/2024
2.1.68 58 9/4/2024
2.1.67 60 9/3/2024
2.1.66 58 9/3/2024
2.1.65 58 9/3/2024
2.1.64 56 9/3/2024
2.1.63 63 9/3/2024
2.1.62 57 9/3/2024
2.1.61 58 9/3/2024
2.1.60 54 9/3/2024
2.1.59 58 9/3/2024
2.1.58 56 9/3/2024
2.1.57 55 9/3/2024
2.1.56 59 8/29/2024
2.1.55 57 8/29/2024
2.1.54 54 8/29/2024
2.1.53 53 8/29/2024
2.1.52 51 8/29/2024
2.1.51 65 8/26/2024
2.1.50 54 8/26/2024
2.1.49 57 8/26/2024
2.1.48 60 8/26/2024
2.1.47 75 8/24/2024
2.1.46 87 8/21/2024
2.1.45 84 8/21/2024
2.1.44 68 8/21/2024
2.1.43 81 8/21/2024
2.1.42 83 8/20/2024
2.1.41 78 8/20/2024
2.1.40 67 8/20/2024
2.1.39 65 8/20/2024
2.1.38 64 8/20/2024
2.1.37 63 8/20/2024
2.1.36 77 8/20/2024
2.1.35 72 8/19/2024
2.1.34 82 8/15/2024
2.1.33 71 8/15/2024
2.1.32 72 8/15/2024
2.1.31 80 8/15/2024
2.1.30 77 8/13/2024
2.1.29 77 8/13/2024
2.1.28 61 8/7/2024
2.1.27 51 8/6/2024
2.1.26 45 8/6/2024
2.1.25 45 8/6/2024
2.1.24 58 8/1/2024
2.1.23 52 8/1/2024
2.1.22 54 8/1/2024
2.1.21 55 8/1/2024
2.1.20 57 8/1/2024
2.1.19 51 7/31/2024
2.1.18 51 7/26/2024
2.1.17 65 7/25/2024
2.1.16 62 7/25/2024
2.1.15 52 7/24/2024
2.1.14 52 7/24/2024
2.1.13 58 7/24/2024
2.1.12 61 7/24/2024
2.1.11 67 7/20/2024
2.1.10 67 7/20/2024
2.1.9 63 7/20/2024
2.1.8 69 7/20/2024
2.1.7 72 7/20/2024
2.1.6 57 7/15/2024
2.1.5 69 7/14/2024
2.1.4 66 7/14/2024
2.1.3 54 7/12/2024
2.1.2 56 7/12/2024
2.1.1 56 7/12/2024