fixes in test_request doc
diff --git a/NAMESPACE b/NAMESPACE
index 36c8809..81ac3c8 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -1,7 +1,7 @@
# Generated by roxygen2: do not edit by hand
-export(gpt3.test_request)
export(gpt3_authenticate)
export(gpt3_bunch_request)
export(gpt3_simple_request)
+export(gpt3_test_request)
export(url.completions)
diff --git a/R/make_request.R b/R/make_request.R
index adbe24c..3fb02e0 100644
--- a/R/make_request.R
+++ b/R/make_request.R
@@ -39,13 +39,21 @@
#' gpt3_simple_request(prompt_input = 'How old are you?')
#'
#' ## Instruct GPT-3 to write ten research ideas of max. 150 tokens with some controls:
-#'gpt3_simple_request(prompt_input = 'Write a research idea about using text data to understand human behaviour:', temperature = 0.8, n = 10, max_tokens = 150)
+#'gpt3_simple_request(prompt_input = 'Write a research idea about using text data to understand human behaviour:'
+#' , temperature = 0.8
+#' , n = 10
+#' , max_tokens = 150)
#'
#' ## For fully reproducible results, we need `temperature = 0`, e.g.:
-#' gpt3_simple_request(prompt_input = 'Finish this sentence:/n There is no easier way to learn R than', temperature = 0.0, max_tokens = 50)
+#' gpt3_simple_request(prompt_input = 'Finish this sentence:/n There is no easier way to learn R than'
+#' , temperature = 0.0
+#' , max_tokens = 50)
#'
#' ## The same example with a different GPT-3 model:
-#' gpt3_simple_request(prompt_input = 'Finish this sentence:/n There is no easier way to learn R than', model = 'text-babbage-001', temperature = 0.0, max_tokens = 50)
+#' gpt3_simple_request(prompt_input = 'Finish this sentence:/n There is no easier way to learn R than'
+#' , model = 'text-babbage-001'
+#' , temperature = 0.0
+#' , max_tokens = 50)
#' @export
gpt3_simple_request = function(prompt_input
, model = 'text-davinci-002'
diff --git a/R/test_request.R b/R/test_request.R
index 15269a7..dbc3160 100644
--- a/R/test_request.R
+++ b/R/test_request.R
@@ -1,18 +1,18 @@
#' Make a test request to the GPT-3 API
#'
#' @description
-#' `gpt3.test_request()` sends a basic [completion request](https://beta.openai.com/docs/api-reference/completions) to the Open AI GPT-3 API.
+#' `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).
#' @return A message of success or failure of the connection.
#' @examples
-#' gpt3.test_request()
+#' gpt3_test_request()
#' @export
-gpt3.test_request = function(verbose=F){
+gpt3_test_request = function(verbose=F){
check_apikey_form()
test_prompt = 'Write a story about R Studio:'
- test_outout = gpt3.make_request(prompt_ = test_prompt
+ test_outout = gpt3_simple_request(prompt_ = test_prompt
, max_tokens = 100)
print(paste0('.. test successful ..'))
diff --git a/man/gpt3_simple_request.Rd b/man/gpt3_simple_request.Rd
index f302021..8570a76 100644
--- a/man/gpt3_simple_request.Rd
+++ b/man/gpt3_simple_request.Rd
@@ -78,11 +78,19 @@
gpt3_simple_request(prompt_input = 'How old are you?')
## Instruct GPT-3 to write ten research ideas of max. 150 tokens with some controls:
-gpt3_simple_request(prompt_input = 'Write a research idea about using text data to understand human behaviour:', temperature = 0.8, n = 10, max_tokens = 150)
+gpt3_simple_request(prompt_input = 'Write a research idea about using text data to understand human behaviour:'
+ , temperature = 0.8
+ , n = 10
+ , max_tokens = 150)
## For fully reproducible results, we need `temperature = 0`, e.g.:
-gpt3_simple_request(prompt_input = 'Finish this sentence:/n There is no easier way to learn R than', temperature = 0.0, max_tokens = 50)
+gpt3_simple_request(prompt_input = 'Finish this sentence:/n There is no easier way to learn R than'
+ , temperature = 0.0
+ , max_tokens = 50)
## The same example with a different GPT-3 model:
-gpt3_simple_request(prompt_input = 'Finish this sentence:/n There is no easier way to learn R than', model = 'text-babbage-001', temperature = 0.0, max_tokens = 50)
+gpt3_simple_request(prompt_input = 'Finish this sentence:/n There is no easier way to learn R than'
+ , model = 'text-babbage-001'
+ , temperature = 0.0
+ , max_tokens = 50)
}
diff --git a/man/gpt3.test_request.Rd b/man/gpt3_test_request.Rd
similarity index 73%
rename from man/gpt3.test_request.Rd
rename to man/gpt3_test_request.Rd
index e4786d4..738e32f 100644
--- a/man/gpt3.test_request.Rd
+++ b/man/gpt3_test_request.Rd
@@ -1,10 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/test_request.R
-\name{gpt3.test_request}
-\alias{gpt3.test_request}
+\name{gpt3_test_request}
+\alias{gpt3_test_request}
\title{Make a test request to the GPT-3 API}
\usage{
-gpt3.test_request(verbose = F)
+gpt3_test_request(verbose = F)
}
\arguments{
\item{verbose}{(boolean) if TRUE prints the actual prompt and GPT-3 completion of the test request (default: FALSE).}
@@ -13,8 +13,8 @@
A message of success or failure of the connection.
}
\description{
-\code{gpt3.test_request()} sends a basic \href{https://beta.openai.com/docs/api-reference/completions}{completion request} to the Open AI GPT-3 API.
+\code{gpt3_test_request()} sends a basic \href{https://beta.openai.com/docs/api-reference/completions}{completion request} to the Open AI GPT-3 API.
}
\examples{
-gpt3.test_request()
+gpt3_test_request()
}