Creates an edit based on the provided input, instruction, and parameters. See this page for details.
create_edit(
engine_id = deprecated(),
model,
input = "\"",
instruction,
temperature = 1,
top_p = 1,
openai_api_key = Sys.getenv("OPENAI_API_KEY"),
openai_organization = NULL
)required; a length one character vector.
required; defaults to '"'; a length one character vector.
required; a length one character vector.
required; defaults to 1; a length one numeric vector
with the value between 0 and 2.
required; defaults to 1; a length one numeric vector with the
value between 0 and 1.
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.
optional; defaults to NULL; a length one
character vector. Specifies OpenAI organization.
Returns a list, elements of which contain edited version of prompt and supplementary information.
For arguments description please refer to the official documentation.
if (FALSE) { # \dontrun{
create_edit(
model = "text-davinci-edit-001",
input = "What day of the wek is it?",
instruction = "Fix the spelling mistakes"
)
} # }