upd tester
diff --git a/R/test_request.R b/R/test_request.R
index 673f1c0..515abc2 100644
--- a/R/test_request.R
+++ b/R/test_request.R
@@ -2,23 +2,24 @@
#'
#' @description
#' `gpt3_test_request()` sends a basic [completion request](https://beta.openai.com/docs/api-reference/completions) to the Open AI GPT-3 API.
-#' @param verbose (boolean) if TRUE prints the actual prompt and GPT-3 completion of the test request (default: FALSE).
+#' @param verbose (boolean) if TRUE prints the actual prompt and GPT-3 completion of the test request (default: TRUE).
#' @return A message of success or failure of the connection.
#' @examples
#' gpt3_test_request()
#' @export
-gpt3_test_request = function(verbose=F){
+gpt3_test_request = function(verbose=T){
check_apikey_form()
test_prompt = 'Write a story about R Studio:'
- test_outout = gpt3_single_request(prompt_ = test_prompt
+ test_output = gpt3_single_request(prompt_ = test_prompt
, max_tokens = 100)
print(paste0('.. test successful ..'))
if(verbose==T){
- print(paste0('Requested completion for this prompt --> ', test_prompt))
- print(paste0('GPT-3 completed --> ', test_outout))
+ # print(paste0('Requested completion for this prompt --> ', test_prompt))
+ # print(paste0('GPT-3 completed --> ', test_output))
+ test_output
}
}
diff --git a/README.md b/README.md
index 62bb14e..4645c5b 100644
--- a/README.md
+++ b/README.md
@@ -40,6 +40,16 @@
Get the path to your access key file and run the authentication with: `gpt3_authenticate("PATHTO/access_key.txt")`
+**Make the test request:**
+
+You can run the test function below, which sends a simple request (here: the instruction to "Write a story about R Studio:") to the API and returns the output in the format used in this package (i.e., list[[1]] --> prompt and output, list[[2]] = meta information).
+
+```{r}
+gpt3_test_request()
+```
+
+
+
**Interact with GPT-3 via requests:**
diff --git a/man/gpt3_test_request.Rd b/man/gpt3_test_request.Rd
index 738e32f..d757118 100644
--- a/man/gpt3_test_request.Rd
+++ b/man/gpt3_test_request.Rd
@@ -4,10 +4,10 @@
\alias{gpt3_test_request}
\title{Make a test request to the GPT-3 API}
\usage{
-gpt3_test_request(verbose = F)
+gpt3_test_request(verbose = T)
}
\arguments{
-\item{verbose}{(boolean) if TRUE prints the actual prompt and GPT-3 completion of the test request (default: FALSE).}
+\item{verbose}{(boolean) if TRUE prints the actual prompt and GPT-3 completion of the test request (default: TRUE).}
}
\value{
A message of success or failure of the connection.