Standard.AI.OpenAI
0.1.0
See the version list below for details.
dotnet add package Standard.AI.OpenAI --version 0.1.0
NuGet\Install-Package Standard.AI.OpenAI -Version 0.1.0
<PackageReference Include="Standard.AI.OpenAI" Version="0.1.0" />
paket add Standard.AI.OpenAI --version 0.1.0
#r "nuget: Standard.AI.OpenAI, 0.1.0"
// Install Standard.AI.OpenAI as a Cake Addin #addin nuget:?package=Standard.AI.OpenAI&version=0.1.0 // Install Standard.AI.OpenAI as a Cake Tool #tool nuget:?package=Standard.AI.OpenAI&version=0.1.0
OpenAI.NET
<div align=center> <img width="300" src="https://raw.githubusercontent.com/hassanhabib/OpenAI.NET/main/OpenAI.NET/artificial-intelligence.png" /> </div>
<br />
Introduction
OpenAI.NET is a Standard-Compliant .NET library built on top of OpenAI API RESTful endpoints to enable software engineers to develop AI-Powered solutions in .NET.
Standard-Compliance
This library was built according to The Standard. The library follows engineering principles, patterns and tooling as recommended by The Standard.
This library is also a community effort which involved many nights of pair-programming, test-driven development and in-depth exploration research and design discussions.
How to use this library?
In order to use this library there are prerequists that you must complete before you can write your first AI-Powered C#.NET program. These steps are as follows:
OpenAI Account
You must create an OpenAI account with the following link: https://platform.openai.com/signup
API Keys
Once you've created an OpenAI account. Now, go ahead and generate an API key from the following link: https://platform.openai.com/account/api-keys
Hello, World!
Once you've completed the aforementioned steps, let's write our very first program with OpenAI.NET as follows:
OpenAI.NET Nuget
Find our nuget package.
Program.cs
The following example demonstrate how you can write your first Completions program.
var openAiApiConfigurations = new ApiConfigurations
{
ApiKey = "YOUR_API_KEY_HERE",
OrganizationId = "YOUR_OPTIONAL_ORG_ID_HERE"
}
var openAiClient = new OpenAIClient(openAiApiConfigurations);
var inputCompletion = new Completion
{
Request = new CompletionRequest
{
Prompts = new string[] {"Human: Hello!"}
Model = "text-davinci-003"
};
}
Completion resultCompletion =
await this.openAiClient.Completions.PostCompletionAsync(
inputCompletion);
Array.ForEach(resultCompletion.Response.Prompts, Console.WriteLine);
How to Contribute
If you want to contribute to this project please review the following documents:
If you have a question make sure you either open an issue or join our The Standard Community discord server.
Live-Sessions
Our live-sessions are schedules on The Standard Calendar make sure you adjust the time to your city/timezone to to be able to join us.
We broadcast on multiple platforms: <br /> YouTube <br /> LinkedIn <br /> Twitch <br /> Twitter <br /> Facebook
Past-Sessions
Here's our live sessions to show you how this library was developed from scratch:
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67"><img width="20" src="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67" data-canonical-src="https://www.searchmarketingaustralia.com.au/wp-content/uploads/2017/10/original_images_YouTube.png" style="max-width: 100%;"></a> <a href="https://www.youtube.com/watch?v=JQnTpGV-7YA" rel="nofollow">OPENAI000: Getting Started</a>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67"><img width="20" src="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67" data-canonical-src="https://www.searchmarketingaustralia.com.au/wp-content/uploads/2017/10/original_images_YouTube.png" style="max-width: 100%;"></a> <a href="https://www.youtube.com/watch?v=2eN4ht2uESo" rel="nofollow">OPENAI001: API Integrations</a>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67"><img width="20" src="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67" data-canonical-src="https://www.searchmarketingaustralia.com.au/wp-content/uploads/2017/10/original_images_YouTube.png" style="max-width: 100%;"></a> <a href="https://youtube.com/live/IrBGCAyLmmQ?si=EnSIkaIECMiOmarE" rel="nofollow">OPENAI002: API Integrations</a>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67"><img width="20" src="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67" data-canonical-src="https://www.searchmarketingaustralia.com.au/wp-content/uploads/2017/10/original_images_YouTube.png" style="max-width: 100%;"></a> <a href="https://youtube.com/live/SZHBt0SW2EY?si=EnSIkaIECMiOmarE" rel="nofollow">OPENAI003: API Integrations</a>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67"><img width="20" src="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67" data-canonical-src="https://www.searchmarketingaustralia.com.au/wp-content/uploads/2017/10/original_images_YouTube.png" style="max-width: 100%;"></a> <a href="https://youtube.com/live/z0BlU3KVr7E?si=EnSIkaIECMiOmarE" rel="nofollow">OPENAI004: Completion Service</a>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67"><img width="20" src="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67" data-canonical-src="https://www.searchmarketingaustralia.com.au/wp-content/uploads/2017/10/original_images_YouTube.png" style="max-width: 100%;"></a> <a href="https://youtube.com/live/wMC1I85Zjmo?si=EnSIkaIECMiOmarE" rel="nofollow">OPENAI005: Completion Service</a>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67"><img width="20" src="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67" data-canonical-src="https://www.searchmarketingaustralia.com.au/wp-content/uploads/2017/10/original_images_YouTube.png" style="max-width: 100%;"></a> <a href="https://youtube.com/live/aENHthpFTvI?si=EnSIkaIECMiOmarE" rel="nofollow">OPENAI006: Developing Completion Clients </a>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67"><img width="20" src="https://camo.githubusercontent.com/3d319610708f36a324d601b85d0d29c4e90344a8768f45c05136b92a877fd755/68747470733a2f2f7777772e7365617263686d61726b6574696e676175737472616c69612e636f6d2e61752f77702d636f6e74656e742f75706c6f6164732f323031372f31302f6f726967696e616c5f696d616765735f596f75547562652e706e67" data-canonical-src="https://www.searchmarketingaustralia.com.au/wp-content/uploads/2017/10/original_images_YouTube.png" style="max-width: 100%;"></a> <a href="https://youtube.com/live/fzlF2k7SM?si=EnSIkaIECMiOmarE" rel="nofollow">OPENAI007: Acceptance & Integration Tests </a>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- Microsoft.Extensions.Hosting (>= 7.0.1)
- RESTFulSense (>= 2.11.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Standard.AI.OpenAI:
Package | Downloads |
---|---|
FenixAlliance.ABS.Integrations.OpenAI
Application Component for the Alliance Business Suite. |
GitHub repositories
This package is not used by any popular GitHub repositories.
This is a beta release for Completions capability.