![]() |
VOOZH | about |
dotnet add package Aiursoft.GptClient.Abstractions --version 10.0.14
NuGet\Install-Package Aiursoft.GptClient.Abstractions -Version 10.0.14
<PackageReference Include="Aiursoft.GptClient.Abstractions" Version="10.0.14" />
<PackageVersion Include="Aiursoft.GptClient.Abstractions" Version="10.0.14" />Directory.Packages.props
<PackageReference Include="Aiursoft.GptClient.Abstractions" />Project file
paket add Aiursoft.GptClient.Abstractions --version 10.0.14
#r "nuget: Aiursoft.GptClient.Abstractions, 10.0.14"
#:package Aiursoft.GptClient.Abstractions@10.0.14
#addin nuget:?package=Aiursoft.GptClient.Abstractions&version=10.0.14Install as a Cake Addin
#tool nuget:?package=Aiursoft.GptClient.Abstractions&version=10.0.14Install as a Cake Tool
👁 MIT licensed
👁 NuGet version (Aiursoft.GptClient)
👁 NuGet version (Aiursoft.GptClient.ChatConsole)
The SDK for ChatGpt. Simple implementation and easy to use.
First, install Aiursoft.GptClient to your ASP.NET Core project from nuget.org:
dotnet add package Aiursoft.GptClient
Exposed API in ChatClient:
public Task<CompletionData> AskModel(OpenAiModel model);
public Task<CompletionData> AskString(string gptModelType, params string[] content);
Required IConfiguration keys:
{
"OpenAI:Token": "YourOpenAIKey",
"OpenAI:CompletionApiUrl": "https://api.openai.com/v1/engines/davinci/completions"
}
For example, you can use the following code to create a simple ChatGpt client:
using Aiursoft.GptClient;
using Aiursoft.GptClient.Services;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace Test
{
public abstract class Program
{
public static async Task Main()
{
// Keys
var apiKey = "";
var endpoint = "http://localhost:11434/api/chat";
var model = "qwen3:32b-q8_0";
// Create a simple ChatGpt client.
var services = new ServiceCollection();
services.AddHttpClient();
services.AddLogging(logging => { logging.SetMinimumLevel(LogLevel.Warning); });
services.AddGptClient();
var serviceProvider = services.BuildServiceProvider();
var chatClient = serviceProvider.GetRequiredService<ChatClient>();
async Task<string> GetAnswer(string[] prompts)
{
return (await chatClient.AskString(
modelType: model,
completionApiUrl: endpoint,
token: apiKey,
content: prompts,
CancellationToken.None)).GetAnswerPart();
}
// Example usage
var answer = await GetAnswer(["Why is the sky blue?"]);
Console.WriteLine(answer);
}
}
}
Now you have built a simple ChatGpt client.
There are many ways to contribute to the project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.
Even if you with push rights on the repository, you should create a personal fork and create feature branches there when you need them. This keeps the main repository clean and your workflow cruft out of sight.
We're also interested in your feedback on the future of this project. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Aiursoft.GptClient.Abstractions:
| Package | Downloads |
|---|---|
|
Aiursoft.GptClient
Automatic dependencies management system which powers Aiursoft |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.14 | 635 | 4/8/2026 |
| 10.0.2 | 171 | 3/18/2026 |
| 10.0.1 | 135 | 3/18/2026 |
| 10.0.0 | 873 | 11/13/2025 |
| 9.0.35 | 383 | 9/17/2025 |
| 9.0.34 | 262 | 7/4/2025 |
| 9.0.33 | 208 | 7/4/2025 |
| 9.0.32 | 196 | 7/4/2025 |
| 9.0.31 | 206 | 7/4/2025 |
| 9.0.30 | 203 | 7/4/2025 |
| 9.0.22 | 220 | 6/25/2025 |
| 9.0.20 | 348 | 3/31/2025 |
| 9.0.19 | 239 | 3/31/2025 |
| 9.0.18 | 247 | 3/31/2025 |
| 9.0.17 | 239 | 3/31/2025 |
| 9.0.16 | 246 | 3/31/2025 |
| 9.0.11 | 308 | 3/31/2025 |
| 9.0.10 | 259 | 3/31/2025 |
| 9.0.9 | 244 | 3/31/2025 |
| 9.0.7 | 217 | 3/3/2025 |