delete_file {openai} | R Documentation |
Delete file
Description
Deletes a file. See this page for details.
Usage
delete_file(
file_id,
openai_api_key = Sys.getenv("OPENAI_API_KEY"),
openai_organization = NULL
)
Arguments
file_id |
required; a length one character vector. |
openai_api_key |
required; defaults to |
openai_organization |
optional; defaults to |
Details
For arguments description please refer to the official documentation.
Value
Returns a list, elements of which contains ID of the deleted file and status whether the file is deleted.
See Also
Other file functions:
list_files()
,
retrieve_file_content()
,
retrieve_file()
,
upload_file()
Examples
## Not run:
file <- system.file("extdata", "classification-file.jsonl", package = "openai")
file_info <- upload_file(file = file, purpose = "classification")
delete_file(file_info$id)
## End(Not run)
[Package openai version 0.4.1 Index]