R/addin_spelling-and-grammar.R

Defines functions gptstudio_spelling_grammar

Documented in gptstudio_spelling_grammar

#' Spelling and Grammar Addin
#'
#' Call this function as a Rstudio addin to ask GPT to improve spelling and
#' grammar of selected text.
#'
#' @return This function has no return value.
#'
#' @export
#'
#' @examples
#' # Select some text in Rstudio
#' # Then call the function as an RStudio addin
#' \dontrun{
#' gptstudio_spelling_grammar()
#' }
gptstudio_spelling_grammar <- function() {
  cli_process_start("Sending query to ChatGPT")
  gptstudio_chat_in_source(
    task = "Improve spelling and grammar of the text"
  )
  cli_process_done()
}

Try the gptstudio package in your browser

Any scripts or data that you put into this service are public.

gptstudio documentation built on May 29, 2024, 12:30 p.m.