-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
51 lines (38 loc) · 1.72 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# valentine <a href="https://valentine.tada.science"><img src="man/figures/logo.png" align="right" height="138" /></a>
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/valentine)](https://CRAN.R-project.org/package=valentine)
[![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)
<!-- badges: end -->
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:
``` 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}
valentine::roses("dplyr")
valentine::roses("lubridate", hint = "make it kinky")
```