Skip to contents

Make a "roses are red ..." poem about an R package.

Usage

roses(pkg, hint = "", emoji = TRUE, ...)

prompt(pkg, hint = "", emoji = TRUE)

Arguments

pkg

A package

hint

extra information to add to the prompt

emoji

Should the poem include emojis ?

...

Passed to openai::create_chat_completion()

Value

A poem generated by ChatGPT via openai::create_chat_completion()

Examples

prompt("dplyr")
#> Make a 4 lines "roses are red ..." poem about the R package "dplyr". Include a bunch of emojis. 

if (FALSE) {
  # this needs the OPENAI_API_KEY environment variable
  # to be set. See https://irudnyts.github.io/openai/
  roses("dplyr")
}