using var client = new HuggingFaceClient(apiKey);
var response = await client.GenerateTextAsync(
"microsoft/Phi-3-mini-4k-instruct",
new GenerateTextRequest
{
Inputs = "Give random 5 words in response",
Parameters = new GenerateTextRequestParameters
{
MaxNewTokens = 250,
},
});
foreach (var value in response)
{
Console.WriteLine(value.GeneratedText);
}