Soenneker.OpenAI.Client.Chat
2.1.323
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Soenneker.OpenAI.Client.Chat --version 2.1.323
NuGet\Install-Package Soenneker.OpenAI.Client.Chat -Version 2.1.323
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="2.1.323" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soenneker.OpenAI.Client.Chat --version 2.1.323
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.OpenAI.Client.Chat, 2.1.323"
#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=2.1.323 // Install Soenneker.OpenAI.Client.Chat as a Cake Tool #tool nuget:?package=Soenneker.OpenAI.Client.Chat&version=2.1.323
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- OpenAI (>= 2.0.0)
- Soenneker.Extensions.Configuration (>= 2.1.469)
- Soenneker.Utils.AsyncSingleton (>= 2.1.420)
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.393 | 0 | 11/20/2024 |
3.0.392 | 0 | 11/20/2024 |
3.0.391 | 0 | 11/20/2024 |
3.0.390 | 0 | 11/20/2024 |
3.0.389 | 0 | 11/20/2024 |
3.0.388 | 0 | 11/20/2024 |
3.0.387 | 0 | 11/20/2024 |
3.0.386 | 0 | 11/20/2024 |
3.0.385 | 0 | 11/20/2024 |
3.0.384 | 0 | 11/20/2024 |
3.0.383 | 0 | 11/20/2024 |
3.0.382 | 0 | 11/19/2024 |
3.0.381 | 0 | 11/19/2024 |
3.0.380 | 5 | 11/19/2024 |
3.0.378 | 20 | 11/19/2024 |
3.0.377 | 18 | 11/19/2024 |
3.0.376 | 18 | 11/19/2024 |
3.0.375 | 21 | 11/19/2024 |
3.0.374 | 20 | 11/19/2024 |
3.0.373 | 23 | 11/19/2024 |
3.0.372 | 19 | 11/19/2024 |
3.0.371 | 20 | 11/19/2024 |
3.0.370 | 68 | 11/15/2024 |
3.0.369 | 59 | 11/14/2024 |
3.0.368 | 59 | 11/14/2024 |
3.0.367 | 61 | 11/14/2024 |
3.0.366 | 62 | 11/14/2024 |
3.0.365 | 65 | 11/14/2024 |
3.0.364 | 61 | 11/14/2024 |
3.0.363 | 61 | 11/14/2024 |
3.0.362 | 61 | 11/14/2024 |
3.0.361 | 58 | 11/14/2024 |
3.0.360 | 60 | 11/14/2024 |
3.0.359 | 59 | 11/14/2024 |
3.0.358 | 62 | 11/14/2024 |
3.0.357 | 59 | 11/14/2024 |
3.0.356 | 61 | 11/14/2024 |
3.0.355 | 61 | 11/14/2024 |
3.0.354 | 60 | 11/14/2024 |
3.0.353 | 65 | 11/14/2024 |
2.1.352 | 66 | 11/13/2024 |
2.1.351 | 68 | 11/13/2024 |
2.1.350 | 58 | 11/13/2024 |
2.1.349 | 66 | 11/13/2024 |
2.1.348 | 68 | 11/13/2024 |
2.1.347 | 61 | 11/13/2024 |
2.1.346 | 65 | 11/13/2024 |
2.1.345 | 61 | 11/13/2024 |
2.1.344 | 69 | 11/12/2024 |
2.1.343 | 64 | 11/12/2024 |
2.1.342 | 59 | 11/12/2024 |
2.1.341 | 67 | 11/12/2024 |
2.1.340 | 68 | 11/9/2024 |
2.1.339 | 71 | 11/9/2024 |
2.1.338 | 68 | 11/9/2024 |
2.1.337 | 65 | 11/9/2024 |
2.1.336 | 62 | 11/9/2024 |
2.1.335 | 63 | 11/9/2024 |
2.1.334 | 67 | 11/9/2024 |
2.1.333 | 62 | 11/8/2024 |
2.1.332 | 59 | 11/8/2024 |
2.1.331 | 62 | 11/8/2024 |
2.1.330 | 66 | 11/8/2024 |
2.1.329 | 63 | 11/8/2024 |
2.1.328 | 66 | 11/8/2024 |
2.1.327 | 60 | 11/8/2024 |
2.1.326 | 65 | 11/8/2024 |
2.1.325 | 60 | 11/8/2024 |
2.1.324 | 59 | 11/8/2024 |
2.1.323 | 62 | 11/8/2024 |
2.1.322 | 63 | 11/6/2024 |
2.1.321 | 64 | 11/1/2024 |
2.1.320 | 70 | 11/1/2024 |
2.1.319 | 69 | 11/1/2024 |
2.1.318 | 70 | 11/1/2024 |
2.1.317 | 58 | 11/1/2024 |
2.1.316 | 68 | 10/29/2024 |
2.1.315 | 62 | 10/29/2024 |
2.1.314 | 71 | 10/29/2024 |
2.1.313 | 64 | 10/29/2024 |
2.1.312 | 64 | 10/29/2024 |
2.1.311 | 68 | 10/29/2024 |
2.1.310 | 68 | 10/29/2024 |
2.1.309 | 70 | 10/29/2024 |
2.1.308 | 62 | 10/29/2024 |
2.1.307 | 60 | 10/29/2024 |
2.1.306 | 62 | 10/28/2024 |
2.1.305 | 60 | 10/28/2024 |
2.1.304 | 61 | 10/28/2024 |
2.1.303 | 67 | 10/26/2024 |
2.1.302 | 69 | 10/26/2024 |
2.1.301 | 62 | 10/26/2024 |
2.1.300 | 67 | 10/26/2024 |
2.1.299 | 70 | 10/22/2024 |
2.1.298 | 69 | 10/22/2024 |
2.1.297 | 67 | 10/22/2024 |
2.1.296 | 78 | 10/22/2024 |
2.1.295 | 72 | 10/22/2024 |
2.1.294 | 71 | 10/22/2024 |
2.1.293 | 66 | 10/22/2024 |
2.1.292 | 79 | 10/22/2024 |
2.1.291 | 78 | 10/22/2024 |
2.1.290 | 74 | 10/22/2024 |
2.1.289 | 95 | 10/18/2024 |
2.1.288 | 62 | 10/17/2024 |
2.1.287 | 62 | 10/17/2024 |
2.1.286 | 70 | 10/17/2024 |
2.1.285 | 57 | 10/17/2024 |
2.1.284 | 81 | 10/15/2024 |
2.1.283 | 72 | 10/15/2024 |
2.1.282 | 69 | 10/15/2024 |
2.1.281 | 68 | 10/15/2024 |
2.1.280 | 72 | 10/14/2024 |
2.1.279 | 73 | 10/14/2024 |
2.1.278 | 75 | 10/12/2024 |
2.1.277 | 72 | 10/12/2024 |
2.1.276 | 73 | 10/12/2024 |
2.1.275 | 73 | 10/11/2024 |
2.1.274 | 75 | 10/11/2024 |
2.1.273 | 87 | 10/11/2024 |
2.1.272 | 78 | 10/9/2024 |
2.1.271 | 75 | 10/9/2024 |
2.1.270 | 72 | 10/9/2024 |
2.1.269 | 72 | 10/9/2024 |
2.1.268 | 74 | 10/9/2024 |
2.1.267 | 69 | 10/9/2024 |
2.1.266 | 80 | 10/8/2024 |
2.1.265 | 74 | 10/8/2024 |
2.1.264 | 77 | 10/8/2024 |
2.1.263 | 76 | 10/8/2024 |
2.1.262 | 71 | 10/8/2024 |
2.1.261 | 76 | 10/8/2024 |
2.1.260 | 71 | 10/8/2024 |
2.1.259 | 70 | 10/8/2024 |
2.1.258 | 72 | 10/8/2024 |
2.1.257 | 71 | 10/3/2024 |
2.1.256 | 60 | 10/3/2024 |
2.1.255 | 70 | 10/3/2024 |
2.1.254 | 71 | 10/3/2024 |
2.1.253 | 70 | 10/3/2024 |
2.1.252 | 71 | 10/3/2024 |
2.1.251 | 68 | 10/3/2024 |
2.1.250 | 71 | 10/3/2024 |
2.1.249 | 65 | 10/3/2024 |
2.1.248 | 69 | 10/2/2024 |
2.1.247 | 72 | 10/2/2024 |
2.1.246 | 69 | 10/2/2024 |
2.1.245 | 68 | 10/2/2024 |
2.1.244 | 69 | 10/2/2024 |
2.1.243 | 64 | 10/2/2024 |
2.1.242 | 72 | 10/2/2024 |
2.1.241 | 71 | 10/2/2024 |
2.1.240 | 67 | 10/2/2024 |
2.1.239 | 72 | 10/2/2024 |
2.1.238 | 69 | 10/1/2024 |
2.1.237 | 71 | 10/1/2024 |
2.1.236 | 73 | 10/1/2024 |
2.1.235 | 69 | 10/1/2024 |
2.1.234 | 69 | 10/1/2024 |
2.1.233 | 70 | 10/1/2024 |
2.1.232 | 72 | 10/1/2024 |
2.1.231 | 71 | 10/1/2024 |
2.1.230 | 71 | 10/1/2024 |
2.1.229 | 49 | 9/30/2024 |
2.1.228 | 48 | 9/29/2024 |
2.1.227 | 46 | 9/29/2024 |
2.1.226 | 46 | 9/29/2024 |
2.1.225 | 42 | 9/29/2024 |
2.1.224 | 44 | 9/29/2024 |
2.1.223 | 45 | 9/29/2024 |
2.1.222 | 48 | 9/29/2024 |
2.1.221 | 46 | 9/29/2024 |
2.1.220 | 46 | 9/29/2024 |
2.1.219 | 49 | 9/28/2024 |
2.1.218 | 42 | 9/27/2024 |
2.1.217 | 41 | 9/27/2024 |
2.1.216 | 47 | 9/27/2024 |
2.1.215 | 48 | 9/27/2024 |
2.1.214 | 48 | 9/27/2024 |
2.1.213 | 43 | 9/27/2024 |
2.1.212 | 45 | 9/27/2024 |
2.1.211 | 44 | 9/27/2024 |
2.1.210 | 46 | 9/27/2024 |
2.1.209 | 48 | 9/27/2024 |
2.1.208 | 46 | 9/27/2024 |
2.1.207 | 47 | 9/26/2024 |
2.1.206 | 43 | 9/26/2024 |
2.1.205 | 45 | 9/26/2024 |
2.1.204 | 44 | 9/26/2024 |
2.1.203 | 45 | 9/26/2024 |
2.1.202 | 44 | 9/26/2024 |
2.1.201 | 42 | 9/26/2024 |
2.1.200 | 47 | 9/26/2024 |
2.1.199 | 46 | 9/26/2024 |
2.1.198 | 47 | 9/26/2024 |
2.1.197 | 44 | 9/26/2024 |
2.1.195 | 48 | 9/26/2024 |
2.1.194 | 44 | 9/26/2024 |
2.1.193 | 46 | 9/23/2024 |
2.1.192 | 46 | 9/23/2024 |
2.1.191 | 46 | 9/23/2024 |
2.1.190 | 46 | 9/23/2024 |
2.1.189 | 43 | 9/23/2024 |
2.1.188 | 50 | 9/23/2024 |
2.1.187 | 46 | 9/23/2024 |
2.1.186 | 45 | 9/23/2024 |
2.1.185 | 46 | 9/23/2024 |
2.1.184 | 43 | 9/23/2024 |
2.1.183 | 49 | 9/23/2024 |
2.1.182 | 43 | 9/23/2024 |
2.1.181 | 48 | 9/23/2024 |
2.1.180 | 40 | 9/23/2024 |
2.1.179 | 46 | 9/23/2024 |
2.1.178 | 45 | 9/23/2024 |
2.1.177 | 41 | 9/23/2024 |
2.1.176 | 51 | 9/23/2024 |
2.1.175 | 46 | 9/23/2024 |
2.1.174 | 45 | 9/23/2024 |
2.1.173 | 42 | 9/23/2024 |
2.1.172 | 38 | 9/20/2024 |
2.1.171 | 45 | 9/18/2024 |
2.1.170 | 47 | 9/18/2024 |
2.1.169 | 47 | 9/18/2024 |
2.1.168 | 43 | 9/18/2024 |
2.1.167 | 52 | 9/18/2024 |
2.1.166 | 49 | 9/18/2024 |
2.1.165 | 47 | 9/18/2024 |
2.1.163 | 50 | 9/17/2024 |
2.1.162 | 47 | 9/17/2024 |
2.1.161 | 48 | 9/17/2024 |
2.1.160 | 47 | 9/17/2024 |
2.1.159 | 52 | 9/17/2024 |
2.1.158 | 53 | 9/17/2024 |
2.1.157 | 47 | 9/17/2024 |
2.1.156 | 47 | 9/17/2024 |
2.1.155 | 49 | 9/17/2024 |
2.1.154 | 49 | 9/17/2024 |
2.1.153 | 45 | 9/17/2024 |
2.1.152 | 48 | 9/17/2024 |
2.1.151 | 55 | 9/17/2024 |
2.1.150 | 49 | 9/17/2024 |
2.1.149 | 53 | 9/17/2024 |
2.1.148 | 52 | 9/17/2024 |
2.1.147 | 44 | 9/17/2024 |
2.1.146 | 47 | 9/17/2024 |
2.1.145 | 44 | 9/16/2024 |
2.1.144 | 66 | 9/16/2024 |
2.1.143 | 53 | 9/16/2024 |
2.1.142 | 55 | 9/16/2024 |
2.1.141 | 48 | 9/16/2024 |
2.1.140 | 49 | 9/12/2024 |
2.1.139 | 47 | 9/12/2024 |
2.1.138 | 51 | 9/12/2024 |
2.1.137 | 47 | 9/12/2024 |
2.1.136 | 49 | 9/12/2024 |
2.1.135 | 54 | 9/12/2024 |
2.1.134 | 52 | 9/11/2024 |
2.1.133 | 52 | 9/11/2024 |
2.1.132 | 54 | 9/11/2024 |
2.1.131 | 48 | 9/11/2024 |
2.1.130 | 53 | 9/11/2024 |
2.1.129 | 52 | 9/11/2024 |
2.1.128 | 53 | 9/11/2024 |
2.1.127 | 50 | 9/11/2024 |
2.1.125 | 54 | 9/11/2024 |
2.1.123 | 55 | 9/11/2024 |
2.1.122 | 49 | 9/11/2024 |
2.1.121 | 52 | 9/11/2024 |
2.1.120 | 52 | 9/11/2024 |
2.1.119 | 56 | 9/10/2024 |
2.1.118 | 46 | 9/10/2024 |
2.1.117 | 51 | 9/10/2024 |
2.1.116 | 47 | 9/10/2024 |
2.1.115 | 47 | 9/10/2024 |
2.1.114 | 46 | 9/10/2024 |
2.1.113 | 54 | 9/10/2024 |
2.1.112 | 47 | 9/9/2024 |
2.1.111 | 49 | 9/9/2024 |
2.1.108 | 49 | 9/9/2024 |
2.1.105 | 55 | 9/9/2024 |
2.1.104 | 51 | 9/9/2024 |
2.1.103 | 51 | 9/9/2024 |
2.1.102 | 47 | 9/9/2024 |
2.1.101 | 49 | 9/9/2024 |
2.1.100 | 49 | 9/9/2024 |
2.1.99 | 47 | 9/9/2024 |
2.1.98 | 57 | 9/9/2024 |
2.1.97 | 52 | 9/7/2024 |
2.1.96 | 57 | 9/7/2024 |
2.1.95 | 54 | 9/7/2024 |
2.1.94 | 52 | 9/7/2024 |
2.1.93 | 48 | 9/7/2024 |
2.1.92 | 58 | 9/6/2024 |
2.1.91 | 53 | 9/6/2024 |
2.1.90 | 52 | 9/6/2024 |
2.1.89 | 54 | 9/6/2024 |
2.1.88 | 52 | 9/6/2024 |
2.1.87 | 53 | 9/5/2024 |
2.1.86 | 43 | 9/5/2024 |
2.1.85 | 52 | 9/5/2024 |
2.1.84 | 52 | 9/5/2024 |
2.1.83 | 47 | 9/5/2024 |
2.1.82 | 52 | 9/5/2024 |
2.1.81 | 57 | 9/5/2024 |
2.1.80 | 54 | 9/5/2024 |
2.1.79 | 56 | 9/5/2024 |
2.1.78 | 51 | 9/5/2024 |
2.1.77 | 53 | 9/5/2024 |
2.1.76 | 53 | 9/5/2024 |
2.1.75 | 53 | 9/5/2024 |
2.1.74 | 50 | 9/5/2024 |
2.1.73 | 53 | 9/4/2024 |
2.1.72 | 46 | 9/4/2024 |
2.1.71 | 56 | 9/4/2024 |
2.1.70 | 52 | 9/4/2024 |
2.1.69 | 51 | 9/4/2024 |
2.1.68 | 52 | 9/4/2024 |
2.1.67 | 54 | 9/3/2024 |
2.1.66 | 52 | 9/3/2024 |
2.1.65 | 52 | 9/3/2024 |
2.1.64 | 48 | 9/3/2024 |
2.1.63 | 57 | 9/3/2024 |
2.1.62 | 49 | 9/3/2024 |
2.1.61 | 50 | 9/3/2024 |
2.1.60 | 46 | 9/3/2024 |
2.1.59 | 46 | 9/3/2024 |
2.1.58 | 48 | 9/3/2024 |
2.1.57 | 46 | 9/3/2024 |
2.1.56 | 51 | 8/29/2024 |
2.1.55 | 51 | 8/29/2024 |
2.1.54 | 48 | 8/29/2024 |
2.1.53 | 45 | 8/29/2024 |
2.1.52 | 43 | 8/29/2024 |
2.1.51 | 57 | 8/26/2024 |
2.1.50 | 48 | 8/26/2024 |
2.1.49 | 51 | 8/26/2024 |
2.1.48 | 54 | 8/26/2024 |
2.1.47 | 67 | 8/24/2024 |
2.1.46 | 77 | 8/21/2024 |
2.1.45 | 72 | 8/21/2024 |
2.1.44 | 62 | 8/21/2024 |
2.1.43 | 73 | 8/21/2024 |
2.1.42 | 76 | 8/20/2024 |
2.1.41 | 70 | 8/20/2024 |
2.1.40 | 61 | 8/20/2024 |
2.1.39 | 56 | 8/20/2024 |
2.1.38 | 58 | 8/20/2024 |
2.1.37 | 57 | 8/20/2024 |
2.1.36 | 70 | 8/20/2024 |
2.1.35 | 62 | 8/19/2024 |
2.1.34 | 73 | 8/15/2024 |
2.1.33 | 65 | 8/15/2024 |
2.1.32 | 66 | 8/15/2024 |
2.1.31 | 74 | 8/15/2024 |
2.1.30 | 71 | 8/13/2024 |
2.1.29 | 67 | 8/13/2024 |
2.1.28 | 51 | 8/7/2024 |
2.1.27 | 45 | 8/6/2024 |
2.1.26 | 37 | 8/6/2024 |
2.1.25 | 37 | 8/6/2024 |
2.1.24 | 52 | 8/1/2024 |
2.1.23 | 46 | 8/1/2024 |
2.1.22 | 48 | 8/1/2024 |
2.1.21 | 49 | 8/1/2024 |
2.1.20 | 49 | 8/1/2024 |
2.1.19 | 39 | 7/31/2024 |
2.1.18 | 43 | 7/26/2024 |
2.1.17 | 57 | 7/25/2024 |
2.1.16 | 52 | 7/25/2024 |
2.1.15 | 48 | 7/24/2024 |
2.1.14 | 46 | 7/24/2024 |
2.1.13 | 54 | 7/24/2024 |
2.1.12 | 55 | 7/24/2024 |
2.1.11 | 59 | 7/20/2024 |
2.1.10 | 59 | 7/20/2024 |
2.1.9 | 57 | 7/20/2024 |
2.1.8 | 59 | 7/20/2024 |
2.1.7 | 64 | 7/20/2024 |
2.1.6 | 49 | 7/15/2024 |
2.1.5 | 63 | 7/14/2024 |
2.1.4 | 58 | 7/14/2024 |
2.1.3 | 48 | 7/12/2024 |
2.1.2 | 50 | 7/12/2024 |
2.1.1 | 46 | 7/12/2024 |