I have been using the File API fields status and status_details but they were deprecated some time ago. I’m still using the status
field to validate if an uploaded file is ready to be used, for example (the code is in Java using the simple-openai library):
@SuppressWarnings("deprecation")
public void waitUntilFileIsProcessed(String fileId) {
FileResponse fileResponse = null;
do {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
fileResponse = openAI.files().getOne(fileId).join();
} while (!fileResponse.getStatus().equals("processed"));
}
Is there any alternative to verify the file status or what do I need to do to get the same effect?