From 3eb3aaa5390da2eae96b4e3bb37eb8b51054153d Mon Sep 17 00:00:00 2001 From: kumeS Date: Sun, 18 Feb 2024 16:53:03 +0900 Subject: [PATCH] Version 0.3 --- DESCRIPTION | 2 +- man/TextSummaryAsBullet.Rd | 6 +++++- man/addCommentCode.Rd | 4 ++++ man/addRoxygenDescription.Rd | 6 +++++- man/chat4R.Rd | 2 +- man/completions4R.Rd | 5 +++-- man/convertBullet2Sentence.Rd | 4 ++++ man/convertRscript2Function.Rd | 4 ++++ man/convertScientificLiterature.Rd | 4 ++++ man/createEBAYdes.Rd | 4 ++++ man/createSpecifications4R.Rd | 4 ++++ man/designPackage.Rd | 1 + man/enrichTextContent.Rd | 6 +++++- man/extractKeywords.Rd | 4 ++++ man/proofreadEnglishText.Rd | 2 +- man/supportIdeaGeneration.Rd | 4 ++++ 16 files changed, 54 insertions(+), 8 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 27bf443..79c63bf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,5 +34,5 @@ Suggests: testthat, knitr License: Artistic-2.0 URL: https://kumes.github.io/chatAI4R/, https://github.com/kumeS/chatAI4R BugReports: https://github.com/kumeS/chatAI4R/issues -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Encoding: UTF-8 diff --git a/man/TextSummaryAsBullet.Rd b/man/TextSummaryAsBullet.Rd index 42fc95d..36dc9ce 100644 --- a/man/TextSummaryAsBullet.Rd +++ b/man/TextSummaryAsBullet.Rd @@ -33,7 +33,11 @@ Summarize Selected Text into Bullet Points } \examples{ \dontrun{ -TextSummaryAsBullet(text = "This is a sample text.") +# Option 1 +# Select some text in RStudio and then run the rstudio addins +# Option 2 +# Copy the text into your clipboard then execute +TextSummaryAsBullet() } } \author{ diff --git a/man/addCommentCode.Rd b/man/addCommentCode.Rd index 2068387..60232ce 100644 --- a/man/addCommentCode.Rd +++ b/man/addCommentCode.Rd @@ -25,6 +25,10 @@ Add Comments to R Code } \examples{ \dontrun{ +# Option 1 +# Select some text in RStudio and then run the rstudio addins +# Option 2 +# Copy the text into your clipboard then execute addCommentCode(Model = "gpt-4-0613", language = "English", SelectedCode = TRUE) } } diff --git a/man/addRoxygenDescription.Rd b/man/addRoxygenDescription.Rd index d0b513a..317ef7f 100644 --- a/man/addRoxygenDescription.Rd +++ b/man/addRoxygenDescription.Rd @@ -29,7 +29,11 @@ Add Roxygen Description to R Function } \examples{ \dontrun{ -addRoxygenDescription(Model = "gpt-4-0613", SelectedCode = TRUE) +# Option 1 +# Select some text in RStudio and then run the rstudio addins +# Option 2 +# Copy the text into your clipboard then execute +addRoxygenDescription(Model = "gpt-4-0613", SelectedCode = FALSE) } } \author{ diff --git a/man/chat4R.Rd b/man/chat4R.Rd index 1077244..ab985aa 100644 --- a/man/chat4R.Rd +++ b/man/chat4R.Rd @@ -39,7 +39,7 @@ Chat4R Function \examples{ \dontrun{ Sys.setenv(OPENAI_API_KEY = "Your API key") -response <- chat4R("What is the capital of France?") +response <- chat4R(content = "What is the capital of France?") response } } diff --git a/man/completions4R.Rd b/man/completions4R.Rd index b104e73..7d75854 100644 --- a/man/completions4R.Rd +++ b/man/completions4R.Rd @@ -7,7 +7,7 @@ completions4R( prompt, api_key = Sys.getenv("OPENAI_API_KEY"), - Model = "text-davinci-003", + Model = "davinci-002", max_tokens = 50, temperature = 1, simple = TRUE @@ -18,7 +18,7 @@ completions4R( \item{api_key}{A string. The API key for OpenAI. Defaults to the value of the environment variable "OPENAI_API_KEY".} -\item{Model}{A string. The model ID to use, such as "text-davinci-003".} +\item{Model}{A string. The model ID to use, such as "davinci-002".} \item{max_tokens}{Integer. The maximum number of tokens to generate.} @@ -36,6 +36,7 @@ This function sends a request to the OpenAI completions API (Legacy) } \examples{ \dontrun{ +#This is a legacy function Sys.setenv(OPENAI_API_KEY = "Your API key") prompt <- "Translate the following English text to French: 'Hello, world!'" diff --git a/man/convertBullet2Sentence.Rd b/man/convertBullet2Sentence.Rd index 61e7724..c2fabb1 100644 --- a/man/convertBullet2Sentence.Rd +++ b/man/convertBullet2Sentence.Rd @@ -38,6 +38,10 @@ The function can either take the selected text from the RStudio environment or f } \examples{ \dontrun{ +# Option 1 +# Select some text in RStudio and then run the rstudio addins +# Option 2 +# Copy the text into your clipboard then execute convertBullet2Sentence(Model = "gpt-4-0613", SelectedCode = FALSE) } } diff --git a/man/convertRscript2Function.Rd b/man/convertRscript2Function.Rd index 2e11adf..55bfa0e 100644 --- a/man/convertRscript2Function.Rd +++ b/man/convertRscript2Function.Rd @@ -32,6 +32,10 @@ The function can either take the selected code from the RStudio environment or f } \examples{ \dontrun{ +# Option 1 +# Select some text in RStudio and then run the rstudio addins +# Option 2 +# Copy the text into your clipboard then execute convertRscript2Function(Model = "gpt-4-0613", SelectedCode = F) } } diff --git a/man/convertScientificLiterature.Rd b/man/convertScientificLiterature.Rd index e50b62d..63df057 100644 --- a/man/convertScientificLiterature.Rd +++ b/man/convertScientificLiterature.Rd @@ -26,6 +26,10 @@ The function reads the input either from the RStudio active document or the clip } \examples{ \dontrun{ +# Option 1 +# Select some text in RStudio and then run the rstudio addins +# Option 2 +# Copy the text into your clipboard then execute convertScientificLiterature(SelectedCode = FALSE) } } diff --git a/man/createEBAYdes.Rd b/man/createEBAYdes.Rd index 00f5447..89bdd01 100644 --- a/man/createEBAYdes.Rd +++ b/man/createEBAYdes.Rd @@ -32,6 +32,10 @@ Create eBay Product Description } \examples{ \dontrun{ +# Option 1 +# Select some text in RStudio and then run the rstudio addins +# Option 2 +# Copy the text into your clipboard then execute createEBAYdes(Model = "gpt-4-0613", SelectedCode = FALSE, verbose = TRUE) } } diff --git a/man/createSpecifications4R.Rd b/man/createSpecifications4R.Rd index a62c882..d0b431c 100644 --- a/man/createSpecifications4R.Rd +++ b/man/createSpecifications4R.Rd @@ -32,6 +32,10 @@ Create Specifications for R Function } \examples{ \dontrun{ +# Option 1 +# Select some text in RStudio and then run the rstudio addins +# Option 2 +# Copy the text into your clipboard then execute createSpecifications4R(input = "Your R function specification") } } diff --git a/man/designPackage.Rd b/man/designPackage.Rd index 3d41e2e..bd060c1 100644 --- a/man/designPackage.Rd +++ b/man/designPackage.Rd @@ -28,6 +28,7 @@ The function reads the input from the clipboard. } \examples{ \dontrun{ +# Copy the text into your clipboard then execute designPackage(Model = "gpt-4-0613", verbose = TRUE, SlowTone = FALSE) } } diff --git a/man/enrichTextContent.Rd b/man/enrichTextContent.Rd index b5608f5..fb23134 100644 --- a/man/enrichTextContent.Rd +++ b/man/enrichTextContent.Rd @@ -26,7 +26,11 @@ Enrich Text Content } \examples{ \dontrun{ - enrichTextContent(Model = "gpt-4-0613", SelectedCode = TRUE) +# Option 1 +# Select some text in RStudio and then run the rstudio addins +# Option 2 +# Copy the text into your clipboard then execute +enrichTextContent(Model = "gpt-4-0613", SelectedCode = TRUE) } } \author{ diff --git a/man/extractKeywords.Rd b/man/extractKeywords.Rd index 3456d7d..5a4ebbb 100644 --- a/man/extractKeywords.Rd +++ b/man/extractKeywords.Rd @@ -28,6 +28,10 @@ from the clipboard and outputs the extracted keywords in a comma-separated forma } \examples{ \dontrun{ +# Option 1 +# Select some text in RStudio and then run the rstudio addins +# Option 2 +# Copy the text into your clipboard then execute extractKeywords(Model = "gpt-4-0613", verbose = TRUE, SlowTone = FALSE) } } diff --git a/man/proofreadEnglishText.Rd b/man/proofreadEnglishText.Rd index 20b56fd..f5e0020 100644 --- a/man/proofreadEnglishText.Rd +++ b/man/proofreadEnglishText.Rd @@ -4,7 +4,7 @@ \alias{proofreadEnglishText} \title{Proofread English Text} \usage{ -proofreadEnglishText(Model = "gpt-4-0613", SelectedCode = TRUE, verbose = TRUE) +proofreadEnglishText(Model = "gpt-4", SelectedCode = TRUE, verbose = TRUE) } \arguments{ \item{Model}{A string specifying the model to be used for proofreading, defaulting to "gpt-4-0314". diff --git a/man/supportIdeaGeneration.Rd b/man/supportIdeaGeneration.Rd index c952fcc..378a427 100644 --- a/man/supportIdeaGeneration.Rd +++ b/man/supportIdeaGeneration.Rd @@ -35,6 +35,10 @@ The function reads the input from the clipboard. } \examples{ \dontrun{ +# Option 1 +# Select some text in RStudio and then run the rstudio addins +# Option 2 +# Copy the text into your clipboard then execute supportIdeaGeneration() } }