Suggest me the best way to use OpenAI API to generate quiz from a pdf file entered by the user?
I want to generate a quiz based on the input entered by the user, which is a pdf.
Currently I am using this approach
Uploading the file to openai, using the assistant api to create and assistant, and then assigning the assistant a task to generate quiz, then creating a thread with number of questions to generate and the format, and then running it using run, and retrieving the run when it has been completed.
But It is making a lot of API calls using this approach, I am getting rate limit errors. Is there a better way to achieve this? Without maybe using assistant API
Can I just extract text from PDF and divide that into chunks, and send the important chunks as content to generate questions from those?
Or anything else is also appreciated.