BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News OpenAI Releases Stable Version of .NET Library with GPT-4o Support and API Enhancements

OpenAI Releases Stable Version of .NET Library with GPT-4o Support and API Enhancements

This item in japanese

OpenAI has released the stable version of its official .NET library, following June's beta launch. Available as a NuGet package, it supports the latest models like GPT-4o and GPT-4o mini, and the full OpenAI REST API. The release includes both sync and async APIs, streaming chat completions, and key-breaking changes for improved API consistency. Developers can extend the library and use it across all .NET platforms that support .NET Standard 2.0.

The stable release introduces key features to enhance developer productivity, including full support for OpenAI's latest models like GPT-4o and GPT-4o mini, as well as the complete OpenAI REST API. It includes both synchronous and asynchronous APIs, with support for streaming chat completions through IAsyncEnumerable<T> for more dynamic interactions.

Extensibility has also been prioritized, allowing the developer community to build additional functionalities on top of the existing library. Furthermore, it is compatible with all .NET platforms that implement .NET Standard 2.0, making it accessible across a broad range of .NET applications.

For developers upgrading from the 2.0.0-beta.* versions, several breaking changes have been introduced to improve the API’s consistency and usability:

  • ChatMessageContent now encapsulates the content parts in ChatMessage, ChatCompletion, and StreamingChatCompletionUpdate.
  • Function arguments are now represented as BinaryData in several areas, including ChatToolCall and StreamingChatToolCallUpdate.
  • Several renaming conventions have been applied: ApplicationId has been renamed to UserAgentApplicationId, FileClient to OpenAIFileClient, and ModelClient to OpenAIModelClient, among others.
  • Deprecated constructors and methods have been replaced with new options, such as replacing Auto and None in ChatFunctionChoice with CreateAutoChoice() and CreateNoneChoice().

These changes enhance clarity and maintain consistency across the API.

The OpenAI library for .NET is open-source and developed with ongoing community contributions on GitHub. It will continue to receive updates, staying aligned with OpenAI’s latest features and improvements. This library, alongside OpenAI’s existing libraries for Python and JavaScript/TypeScript, ensures a unified experience for developers working across different platforms.

The community is excited to explore the full potential of this stable release, which marks a significant step forward in bringing powerful AI capabilities to the .NET ecosystem, providing the tools needed to build advanced applications. Rakesh Mullassery, a principal consultant, described it as a game-changer for anyone developing AI-powered applications on the .NET platform.

More details and a full list of changes can be found in the official OpenAI library repository on GitHub.

About the Author

Rate this Article

Adoption
Style

BT