if (FALSE) {
Sys.setenv(OPENAI_API_KEY = "sk-xxxxxx")
batch <- retrieve_batch("batch_abc123")
cat("Status:", batch$status)
if (batch$status == "completed") {
raw <- retrieve_file_content(batch$output_file_id)
cat(rawToChar(raw))
}
}
Run the code above in your browser using DataLab