Codebase for my paper titled: "Personalized language learning with an LLM chatbot: effects of immediate vs. delayed corrective feedback"
See the codeIf you got problems anywhere in the process, please contact me. {: .prompt}
Access the code here: /horotat/ChatBot2023
or
git clone https://github.com/horotat/ChatBot2023.git
To run the program properly you need an installation of conda (anaconda is suggested over miniconda). Once you have conda installed on your machine, follow the steps below.
First, you need to create a conda virtual environment. The packages and their dependecies are checked and are functional in Ubuntu 22.04, Windows 11, and macOS ventura 13.0 arm64.
Create a conda virtual environment and install packages from the alice_env.yml file.
conda env create -f env.yml
After the installation
We need to download the en language model for spacy. To do so, run the following command in the terminal.
python -m spacy download en
In order for the system to work properly, you need to set the following environemnt variables in the system.
$OPENAI_API_KEY: OpenAI API Key
webapp.py$FLASK_SECRET_KEY: A random Flask Secret Key to run the application.
webapp.py$ALLOWED_EMAILS_CSV: Link to a CSV file that contains list of allowed emails to signup coupled with the class and condition. (e.g. group, email, condition)
dataset.pyWe used mongodb as our database. You can install it from here. After installation make sure that the mongod service is running.
Deployment of the application is done using gunicorn and nginx.
We used these instructions to set a Password Authentication for the nginx server.
To run the chatbot, first activate the conda virtual environment by:
conda activate alice_env
Then, run the webapp.py file with the following terminal command:
FLASK_APP=webapp.py FLASK_ENV=development flask run
The scenarios are feched from an online CSV. There is no automatic update for the scenarios. To update the scenarios, you need to run the scenarios_update.py file. To do so, run the following command in the terminal.
python scenarios_update.py
Codebase for my paper titled: "Personalized language learning with an LLM chatbot: effects of immediate vs. delayed corrective feedback"
See the codeIf you got problems anywhere in the process, please contact me. {: .prompt}
Access the code here: /horotat/ChatBot2023
or
git clone https://github.com/horotat/ChatBot2023.git
To run the program properly you need an installation of conda (anaconda is suggested over miniconda). Once you have conda installed on your machine, follow the steps below.
First, you need to create a conda virtual environment. The packages and their dependecies are checked and are functional in Ubuntu 22.04, Windows 11, and macOS ventura 13.0 arm64.
Create a conda virtual environment and install packages from the alice_env.yml file.
conda env create -f env.yml
After the installation
We need to download the en language model for spacy. To do so, run the following command in the terminal.
python -m spacy download en
In order for the system to work properly, you need to set the following environemnt variables in the system.
$OPENAI_API_KEY: OpenAI API Key
webapp.py$FLASK_SECRET_KEY: A random Flask Secret Key to run the application.
webapp.py$ALLOWED_EMAILS_CSV: Link to a CSV file that contains list of allowed emails to signup coupled with the class and condition. (e.g. group, email, condition)
dataset.pyWe used mongodb as our database. You can install it from here. After installation make sure that the mongod service is running.
Deployment of the application is done using gunicorn and nginx.
We used these instructions to set a Password Authentication for the nginx server.
To run the chatbot, first activate the conda virtual environment by:
conda activate alice_env
Then, run the webapp.py file with the following terminal command:
FLASK_APP=webapp.py FLASK_ENV=development flask run
The scenarios are feched from an online CSV. There is no automatic update for the scenarios. To update the scenarios, you need to run the scenarios_update.py file. To do so, run the following command in the terminal.
python scenarios_update.py