Welcome to the backend repository for the SEL Assistant Chatbot! This repository houses the core functionalities that power our chatbot, designed to support students by managing their emotions and providing social-emotional guidance outside school hours. Developed with Django REST framework, this backend integrates with Azure services, including Azure VM and Azure OpenAI, utilizing ChatGPT for natural language processing and LangChain for managing chat interactions and history.
- API Integration: RESTful API built with Django REST Framework to serve the frontend application.
- CORS Handling: Configured to handle Cross-Origin Resource Sharing (CORS) for secure access between different domains.
- Azure VM Hosting: Hosted on an Azure Virtual Machine for scalable, reliable performance.
- Azure OpenAI Integration: Incorporates Azure OpenAI's pretrained models to enhance chatbot responses.
- LangChain: Manages prompt templates and chat history effectively, ensuring a contextual and coherent interaction history.
- Django REST Framework - A powerful and flexible toolkit for building Web APIs in Django.
- Azure VM - For hosting the application.
- Azure OpenAI - For utilizing AI models.
- LangChain - For managing conversation logic and state.
Follow these instructions to get your backend server up and running.
- Python 3.8 or newer
Follow these steps to get your development environment set up:
First, you need to clone the repository from GitHub to your local machine.
git clone https://github.com/SwAt1563/ed_tech_llm.git
cd ed_tech_llm
Creating a virtual environment is highly recommended to manage dependencies.
python -m venv venv
venv\Scripts\activate
python3 -m venv venv
source venv/bin/activate
With your virtual environment active, install the project dependencies using:
pip install -r requirements.txt
Before running the application, you need to make migrations and migrate the database schemas.
python manage.py makemigrations
python manage.py migrate
Finally, start the Django development server:
python manage.py runserver
By default, the server will start on http://127.0.0.1:8000/
. You can open this address in a web browser to view the application.
This backend serves as the processing and data management layer for the SEL Assistant Chatbot, handling requests from the frontend application. It processes these requests to deliver appropriate responses based on the student's emotional state and queries.