Skip to content

TutorAI is a language agent capable of assisting with learning academic subjects. The project revolves around building an application that ingests a textbook in most formats and facilitates efficient learning of the course material.

License

Notifications You must be signed in to change notification settings

Nathaniavm/TutorAI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TutorAI

GitHub Workflow Status (with event) GitHub top language GitHub language count License: MIT Project Version

Cogito Image
📋 Table of contents
  1. Introduction
  2. Setup
  3. Usage
  4. Tests
  5. Repository Structure
  6. Contributors
  7. License

Introduction

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.

Features

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.

Setup

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.

Prerequisites

Clone the repository

git clone https://github.com/CogitoNTNU/TutorAI.git
cd TutorAI

Setup the backend

To setup the backend one can either automatically setup the backend using docker or manually setup the backend.

Docker

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

Manual

Virtual Environment (Recommended)

🚀 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.

  1. 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
  2. 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
  3. 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
        ```
    

Install dependencies

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.

Create a .env file

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.

Steps to Create and Configure the .env File:

  1. 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
  2. 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
  3. 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.

Setup the frontend

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

Usage

Frontend

To run the client, run the following command in the root directory of the project:

cd frontend
npm run dev

Backend

To run server, run the following command in the root directory of the project:

cd backend
python manage.py runserver

Tests

Backend

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

Frontend

There are currently no tests for the frontend.

Contributors


Henrik Halvorsen Kvamme

Kaamya Shinde
Kristoffer Nohr Olaisen
Kristoffer Nohr Olaisen
Olav Selnes Lorentzen
Olav Selnes Lorentzen

Parleen Brar

Simon Sandvik Lee

Skage Reistad

Sverre Nystad

Tobias Fremming

License

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.

About

TutorAI is a language agent capable of assisting with learning academic subjects. The project revolves around building an application that ingests a textbook in most formats and facilitates efficient learning of the course material.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 61.4%
  • TypeScript 36.5%
  • Other 2.1%