C#/.NET SDK for accessing the OpenAI APIs
Top 23.5% on sourcepulse
This C#/.NET SDK provides a wrapper for interacting with OpenAI's APIs, including GPT-3.5/4, DALL-E 2/3, and audio processing. It's designed for .NET developers seeking a straightforward way to integrate OpenAI's capabilities into their applications.
How It Works
The library offers a fluent API for common tasks like chat completions, image generation, and audio transcription. It supports various authentication methods (API keys, environment variables, config files) and handles API request/response serialization. Key features include conversation management with automatic context truncation, streaming responses, and direct support for GPT Vision and JSON mode outputs.
Quick Start & Requirements
Install-Package OpenAI -Version 1.11.0
OPENAI_API_KEY
environment variable, or .openai
config file.Highlighted Details
Maintenance & Community
This project was officially adopted by Microsoft and is now maintained as the official C# OpenAI library (v2.0.0-beta and later). The original repository (up to v1.11) remains for historical documentation.
Licensing & Compatibility
Licensed under CC-0 Public Domain. This allows for unrestricted use in public or private projects, including commercial applications.
Limitations & Caveats
The repository documents the original unofficial version up to v1.11. For the latest features and official support, users should refer to the new Microsoft-maintained library. Azure OpenAI integration requires manual configuration and currently only supports API key authentication, not AD-Flow.
1 year ago
Inactive