This function cancels an in-progress batch created through the OpenAI API. The batch will be moved to a "cancelling" state and, eventually, "cancelled."
cancel_openai_batch(.batch_id, .dry_run = FALSE, .max_tries = 3, .timeout = 60)
A list containing the response from the OpenAI API about the cancellation status.
Character; the unique identifier for the batch to cancel.
Logical; if TRUE
, returns the constructed request without executing it (default: FALSE
).
Integer; maximum number of retries if the request fails (default: 3
).
Integer; request timeout in seconds (default: 60
).