Learn R Programming

chatAI4R (version 0.3.6)

enrichTextContent: Enrich Text Content v2

Description

This function doubles the amount of text without changing its meaning. The GPT-4 model is currently recommended for text generation. It can either read from the RStudio selection or the clipboard.

Usage

enrichTextContent(Model = "gpt-4o-mini", SelectedCode = TRUE, verbose = TRUE)

Value

If SelectedCode is TRUE, the enriched text is inserted into the RStudio editor and a message "Finished!!" is returned. Otherwise, the enriched text is placed into the clipboard.

Arguments

Model

A character string specifying the AI model to be used for text enrichment. Default is "gpt-4o-mini".

SelectedCode

A logical flag to indicate whether to read from RStudio's selected text. Default is TRUE.

verbose

Logical flag to indicate whether to display the generated text. Default is TRUE.

Author

Satoshi Kume

Details

Enrich Text Content

Examples

Run this code
if (FALSE) {
# Option 1
# Select some text in RStudio and then run the rstudio addins
# Option 2
# Copy the text into your clipboard then execute
enrichTextContent(Model = "gpt-4o-mini", SelectedCode = TRUE)
}

Run the code above in your browser using DataLab