powered by
Shortcut that creates an OpenAI client from the OPENAI_API_KEY environment variable and deletes a file.
OPENAI_API_KEY
delete_file(file_id)
A list with $deleted (TRUE if successful) and $id.
$deleted
TRUE
$id
Character. Required. The file ID to delete.
if (FALSE) { Sys.setenv(OPENAI_API_KEY = "sk-xxxxxx") result <- delete_file("file-abc123") if (result$deleted) cat("File deleted successfully.") }
Run the code above in your browser using DataLab