Programming Tips 💡
54.5K subscribers
65 photos
8 videos
30 files
338 links
Programming:
Tips 💡
Articles 📕
Resources 👾
Design Patterns 💎
Software Principles

🇳🇱 Contact & Ads: @MoienTajik
Download Telegram
OpenAI .NET 👾

The OpenAI .NET library provides convenient access to the OpenAI REST API from .NET applications. ✔️

The full API of this library can be found in the api.md file, and there are many code examples to help. For instance, the following snippet illustrates the basic use of the chat completions API:

ChatClient client = new(model: "gpt-4o", "OPENAI_API_KEY");

ChatCompletion completion = client.CompleteChat("Say 'this is a test.'");

Console.WriteLine($"[ASSISTANT]: {completion}");


The library is organized into several namespaces corresponding to OpenAI feature areas. Each namespace contains a corresponding client class:

AssistantClient
AudioClient
BatchClient
ChatClient
EmbeddingClient
FineTuningClient
FileClient
ImageClient
ModelClient
ModerationClient
VectorStoreClient


[ GitHub ] : https://github.com/openai/openai-dotnet

〰️〰️〰️〰️〰️〰️
#AI #OpenAI #DotNet #CSharp
@ProgrammingTip
Please open Telegram to view this post
VIEW IN TELEGRAM