- model
required; defaults to "ada"; a length one character vector,
one among "ada", "babbage", "curie", and "davinci".
- query
required; a length one character vector.
- examples
optional; defaults to NULL; a list. A list of examples with
labels, in the following format: list(c("The movie is so interesting.", "Positive"), c("It is quite boring.", "Negative"), ...).
- file
optional; defaults to NULL; a length one character vector.
- labels
optional; defaults to NULL; an arbitrary length character
vector.
- search_model
required; defaults to ada; a length one character
vector, one among "ada", "babbage", "curie", and "davinci".
- temperature
required; defaults to 0; a length one numeric vector
with the value between 0 and 2.
- logprobs
optional; defaults to NULL; a length one numeric vector
with the integer value between 0 and 5.
- max_examples
required; defaults to 200; a length one numeric vector
with the integer value greater than 0.
- logit_bias
optional; defaults to NULL; a named list.
- return_prompt
required; defaults to FALSE; a length one logical
vector.
- return_metadata
required; defaults to FALSE; a length one logical
vector.
- expand
optional; defaults to NULL; a list elements of which are
among completion and file.
- user
optional; defaults to NULL; a length one character vector.
- openai_api_key
required; defaults to Sys.getenv("OPENAI_API_KEY")
(i.e., the value is retrieved from the .Renviron file); a length one
character vector. Specifies OpenAI API key.
- openai_organization
optional; defaults to NULL; a length one
character vector. Specifies OpenAI organization.