Collection of RAG scripts using the OpenAI API to generate content (quizzes, summaries, …) and run automated jobs.
Thanks for taking the time to read this documentation!
This repository is dedicated only to the AI jobs and workflows powering NX Academy.
At the moment, it mainly relies on the OpenAI API to:
- create quizzes;
- extract metadata such as title and summary from online articles;
- search the web for news on target subjets (IA, DevOps, etc.);
- run a Discord bot acting as small back-office tool for the project, for example for generating News in NewsFeed;
You’re free to clone this repo and explore the source code. Keep in mind that it’s tightly coupled to NX Academy: you’ll need your own environment variables to make it fully work.
That being said, feel free to look around and reach out if you have questions, my Discord username is tdimnet and I’m usually available to answer.
- NX Academy uses Python for much of its backend logic.
- The project is built around a CLI using Click (far more readable than argparse).
- Everything runs inside a Docker container.
- For local development, I strongly recommend using the DevContainer VSCode extension. It works almost out-of-the-box with a single command.
- I’ve tried to keep the code modular but simple — Simple is better than complex.
- Docker — tested on both Windows and Linux
- VSCode DevContainer extension — really, just use it 😉
- A
.envfile containing your tokens:- OPENAI_API_KEY
- GITHUB_TOKEN
- DISCORD_TOKEN
(and no, I won’t share mine!)
cp .example.env .envOnce the repo is cloned and running inside a container:
pip install -r requirements.txtMost of this project is designed for CLI usage. To get available commands:
python app.py --helpHere’s a quick overview of the structure:
/
├── mock/ # Mock files to simulate GPT calls
├── nx_ai/
│ ├── discord_service/ # All services follow the same structure
│ │ ├── discord_api.py # Interface with the Discord API
│ │ └── discord_cli.py # CLI commands for testing purposes
│ ├── github_service/
│ ├── openai_service/
│ ├── utils/ # Utilities not tied to business logic
│ └── workflows/
│ ├── generate_quiz.py
│ ├── generate_recap.py
│ └── workflows_cli.py # Main CLI entry point (daily usage)
└── tests/ # Yep, it’s tested!
At the moment, external contributions are not accepted. We’re a small team working to strike the right balance. Once the project stabilizes, we’ll gladly open it up.