Skip to content

Commit

Permalink
Merge pull request #6 from jcrodriguez1989/develop
Browse files Browse the repository at this point in the history
Release v0.1.5
  • Loading branch information
jcrodriguez1989 authored Feb 2, 2023
2 parents c144e22 + 7e50887 commit 7dda9c5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by roxygen2: do not edit by hand

export(ask_chatgpt)
export(comment_code)
export(create_unit_tests)
export(create_variable_name)
Expand Down
16 changes: 16 additions & 0 deletions R/ask_chatgpt.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#' Ask ChatGPT
#'
#' @param question The question to ask ChatGPT.
#'
#' @examples
#' \dontrun{
#' cat(ask_chatgpt("What do you think about R language?"))
#' }
#'
#' @return A character value with the response generated by ChatGPT.
#'
#' @export
#'
ask_chatgpt <- function(question) {
trimws(sapply(gpt_get_completions(question)$choices, function(x) x$text))
}
23 changes: 23 additions & 0 deletions man/ask_chatgpt.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7dda9c5

Please sign in to comment.