This repository utilizes CrewAI to generate comprehensive course materials, particularly suited for programming language courses.
The crew produces six key files:
1_outline.md
: A structured outline for a specific subject within the course.2_content.md
: The core content of the course, based on the outline.3_extended_content.md
: A more detailed and in-depth version of the content.4_examples.md
: Practical examples related to the subject.5_exercises.md
: Hands-on exercises for learners.6_quiz.md
: Kahoot-style questions to test understanding.final.md
: A complete version of the course, combining extended content, examples, exercises, and quiz questions.
Caution
- Always verify the generated content for accuracy, as AI models can produce inaccuracies.
- Each run of the crew overwrites previous output files. Back up any content you wish to keep.
- Multiple runs can produce slightly different content, offering variety.
- Experiment with different AI models to find the best fit for your needs.
- For non-English courses, ensure the chosen model supports multiple languages.
- Consider the generated content as a starting point for further refinement.
- Clone the repository:
git clone git clone https://github.com/pverhaert/crewai_course-builder
- Set up the environment:
- Windows: Run
install.bat
to create the virtual environment, install dependencies, and set up the.env
file. - Linux/macOS:
- Create and activate a virtual environment named
.venv
- Activate the virtual environment:
source .venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Rename
.env.example
to.env
- Create and activate a virtual environment named
- Windows: Run
Choose between Groq or OpenRouter models. The free Serper API is used for internet searches.
- Get an API key from Serper
- Add the key to the
.env
file:
SERPER_API_KEY=your_key_here`
- Obtain an API key from Groq Console
- Select a model
- Update
.env
with your API key and chosen model:
OPENAI_API_KEY=your_groq_api_key
OPENAI_MODEL_NAME=your_chosen_model
OPENAI_API_BASE=https://api.groq.com/openai/v1
- Get an API key from OpenRouter
- Choose a model
- In
.env
, comment out Groq settings and uncomment OpenRouter settings:
OPENAI_API_KEY=your_openrouter_api_key
OPENAI_API_BASE=https://openrouter.ai/api/v1
OPENAI_MODEL_NAME=your_chosen_model
- Windows: Execute
run.bat
- Linux/macOS: Run
python main.py
When running the crew, you'll be prompted to provide:
- Course about (e.g., "JavaScript")
- Subject (e.g., "Functions")
- Do you have special requirements for this course? (optional)
- Language of the course
- Number of examples, exercises, and quiz questions
- Temperature setting for AI generation (0-1)
Find the generated course materials in the course
folder, all in Markdown format.
Tip
- Install the Markdown Viewer Chrome extension for easy viewing.
- Remember to allow access to local files.
- Drag and drop the
course/index.md
file to your browser.