Download the output file for a completed batch
Source:R/openai_batch_api.R
openai_download_batch_output.RdGiven a batch ID, retrieves the batch metadata, extracts the
output_file_id, and downloads the corresponding file content to path.
Examples
if (FALSE) { # \dontrun{
# Requires OPENAI_API_KEY and a completed batch with an output_file_id.
openai_download_batch_output("batch_abc123", "batch_output.jsonl")
# You can then parse the file
res <- parse_openai_batch_output("batch_output.jsonl")
head(res)
} # }