powered by
Shortcut that creates an OpenAI client from the OPENAI_API_KEY environment variable and permanently deletes an assistant.
OPENAI_API_KEY
delete_assistant(assistant_id)
A list with $deleted (TRUE if successful) and $id.
$deleted
TRUE
$id
Character. Required. The ID of the assistant to delete.
if (FALSE) { Sys.setenv(OPENAI_API_KEY = "sk-xxxxxx") result <- delete_assistant("asst_abc123") if (result$deleted) cat("Assistant deleted.") }
Run the code above in your browser using DataLab