VeeFriends.Character.Quotes 4.1.27

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.27                
NuGet\Install-Package VeeFriends.Character.Quotes -Version 4.1.27                
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.27" />                
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.27                
#r "nuget: VeeFriends.Character.Quotes, 4.1.27"                
#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.27

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

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 4,475 10/7/2024
4.1.47 127 10/3/2024
4.1.46 189 10/2/2024
4.1.45 84 10/2/2024
4.1.44 457 9/26/2024
4.1.43 579 9/20/2024
4.1.42 85 9/20/2024
4.1.41 74 9/20/2024
4.1.40 88 9/20/2024
4.1.39 80 9/20/2024
4.1.38 89 9/19/2024
4.1.37 84 9/19/2024
4.1.36 86 9/19/2024
4.1.35 81 9/19/2024
4.1.34 76 9/19/2024
4.1.33 83 9/19/2024
4.1.32 82 9/19/2024
4.1.31 124 9/19/2024
4.1.30 140 9/16/2024
4.1.29 91 9/16/2024
4.1.28 874 9/5/2024
4.1.27 390 9/4/2024
4.1.26 91 9/4/2024
4.1.25 91 9/4/2024
4.1.24 86 9/3/2024
4.1.23 132 9/3/2024
4.1.22 86 9/3/2024
4.1.21 89 9/3/2024
4.1.20 74 9/3/2024
4.1.19 405 8/26/2024
4.1.17 99 8/26/2024
4.1.16 98 8/26/2024
4.1.15 105 8/26/2024
4.1.14 88 8/26/2024
4.1.13 99 8/26/2024
4.1.12 104 8/26/2024
4.1.7 312 5/2/2024
4.1.6 514 3/19/2024
4.1.5 250 2/29/2024
4.1.4 101 2/29/2024
4.1.1 116 2/9/2024
4.0.16 114 2/9/2024
4.0.15 103 2/9/2024
4.0.14 109 2/9/2024
4.0.13 338 1/30/2024
4.0.12 105 1/26/2024
4.0.11 100 1/26/2024
4.0.10 117 1/25/2024
1.0.2 114 1/23/2024
1.0.1 386 12/4/2023
1.0.0 138 11/29/2023