% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/refactor_code.R
\name{refactor_code}
\alias{refactor_code}
\title{ChatGPT: Refactor Code}
\usage{
refactor_code(code = clipr::read_clip(allow_non_interactive = TRUE))
}
\arguments{
\item{code}{The code to be refactored by ChatGPT. If not provided, it will use what's copied on
the clipboard.}
}
\value{
A character value with the response generated by ChatGPT.
}
\description{
ChatGPT: Refactor Code
}
\examples{
\dontrun{
cat(refactor_code("i <- 10\nwhile (i > 0) {\n  i <- i - 1\n  print(i)\n}"))
}

}
