News

First Official OpenAI Library for .NET Goes Beta

Although it seems Microsoft and OpenAI have been deeply intertwined partners for a long time, they are only now getting around to releasing an official OpenAI library for .NET developers, joining existing community libraries.

The first beta of the effort is an OpenAI NuGet package supporting .NET 6 and .NET Standard 2.0, now at version 2.0.0-beta.2 and listing some 868,000 downloads.

OpenAI .NET API Library
[Click on image for larger view.] OpenAI .NET API Library (source: OpenAI).

The new library was foreshadowed at Microsoft's recent Build 2024 developer conference, when the company announced:

One of our most exciting collaborations this year has been with OpenAI. We partnered with them to deliver an official .NET library, which is set to be released later this month. This collaboration and new SDK ensures that .NET developers have a delightful experience and will have parity with other programming language libraries that you may be familiar with. It also provides support for the latest OpenAI features and models, such as GPT4o and Assistants v2, and a unified experience across OpenAI and Azure OpenAI.

That's cutting-edge tech, as GPT-4o (with the "o" standing for omni) is the latest/greatest flagship large language model (LLM) from OpenAI, while the Assistants API lets developers create helper AI constructs that can respond to instructions and leverage models, tools and files to respond to user queries. Another supported feature, the Chat Completions API, can help developers build apps that generate natural language responses to user inputs. Independent, actionable helpers that communicate via natural language is a hot area of AI development right now.

In announcing OpenAI's library yesterday (June 6), Microsoft's .NET development team said it's based on the OpenAPI specification, providing features -- in addition to those listed above -- such as:

  • Extensibility to enable the community to build libraries on top
  • Sync and async APIs for ease of use and efficiency
  • Access to streaming completions via IAsyncEnumerable<T>

Joining other official OpenAI libraries for Python and TypeScript/JavaScript developers, Microsoft said the .NET library will ensure smooth and supported integration with OpenAI and Azure OpenAI for developers in its camp.

As far as unsupported integration, the .NET team recognized pioneering work by Roger Pincombe and the existing community options Betalgo.OpenAI by Betalgo and OpenAI-DotNet by RageAgainstThePixel.

"The .NET library is developed and supported on GitHub and will be kept up to date with the latest features from OpenAI," the team said yesterday. "Work will continue over the next few months to gather feedback to improve the library and release a stable NuGet package."

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube