Spread the Love for R Packages with Poetry

Uses large language models to create poems about R packages. Currently contains the roses() function to make "roses are red, ..." style poems and the prompt() function to only assemble the prompt without submitting it to the model.


valentine

CRANstatus R-CMD-check

The goal of valentine is to spread the love 💛 about your favourite R package via “roses are red …” poems 🌹 generated by AI via the ellmer 📦.

Installation

You can install the development version:

pak::pak("tadascience/valentine")

Setup

valentine::roses() uses a Chat object to communicate with the LLM of your choice. The default value for the chat argument uses the “gpt-3.5-turbo” model from OpenAI via the ellmer::chat_openai() which is usually good enough for such a simple task.

Please refer to ellmer documentation for information on setting up api keys, etc …

Example

valentine::roses("dplyr")
#> Roses are red,  
#> dplyr is my bae 🌹  
#> With pipes and verbs,  
#> My data never goes astray 💖
valentine::roses("lubridate", hint = "make it kinky")
#> Roses are red, violets are blue, 
#> But lubridate, oh how I adore you 💕
#> You make my dates smooth and my times hot 🔥
#> In R programming, you're all I've got 😈🌹
valentine::roses("valentine")
#> Roses are red, 
#> Valentine is too 🌹
#> With its data magic, 
#> My love for it grew 💖

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("valentine")

2025.2.14 by Romain François, 2 years ago


https://github.com/tadascience/valentine, https://valentine.tada.science/


Report a bug at https://github.com/tadascience/valentine/issues


Browse source code at https://github.com/cran/valentine


Authors: Romain François [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports cli, ellmer, glue, rlang


See at CRAN