📋 Table of contents
TutorAI is a language agent capable of assisting with learning academic subjects. The project revolves around building an application that ingests a textbook in PDF format and facilitates efficient learning of the course material.
TutorAI is designed to be an interactive and comprehensive educational tool aimed at enhancing the learning experience for users of all ages. Below are the planned features that we are excited to introduce:
- PDF upload: This functionality enables users to upload PDF documents directly into TutorAI. The application will integrate these documents seamlessly, allowing for an interactive and integrated learning experience.
- Information search: Empower your learning with the ability to conduct in-depth searches within uploaded PDFs. Whether it's a quick fact verification or a deep dive into complex topics, TutorAI makes comprehensive information access simple and efficient.
- Learning plans: These plans will be tailored to the user's learning pace, style, and goals, offering a structured path to mastering the subject.
- Flashcards and Memory aids: Enhance memory retention with our range of digital memory aids, including customizable flashcards. These interactive tools are designed to make study sessions more productive and engaging.
- Quiz and test generation: Automatic generation of quizzes and tests based on the material in the PDF
- Quiz and test grading: Automatic grading of quizzes and tests. This feature will provide instant feedback on performance, allowing users to track their progress and identify areas for improvement.
- Compendium: A comprehensive database of knowledge that can be accessed and searched by users. This feature will provide a wealth of information on a wide range of topics, making learning more accessible and engaging.
- Study streaks: This gamified element aims to motivate users to engage with their learning material regularly, making education a daily habit, and exams passed easily.
To setup the project, one needs to have all the prerequisites installed. Then one needs to clone the repository, setup a virtual environment, and install the dependencies. This is described in more detail below.
- Ensure that git is installed on your machine. Download Git
- Ensure Python 3.9 or newer is installed on your machine. Download Python
- Docker is used for the backend and database setup. Download Docker
git clone https://github.com/CogitoNTNU/TutorAI.git
cd TutorAI
To setup the backend one can either automatically setup the backend using docker or manually setup the backend.
For ease of use and version management control, we use Docker to keep track of our containers and virtual environments.
cd backend
docker-compose build
docker-compose up
🚀 A better way to set up repositories
A virtual environment in Python is a self-contained directory that contains a Python installation for a particular version of Python, plus a number of additional packages. Using a virtual environment for your project ensures that the project's dependencies are isolated from the system-wide Python and other Python projects. This is especially useful when working on multiple projects with differing dependencies, as it prevents potential conflicts between packages and allows for easy management of requirements.
-
To set up and use a virtual environment for TutorAI: First, install the virtualenv package using pip. This tool helps create isolated Python environments.
pip install virtualenv
-
Create virtual environment Next, create a new virtual environment in the project directory. This environment is a directory containing a complete Python environment (interpreter and other necessary files).
python -m venv venv
-
Activate virtual environment To activate the environment, run the following command: * For windows:
bash source ./venv/Scripts/activate
* For Linux / MacOS: ```bash source venv/bin/activate ```
With the virtual environment activated, install the project dependencies:
pip install -r requirements.txt
The requirements.txt file contains a list of packages necessary to run TutorAI. Installing them in an activated virtual environment ensures they are available to the project without affecting other Python projects or system settings.
For secure and efficient management of environment-specific variables, TutorAI utilizes a .env
file. This file is used to store sensitive information, such as API keys, which should not be hard-coded into the source code or shared publicly. The .env
file is particularly crucial for maintaining the confidentiality of your API keys and other sensitive data.
Important: The .env
file should never be committed to version control (e.g., GitHub). Always include .env
in your .gitignore
file to prevent accidental upload of sensitive information.
-
Create the .env File: In the root directory of the project, create a new file named
.env
. This file will be used to store environment variables.touch .env
-
Add Environment Variables: You will need to add the following environment variables to the
.env
file:- OPENAI_API_KEY: Your OpenAI API key
echo "OPENAI_API_KEY=YOUR_API_KEY" > .env # Remember to change YOUR_API_KEY to your actual API key
-
Obtaining an API Key: If you don't have an API key from OpenAI, you can obtain one by visiting OpenAI API Keys. Follow their instructions to generate a new API key.
By following these steps, you'll ensure that your application has all the necessary environment-specific configurations, while keeping sensitive data secure and out of version control.
The frontend is built using React and TypeScript. To install the dependencies, run the following command in the root directory of the project:
cd frontend
npm install
To run the client, run the following command in the root directory of the project:
cd frontend
npm run dev
To run server, run the following command in the root directory of the project:
cd backend
python manage.py runserver
To run all the tests, run the following command in the backend
directory of the project:
python manage.py test
docker-compose run tutorai python manage.py test flashcards
There are currently no tests for the frontend.
Henrik Halvorsen Kvamme |
Kaamya Shinde |
Kristoffer Nohr Olaisen |
Olav Selnes Lorentzen |
Parleen Brar |
Simon Sandvik Lee |
Skage Reistad |
Sverre Nystad |
Tobias Fremming |
Licensed under the MIT License. Because this is a template repository, you need to change the license if you want to use it for your own project.