Sail.NET 0.2.2

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

// Install Sail.NET as a Cake Tool
#tool nuget:?package=Sail.NET&version=0.2.2                

Sail.NET

Sail.NET is a .NET wrapper for OpenAI's API that aims to create a streamlined and intuive way of accessing the API.

Setup

  1. Create an API key at: https://platform.openai.com/
  2. Install the Sail.NET NuGet package

Implementation

// Create the processor object
SailProcessor processor = new();

// Create the arguments to pass in
SailProcessorArgs processorArgs = new()
  {
      ApiKey = "*** API KEY GOES HERE ***",
      Models = new()
      {
          SailModelTypes.GPT3Point5,
          SailModelTypes.DALLE
      }
  };

// Initialize the processor
processor.Initialize(processorArgs);

// Send a request
SailContext<SailMessage> response = await processor.SendRequestAsync("Hello World!", SailModelTypes.DALLE, count: 1);

// Check if response is successful
if (response.Success)
{
    // Output response
    Console.WriteLine("Response: " + response.Result.Output);
}

History

Version 0.2

Version 0.2.2
  • Renamed enum
Version 0.2.1
  • Added support for multiple endpoints
  • Refactored code to make using the library simpler

Version 0.1

Version 0.1.1
  • First implemtation, added support for ChatGPT requests and responses
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.
  • net6.0

    • No dependencies.

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
0.6.1 132 4/14/2024
0.5.1 168 12/21/2023
0.4.2 157 8/13/2023
0.4.1 162 7/10/2023
0.3.1 174 7/1/2023
0.2.4 157 6/25/2023
0.2.3 136 6/24/2023
0.2.2 144 6/24/2023