VeeFriends.Character.Quotes 4.1.45

There is a newer version of this package available.
See the version list below for details.
dotnet add package VeeFriends.Character.Quotes --version 4.1.45                
NuGet\Install-Package VeeFriends.Character.Quotes -Version 4.1.45                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VeeFriends.Character.Quotes" Version="4.1.45" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VeeFriends.Character.Quotes --version 4.1.45                
#r "nuget: VeeFriends.Character.Quotes, 4.1.45"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install VeeFriends.Character.Quotes as a Cake Addin
#addin nuget:?package=VeeFriends.Character.Quotes&version=4.1.45

// Install VeeFriends.Character.Quotes as a Cake Tool
#tool nuget:?package=VeeFriends.Character.Quotes&version=4.1.45                

VeeFriends.Character.Quotes

Generate quotes and quizzes for VeeFriends characters using AI.

Nuget

Installation

$ dotnet add package VeeFriends.Character.Quotes

Usage

This package provides services for generating character-specific quotes and quizzes for VeeFriends characters using AI. It's designed to be used with your own OpenAI API key.

  1. Add the necessary services to your dependency injection container
  2. Configure the OpenAI API key
  3. Inject and use the CharacterQuoteService and CharacterQuizService

Setting up services

In your Startup.cs or Program.cs, add the following:

services.AddVeeFriendsCharacters();
services.AddCharacterQuoteService(options => options.ApiKey = "your-openai-api-key");
services.AddCharacterQuizService(options => options.ApiKey = "your-openai-api-key");

Generating a Quote

public class QuoteGenerator
{
    private readonly CharacterQuoteService _quoteService;

    public QuoteGenerator(CharacterQuoteService quoteService)
    {
        _quoteService = quoteService;
    }

    public async Task<string> GetQuoteOfTheDay(string characterName)
    {
        var quote = await _quoteService.GenerateMessageOfTheDay(characterName, CancellationToken.None);
        return quote;
    }
}

Generating a Quiz

public class QuizGenerator
{
    private readonly CharacterQuizService _quizService;

    public QuizGenerator(CharacterQuizService quizService)
    {
        _quizService = quizService;
    }

    public async Task<QuizAiResult> GenerateQuiz()
    {
        var quiz = await _quizService.GenerateQuestions(CancellationToken.None);
        return quiz;
    }
}

Models

The package uses the following main models:

public class QuizAiResult
{
    public List<QuizQuestion> Quiz { get; set; }
}

public class QuizQuestion
{
    public string Question { get; set; }
    public List<QuizAnswer> Answers { get; set; }
}

public class QuizAnswer
{
    public string Answer { get; set; }
    public string Trait { get; set; }
}

Notes

  • Ensure you have a valid OpenAI API key to use this package.
  • The generated quotes and quizzes are based on AI and may require review for appropriateness and accuracy.
  • This package depends on VeeFriends.Characters for character information.

Feel free to explore the other methods available in CharacterQuoteService and CharacterQuizService.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.1.48 7,332 10/7/2024
4.1.47 133 10/3/2024
4.1.46 196 10/2/2024
4.1.45 92 10/2/2024
4.1.44 463 9/26/2024
4.1.43 585 9/20/2024
4.1.42 89 9/20/2024
4.1.41 78 9/20/2024
4.1.40 92 9/20/2024
4.1.39 84 9/20/2024
4.1.38 93 9/19/2024
4.1.37 88 9/19/2024
4.1.36 90 9/19/2024
4.1.35 85 9/19/2024
4.1.34 80 9/19/2024
4.1.33 86 9/19/2024
4.1.32 85 9/19/2024
4.1.31 127 9/19/2024
4.1.30 145 9/16/2024
4.1.29 94 9/16/2024
4.1.28 877 9/5/2024
4.1.27 447 9/4/2024
4.1.26 94 9/4/2024
4.1.25 94 9/4/2024
4.1.24 89 9/3/2024
4.1.23 137 9/3/2024
4.1.22 89 9/3/2024
4.1.21 94 9/3/2024
4.1.20 79 9/3/2024
4.1.19 408 8/26/2024
4.1.17 102 8/26/2024
4.1.16 101 8/26/2024
4.1.15 108 8/26/2024
4.1.14 91 8/26/2024
4.1.13 102 8/26/2024
4.1.12 107 8/26/2024
4.1.7 315 5/2/2024
4.1.6 517 3/19/2024
4.1.5 253 2/29/2024
4.1.4 104 2/29/2024
4.1.1 119 2/9/2024
4.0.16 117 2/9/2024
4.0.15 106 2/9/2024
4.0.14 112 2/9/2024
4.0.13 341 1/30/2024
4.0.12 108 1/26/2024
4.0.11 103 1/26/2024
4.0.10 120 1/25/2024
1.0.2 117 1/23/2024
1.0.1 391 12/4/2023
1.0.0 141 11/29/2023