openai/openai-dotnet
The official .NET library for the OpenAI API
What it solves
This library provides a streamlined way for .NET developers to interact with the OpenAI REST API, eliminating the need to manually construct HTTP requests and handle raw JSON responses.
How it works
It is a client library generated from the OpenAI OpenAPI specification in collaboration with Microsoft. It organizes API functionality into feature-specific namespaces and client classes (e.g., ChatClient for chat, ImageClient for images, AudioClient for audio). It supports both synchronous and asynchronous API calls and can be integrated into ASP.NET Core applications via dependency injection as thread-safe singletons.
Who it’s for
.NET developers building applications that require integration with OpenAI models, including those using .NET Standard 2.0 or newer versions like .NET 10.
Highlights
- Comprehensive API Coverage: Supports chat completions, image generation, audio transcription, embeddings, and assistants.
- Advanced Chat Features: Built-in support for streaming responses, tool/function calling, and structured outputs.
- Flexible Integration: Compatible with Azure OpenAI and custom base URLs for OpenAI-compatible LLMs.
- Developer-Friendly: Includes support for dependency injection in ASP.NET Core and provides mechanisms for mocking clients for testing.
関連
- プロジェクト
- プロジェクト
- プロジェクト
- プロジェクト
- プロジェクト