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 for Converge360.

comments powered by Disqus

Featured

  • GitHub Expands Copilot Enterprise Search in Visual Studio and VS Code

    GitHub supercharged search for its Copilot Enterprise AI assistant in both Microsoft's Visual Studio IDE and Visual Studio Code so developers can now get results from well beyond local codebases, including the internet.

  • What's New in TypeScript 5.5, Now Generally Available

    Microsoft shipped the latest iteration of its type-infused superset of JavaScript, TypeScript 5.5, introducing inferred type predicates, control flow narrowing, JSDoc @import and other enhancements.

  • GitHub Copilot for Azure Gets Preview Glitches

    This reporter, recently accepted to preview GitHub Copilot for Azure, has thus far found the tool to be, well, glitchy.

  • New .NET 9 Templates for Blazor Hybrid, .NET MAUI

    Microsoft's fifth preview of .NET 9 nods at AI development while also introducing new templates for some of the more popular project types, including Blazor Hybrid and .NET MAUI.

  • What's Next for ASP.NET Core and Blazor

    Since its inception as an intriguing experiment in leveraging WebAssembly to enable dynamic web development with C#, Blazor has evolved into a mature, fully featured framework. Integral to the ASP.NET Core ecosystem, Blazor offers developers a unique combination of server-side rendering and rich client-side interactivity.

Subscribe on YouTube