Demonstration of quiz generation using OpenAI's GPT-3.5 API.
Demo link: https://deephow-ai-quiz-nn0q.onrender.com
- Input text for generation
- Select language (default to English)
- Generate quiz questions from text
- Main points
- Multiple choice questions
- True/false questions
- Keywords and definition matching
- Cloze questions
- Cloze paragraph questions
- Sort SOP steps
- Fill in the blanks in SOP diagram
- The text input is limited to 1500 characters to avoid exceeding the token limit of the OpenAI API. Longer text will be truncated.
- Optimization for multiple choice questions
- Retry failed generation requests
Built with:
-
git clone
this repository -
Install the dependencies:
# yarn yarn install # npm npm install # pnpm pnpm install
-
Create a
.env
file in the root directory and add the following environment variables:OPENAI_API_KEY=<your-openai-api-key> OPENAI_ORG_ID=<your-openai-org-id>
Start the development server on http://localhost:3000
npm run dev #or
yarn run dev
Build the application for production:
npm run build #or
yarn run build
Locally preview production build:
npm run preview
Check out the deployment documentation for more information.
Note: Please make sure your deployment platform has sufficient timeout limit for the quiz generation API call.
For example, free plan of Vercel and Netlify are not recommended for this project as they have a 10s timeout limit for serverless functions. The quiz generation process may take longer than 10s.
Render, Heroku, Railway, DigitalOcean, AWS, Azure, Google Cloud are recommended for deployment.