Title: Spread the Love for R Packages with Poetry
Version: 2025.2.14
Description: 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.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.2
URL: https://github.com/tadascience/valentine, https://valentine.tada.science/
BugReports: https://github.com/tadascience/valentine/issues
Imports: cli, ellmer, glue, rlang
NeedsCompilation: no
Packaged: 2025-02-09 10:37:44 UTC; romainfrancois
Author: Romain François [aut, cre]
Maintainer: Romain François <romain@tada.science>
Repository: CRAN
Date/Publication: 2025-02-09 10:50:02 UTC

Make a roses are red poem

Description

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

Usage

roses(
  pkg,
  hint = "",
  emoji = TRUE,
  chat = chat_openai(model = "gpt-3.5-turbo"),
  error_call = current_env()
)

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

Arguments

pkg

A package

hint

extra information to add to the prompt

emoji

Should the poem include emojis ?

chat

A ellmer::Chat object, e.g. ellmer::chat_openai(). The default uses the 'gpt-3.5-turbo' model from OpenAI.

error_call

The execution environment of a currently running function, e.g. caller_env(). The function will be mentioned in error messages as the source of the error. See the call argument of abort() for more information.

Value

A lovely poem for your package crush

Examples

prompt("dplyr")

## Not run: 
  # this needs the OPENAI_API_KEY environment variable
  # to be set. Visit https://openai.com/api/
  roses("dplyr")

## End(Not run)