Giter Club home page Giter Club logo

tutor-gpt's Introduction

tutor-gpt

Tutor-GPT is a LangChain LLM application. It dynamically reasons about your learning needs and updates its own prompts to best serve you.

We leaned into theory of mind experiments and Bloom is now more than just a literacy tutor, it’s an expansive learning companion. Read more about how it works here or you can join our Discord to try out our implementation for free (while our OpenAI spend lasts πŸ˜„).

Alternatively, you can run your own instance of the bot by following the instructions below.

Installation

This project requires docker to be installed and running locally. Install docker and ensure it's running before proceeding.

Getting Started

This app requires you to have a few different environment variables set. Create a .env file from the .env.template.

OPENAI_API_KEY: Go to OpenAI to generate your own API key.
BOT_TOKEN: This is the discord bot token. You can find instructions on how to create a bot and generate a token in the pycord docs.
THOUGHT_CHANNEL_ID: This is the discord channel for the bot to output thoughts to. Make a channel in your server and copy the ID by right clicking the channel and copying the link. The channel ID is the last string of numbers in the link.

Docker/Containerization

The repository containers a Dockerfile for running the bot in a containerized workflow. Use the following command to build and run the container locally:

docker build -t tutor-gpt:latest .
docker run --env-file .env tutor-gpt 

The current behaviour will utilize the .env file in your local repository and run the bot. There are two separate entry points for tutor-gpt both a discord UI and a web ui. Below contains snippets for manually specifying the execution environment.

docker run --env-file .env tutor-gpt python -u -m bot.app # Discord UI
docker run -p 8501:8501 --env-file .env tutor-gpt python -u -m streamlit run www/main.py # Web UI

Architecture

Below is high level diagram of the architecture for the bot. Tutor-GPT Discord Architecture

Contributing

This project uses poetry to manage dependencies. To install dependencies locally run poetry install. Or alternatively run poetry shell to activate the virtual environment

To activate the virtual environment within the same shell you can use the following one-liner:

source $(poetry env info --path)/bin/activate

On some systems this may not detect the proper virtual environment. You can diagnose this by running poetry env info directly to see if the virtualenv is defined.

If using pyenv remember to set prefer-active-python to true. As per this section of the documentation.

Another workaround that may work if the above setting does not work is to continue directly with poetry shell or wrap the source command like below

poetry run source $(poetry env info --path)/bin/activate

tutor-gpt's People

Contributors

vintrocode avatar vvoruganti avatar hyusap avatar jacobvm04 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.