R/responseReturn.R

Defines functions responseReturn

Documented in responseReturn

#' responseReturn
#'
#' @param raw the chatresponse to return
#'
#' @importFrom clipr read_clip
#'
#' @return A character value with the response generated by the LLM.
#'
#'
responseReturn <- function(raw) {

  # 'raw' data is written to the clipboard
  clipr::write_clip(paste(raw, sep = "\n"), allow_non_interactive = TRUE)
  # 'raw' is returned without any modification
  return(raw)
}

Try the groqR package in your browser

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

groqR documentation built on April 12, 2025, 1:36 a.m.