Generate Multiple Choice Questions, Choices and Correct Answer in JSON Format
Project description
mcqgen
Generate MCQs with options and correct answers in JSON Format.
Installation
You can install the package using pip:
pip install mcqgen
Make sure you have OpenAI key stored in environment variable OPENAI_API_KEY
Usage
Simply call function generate_mcqs
as below.
First argument (Topic) is mandatory. Default Model is GPT3.5 and default number of questions is 5
from mcqgen import mcqgen
gen = mcqgen.MCQGenerator()
data = gen.generate_mcqs('Topic', model="gpt-3.5-turbo", no=3)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mcqgen-0.1.2.tar.gz
(2.6 kB
view hashes)