VeeFriends.Character.Quotes 4.1.33

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

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

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.43 28 9/20/2024
4.1.42 23 9/20/2024
4.1.41 20 9/20/2024
4.1.40 36 9/20/2024
4.1.39 28 9/20/2024
4.1.38 37 9/19/2024
4.1.37 31 9/19/2024
4.1.36 32 9/19/2024
4.1.35 31 9/19/2024
4.1.34 29 9/19/2024
4.1.33 36 9/19/2024
4.1.32 30 9/19/2024
4.1.31 77 9/19/2024
4.1.30 110 9/16/2024
4.1.29 62 9/16/2024
4.1.28 828 9/5/2024
4.1.27 222 9/4/2024
4.1.26 66 9/4/2024
4.1.25 62 9/4/2024
4.1.24 63 9/3/2024
4.1.23 107 9/3/2024
4.1.22 59 9/3/2024
4.1.21 61 9/3/2024
4.1.20 63 9/3/2024
4.1.19 386 8/26/2024
4.1.17 78 8/26/2024
4.1.16 73 8/26/2024
4.1.15 86 8/26/2024
4.1.14 69 8/26/2024
4.1.13 81 8/26/2024
4.1.12 81 8/26/2024
4.1.7 296 5/2/2024
4.1.6 496 3/19/2024
4.1.5 235 2/29/2024
4.1.4 85 2/29/2024
4.1.1 100 2/9/2024
4.0.16 101 2/9/2024
4.0.15 89 2/9/2024
4.0.14 92 2/9/2024
4.0.13 319 1/30/2024
4.0.12 92 1/26/2024
4.0.11 85 1/26/2024
4.0.10 106 1/25/2024
1.0.2 101 1/23/2024
1.0.1 370 12/4/2023
1.0.0 120 11/29/2023