/HuggingFace

Generated C# SDK based on official HuggingFace OpenAPI specification

Primary LanguageC#MIT LicenseMIT

HuggingFace

Nuget package dotnet License: MIT Discord

Generated C# SDK based on HuggingFace OpenAPI specification using NSwag.
Includes tokenizer and some helper methods.

Usage

using HuggingFace;

using var client = new HttpClient();
var api = new HuggingFaceApi(apiKey, client);
var response = await api.GenerateTextAsync(
    RecommendedModelIds.Gpt2,
    new GenerateTextRequest
    {
        Inputs = "Hello",
        Parameters = new GenerateTextRequestParameters
        {
            Max_new_tokens = 250,
            Return_full_text = false,
        },
        Options = new GenerateTextRequestOptions
        {
            Use_cache = true,
            Wait_for_model = false,
        },
    });

Support

Priority place for bugs: https://github.com/tryAGI/HuggingFace/issues
Priority place for ideas and general questions: https://github.com/tryAGI/HuggingFace/discussions
Discord: https://discord.gg/Ca2xhfBf3v