if (FALSE) {
Sys.setenv(OPENAI_API_KEY = "sk-xxxxxx")
# Download batch output file
raw_data <- retrieve_file_content("file-abc123")
text <- rawToChar(raw_data)
cat(text)
# Save to file
writeBin(raw_data, "batch_results.jsonl")
}
Run the code above in your browser using DataLab