A simple C# .NET library to call Deepinfra's web API. It provides prompt managment and support for different models (currently only text-generation). This is an unofficial library and not endorsed by Deepinfra.
using DeepinfraCSharp;
var api = new DeepinfraTextAPI(apiKey, Model.Airoboros_70b);
api.Prompt.SystemPrompt = "Be a helpful assistant.";
var wordsStream = api.RequsetStreamResponseAsync("What's the color of an Orange?");
await foreach(var word in wordsStream)
{
Console.Write(word);
}
//Output: The color of an Orange is Orange.
Framework .NET 6.0 or higher.
RestSharp 110.2.0