The goal of valentine is to spread the love 💛 about your favourite R package via ChatGPT generated “roses are red …” poems 🌹.
Setup
valentine::roses()
uses the openai::create_chat_completion() function to create the poem, this needs the OPENAI_API_KEY
environment variable set to your openai API key.
Once you have retrieved the api key from openai, the easiest is to store it in your .Renviron
file via usethis::edit_r_environ()
. See the openai 📦 for more details.
Example
valentine::roses("dplyr")
#> Roses are 🌹 red, violets are 💙 blue,
#> With dplyr 📦, data wrangling is a breeze too.
#> 🔍 Filter, ✂️ select, and mutate with ease,
#> Data manipulation made simple, no more unease!
valentine::roses("lubridate", hint = "make it kinky")
#> Roses are red, 🌹
#> Lubridate's sweet, 🕰️
#> It handles dates oh so fine, 😍
#> Making time play naughty in our code. 😈