powered by
Shortcut that creates an OpenAI client from the OPENAI_API_KEY environment variable and cancels a batch job.
OPENAI_API_KEY
cancel_batch(batch_id)
A batch object with $status = "cancelling".
$status = "cancelling"
Character. Required. The batch ID to cancel.
if (FALSE) { Sys.setenv(OPENAI_API_KEY = "sk-xxxxxx") result <- cancel_batch("batch_abc123") cat("Status:", result$status) }
Run the code above in your browser using DataLab