upload_file | R Documentation |
Uploads a file that will be used for various purposes. The size of the storage is limited to 1 Gb. See this page for details.
upload_file(
file,
purpose = c("search", "answers", "classifications", "fine-tune"),
openai_api_key = Sys.getenv("OPENAI_API_KEY"),
openai_organization = NULL
)
file |
required; a length one character vector. |
purpose |
required; defaults to |
openai_api_key |
required; defaults to |
openai_organization |
optional; defaults to |
For arguments description please refer to the official documentation.
Returns a list, elements of which contains ID of the uploaded file and other supplementary information.
Other file functions:
delete_file()
,
list_files()
,
retrieve_file_content()
,
retrieve_file()
## Not run:
file <- system.file("extdata", "classification-file.jsonl", package = "openai")
upload_file(file = file, purpose = "classification")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.