Official OpeniAI .NET library now in beta, will replace Azure OpenAI library and transition may be painful

Official OpeniAI .NET library now in beta, will replace Azure OpenAI library and transition may be painful
digital library

OpenAI, in collaboration with Microsoft, has released the first betas of an official library for .NET.

The new library is said to support the “entire OpenAI API,” including version 2 of the Assistants API, for answering user queries within an application, the chat completion API which responds to natural language questions, and support for GPT-4o, the latest OpenAI model (the o stands for “omni”.

The .NET library joins existing official libraries for Python and for TypeScript/JavaScript. In addition there are community libraries for a host of languages including C++, Dart/Flutter, Delphi, Go, Java, Kotlin, Ruby, Rust, Swift and more.

There is some confusion though since there are pre-existing .NET client libraries for Azure OpenAI, which work both with OpenAI and the Azure OpenAI service. Azure OpenAI service uses the same models, but with additional features including private networking and responsible AI content filtering.

According to Microsoft engineering manager Travis Wilson “the .NET Azure.AI.OpenAI package is being converted into the Azure OpenAI Service companion library,” which will provide an Azure-specific client and extensions for features such as the content filter, while common capabilities between the two libraries will share the same “clients, methods, and request/response types.”

That said, this convergence is set to bring what Wilson called “very significant changes to the details of the usage patterns,” which sounds to us like a lot of breaking changes. Wilson appealed for community feedback on the GitHub repository for the new library, though at the time of writing this says only that “details for using the OpenAI .NET library with Azure OpenAI are coming soon.”

Regarding the existing OpenAI library, a developer recently asked about the absence of support for new features of the Assistants API and for GPT-4o, prompting the remark that “It’s really hard to understand why anyone should use the MS bits if they can’t keep them up to date with the published Open API specs.”

While Microsoft has yet to confirm, Dev Class imagines that the focus will now be on the new companion library, rather than updating the old Azure OpenAI library, which likely means both delay and reworked code for those who want the latest features.

Separately, Microsoft has also released an AI Toolkit for VS Code, an extension which enables running AI models locally on NVIDIA GPUs or remotely, testing and experimenting with models, and deploying fine-tuned models to the cloud. The new extension is on GitHub – but without the source code. “The toolkit is not as of yet open source. The GH repo is being used for public issue tracking for now,” said Microsoft Principal Architect John Lam.