NGpt 1.4.0

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

// Install NGpt as a Cake Tool
#tool nuget:?package=NGpt&version=1.4.0

NGpt - OpenAI C# library

NuGet NuGet Downloads

Thanks

Thanks for downloading NGpt!

NGpt is a powerful .NET 6 library that helps C# developers integrate ChatGPT from OpenAI into their applications in seconds. You need to know your OpenAI apiKey, and organization Id.

Features

  • Easy integration with ChatGPT from OpenAI
  • Simplified API for seamless usage
  • Built specifically for C# developers
  • Transient HTTP errors handling with rety logic and exponential backoff

Installation

Install the package from NuGet: Install-Package NGpt

Quickstart example

This is a QUICKSTART for C# DEVELOPERS to use OPENAI ChatGPT:

  1. Replace the <API_KEY> and <ORGANIZATION> with your own values.
  2. Copy the example code and paste it into your C# program.
  3. Congratulations! You made your first call to OpenAI ChatGPT!
  4. Experiment with your own requests and responses.
using NGpt;

// Initialize the client
var chat = new Chat("<API_KEY>", "<ORGANIZATION>");

// Create a completion request
var completionRequest = new ChatRequest()
{
    Messages = new ChatMessage[]
    {
        new ChatMessage()
        {
            Role = Role.User,
            Content = "Say this is a test!",
        }
    },
    Temperature = 0.7f,
    Model = ChatModel.GPT3_5Turbo
};

// Get the response
var response = chat.Complete(completionRequest);

// Extract the content
var content = response.Choices[0].Message.Content;

Console.WriteLine(content);

Support

For more information, support, or to report issues, please contact the support team at kontakt@pilsoft.pl.

License

NGpt is proprietary software. Unauthorized copying, modification, distribution, or any form of usage outside the terms of the license agreement are strictly prohibited. For more information on licensing, please contact the licensing team at kontakt@pilsoft.pl.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
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
1.7.4 265 7/18/2023
1.7.3 146 7/10/2023
1.7.2 132 7/6/2023
1.7.1 126 7/6/2023
1.7.0 134 5/12/2023
1.6.1 135 5/11/2023
1.6.0 121 5/10/2023
1.5.0 143 5/7/2023
1.4.5 128 5/5/2023
1.4.4 118 5/5/2023
1.4.3 140 4/30/2023
1.4.2 153 4/30/2023
1.4.1 144 4/30/2023
1.4.0 139 4/29/2023
1.3.0 138 4/28/2023

- Implement exponential backoff retry policy for transient HTTP errors