- model
required; a length one character vector.
- messages
required; defaults to NULL; a list in the following
format: list(list("role" = "user", "content" = "Hey! How old are you?")
- temperature
required; defaults to 1; a length one numeric vector
with the value between 0 and 2.
- top_p
required; defaults to 1; a length one numeric vector with the
value between 0 and 1.
- n
required; defaults to 1; a length one numeric vector with the
integer value greater than 0.
- stream
required; defaults to FALSE; a length one logical vector.
Currently is not implemented.
- stop
optional; defaults to NULL; a character vector of length
between one and four.
- max_tokens
required; defaults to (4096 - prompt tokens); a length
one numeric vector with the integer value greater than 0.
- presence_penalty
required; defaults to 0; a length one numeric
vector with a value between -2 and 2.
- frequency_penalty
required; defaults to 0; a length one numeric
vector with a value between -2 and 2.
- logit_bias
optional; defaults to NULL; a named list.
- 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.