diff --git a/README.Rmd b/README.Rmd index fc95e24..16b9a42 100644 --- a/README.Rmd +++ b/README.Rmd @@ -21,17 +21,28 @@ knitr::opts_chunk$set( [![R-CMD-check](https://github.com/tadascience/valentine/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tadascience/valentine/actions/workflows/R-CMD-check.yaml) -The goal of valentine is to spread the love about your -favourite R package. +The goal of valentine is to spread the love πŸ’› about your +favourite R package via [ChatGPT](https://openai.com/) generated +"roses are red ... " poems 🌹. ## Installation -You can install the development version of valentine like so: +You can install the development version: ``` r pak::pak("tadascience/valentine") ``` +## Setup + +`valentine::roses()` uses the [openai::create_chat_completion()](https://irudnyts.github.io/openai/reference/create_chat_completion.html) +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](https://platform.openai.com/), +the easiest is to store it in your `.Renviron` file via `usethis::edit_r_environ()`. +See the [openai](https://irudnyts.github.io/openai/index.html) πŸ“¦ for more details. + ## Example ```{r example} diff --git a/README.md b/README.md index 7de2a12..f5af58c 100644 --- a/README.md +++ b/README.md @@ -12,28 +12,42 @@ status](https://www.r-pkg.org/badges/version/valentine)](https://CRAN.R-project. [![R-CMD-check](https://github.com/tadascience/valentine/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tadascience/valentine/actions/workflows/R-CMD-check.yaml) -The goal of valentine is to spread the love about your favourite R -package. +The goal of valentine is to spread the love πŸ’› about your favourite R +package via [ChatGPT](https://openai.com/) generated β€œroses are red …” +poems 🌹. ## Installation -You can install the development version of valentine like so: +You can install the development version: ``` r pak::pak("tadascience/valentine") ``` +## Setup + +`valentine::roses()` uses the +[openai::create_chat_completion()](https://irudnyts.github.io/openai/reference/create_chat_completion.html) +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](https://platform.openai.com/), the easiest is to store it in +your `.Renviron` file via `usethis::edit_r_environ()`. See the +[openai](https://irudnyts.github.io/openai/index.html) πŸ“¦ for more +details. + ## Example ``` r valentine::roses("dplyr") -#> 🌹 Roses are red, πŸ“¦ -#> πŸ’‘ dplyr's the R package that'll make your πŸ’» shine 🌟, -#> πŸ”₯ With its powerful data manipulation capabilities, πŸ“Š -#> 😍 You'll love using it all the time! ❀️ +#> 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 API, so sexy, πŸ“ -#> Dates it manipulates, so flexible, πŸ“… -#> It's time to get kinky, ooh-la-la! 😏 +#> Lubridate's sweet, πŸ•°οΈ +#> It handles dates oh so fine, 😍 +#> Making time play naughty in our code. 😈 ```