LlmTornado 3.0.0
See the version list below for details.
dotnet add package LlmTornado --version 3.0.0
NuGet\Install-Package LlmTornado -Version 3.0.0
<PackageReference Include="LlmTornado" Version="3.0.0" />
paket add LlmTornado --version 3.0.0
#r "nuget: LlmTornado, 3.0.0"
// Install LlmTornado as a Cake Addin #addin nuget:?package=LlmTornado&version=3.0.0 // Install LlmTornado as a Cake Tool #tool nuget:?package=LlmTornado&version=3.0.0
.NET SDK for accessing the OpenAI Compatible APIs such as GPT-4 Turbo, Assistants, and DALL-E 3
OpenAiNextGeneration is a simple .NET library to use with various OpenAI compatible providers, such
as OpenAI, Azure OpenAI,
and KoboldCpp (
v1.45.2+). Supports features such as function calling in conjunction with streaming, caches its own HttpClient
s.
Supported features compared to OpenAI-API-dotnet:
- Assistants, threads, and messages support.
- Includes new models.
- Parallel function calling.
- Improved memory usage, and function calling in conjunction with streaming.
- Manages its pool of HttpClients.
- Improved credentials passing.
- Supports OpenAI-compatible API providers, such as KoboldCpp.
- Improved Azure OpenAI integration.
- Nullability annotations.
- Calls are guaranteed not to throw, full response is included in the call result. (Fully supported in 3.0+)
- Actively maintained, backed by a company I work for.
Features scheduled for open-sourcing:
- High-level plugin API.
- Approximate token counting for streaming & function calling.
⚡Getting Started
Install the library via NuGet:
Install-Package LlmTornado
🔮 Quick Inference
var api = new LlmTornado.OpenAiApi("YOUR_API_KEY");
var result = await api.Completions.GetCompletion("One Two Three One Two");
Console.WriteLine(result);
// should print something starting with "Three"
📖 Readme
Requirements
Unlike the original library, LlmTornado supports only .NET Core >= 6.0, if you need .NET Standard 2.0 /.NET Framework support, please use OpenAI-API-DotNet.
Getting started
Install from NuGet
Install package LlmTornado
from Nuget. Here's how via the command line:
Install-Package LlmTornado
Authentication
Pass keys directly to ApiAuthentication(string key)
constructor.
You use the APIAuthentication
when you initialize the API as shown:
// for example
var api = new OpenAiApi("YOUR_API_KEY"); // shorthand
// or
var api = new OpenAiApi(new APIAuthentication("YOUR_API_KEY")); // create object manually
You may optionally include an OpenAi Organization if multiple Organizations are under one account.
// for example
var api = new OpenAiApi(new ApiAuthentication("YOUR_API_KEY", "org-yourOrgHere"));
Documentation
Every single class, method, and property has extensive XML documentation, so it should show up automatically in IntelliSense. That combined with the official OpenAI documentation should be enough to get started. Feel free to open an issue here if you have any questions.
License
This library is licensed under MIT license.
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. |
-
net8.0
- Microsoft.Extensions.Http (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on LlmTornado:
Package | Downloads |
---|---|
LlmTornado.Contrib
Provides extra functionality to LlmTornado. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.1.26 | 187 | 11/22/2024 |
3.1.25 | 69 | 11/22/2024 |
3.1.24 | 81 | 11/21/2024 |
3.1.23 | 79 | 11/20/2024 |
3.1.22 | 88 | 11/20/2024 |
3.1.21 | 82 | 11/18/2024 |
3.1.20 | 66 | 11/18/2024 |
3.1.19 | 78 | 11/17/2024 |
3.1.18 | 73 | 11/16/2024 |
3.1.17 | 141 | 11/5/2024 |
3.1.16 | 77 | 11/4/2024 |
3.1.15 | 165 | 10/22/2024 |
3.1.14 | 340 | 9/14/2024 |
3.1.13 | 154 | 9/1/2024 |
3.1.12 | 156 | 8/20/2024 |
3.1.11 | 121 | 8/18/2024 |
3.1.10 | 112 | 8/6/2024 |
3.1.9 | 91 | 8/6/2024 |
3.1.8 | 92 | 7/24/2024 |
3.1.7 | 78 | 7/24/2024 |
3.1.6 | 74 | 7/23/2024 |
3.1.5 | 112 | 7/19/2024 |
3.1.4 | 92 | 7/19/2024 |
3.1.3 | 135 | 6/23/2024 |
3.1.2 | 129 | 6/15/2024 |
3.1.1 | 103 | 6/15/2024 |
3.1.0 | 93 | 6/15/2024 |
3.0.17 | 101 | 6/8/2024 |
3.0.16 | 94 | 6/8/2024 |
3.0.15 | 144 | 5/21/2024 |
3.0.14 | 112 | 5/21/2024 |
3.0.13 | 131 | 5/20/2024 |
3.0.11 | 108 | 5/18/2024 |
3.0.10 | 113 | 5/15/2024 |
3.0.9 | 127 | 5/15/2024 |
3.0.8 | 114 | 5/9/2024 |
3.0.7 | 138 | 5/5/2024 |
3.0.6 | 87 | 5/2/2024 |
3.0.5 | 95 | 5/1/2024 |
3.0.4 | 98 | 5/1/2024 |
3.0.3 | 92 | 5/1/2024 |
3.0.2 | 94 | 5/1/2024 |
3.0.1 | 121 | 4/27/2024 |
3.0.0 | 121 | 4/27/2024 |
TTS endpoint