Create a basic script that extracts text from a PDF by chapter, summarizes each chapter, stores these summaries in an SQLite database, and answers questions about these chapters using OpenAI's API.
You just need to create an .env
file and place there the OPENAPI api key.
To run execute the script:
python -m task
- I did the task in the simplest way possible by covering the functionality asked in the assignment
- Used PyMuPDF library to read and process the PDF
- Used openai async client
- Used Chat completions API to generate text summaries and ask questions about them