SIT Chatbot with friendly otter assistant.
This project is a chatbot application designed for SIT, featuring a friendly otter assistant. It utilizes a Node.js backend for handling API requests and a Python backend for AI functionalities, with a frontend built using webpack.
The SIT Chatbot aims to provide an interactive and engaging experience for users seeking information or assistance related to SIT. The friendly otter assistant adds a unique touch to the user interface.
Key features:
- Interactive chat interface
- Dual backend system (Node.js and Python)
- Webpack for frontend asset bundling
This project utilizes the following major frameworks and libraries:
Frontend:
- HTML
- CSS
- JavaScript
Backend (Node.js):
- Express.js
- @elevenlabs/client
Backend (Python):
- FastAPI
- Uvicorn
To get a local copy up and running, follow these simple steps.
Ensure you have the following software installed on your system:
- Node.js and npm (Node Package Manager)
# Check if installed node -v npm -v - Python and pip (Python Package Installer)
# Check if installed python --version pip --version
-
Clone the repository:
git clone https://github.com/Finance-LLMs/SIT-chatbot.git cd SIT-chatbot -
Set up environment variables: Create a
.envfile in the root directory of the project. You can copy the example or create it manually.# For Windows (using Command Prompt or PowerShell) copy .env.example .env # If you have an example file notepad .env # To create and edit a new .env file
# For Linux/macOS cp .env.example .env # If you have an example file vim .env # To create and edit a new .env file
Add necessary environment variables to this file (e.g., API keys, database URIs). Refer to the specific backend documentation or code for required variables.
-
Install frontend dependencies:
npm install
-
Install backend dependencies (Python):
pip install -r requirements.txt
There are a couple of ways to run the application, depending on whether you want to run the Node.js backend or the Python backend.
- Build the frontend assets:
npm run build
- Start the Node.js backend server:
Alternatively, to build and start the Node.js backend together:
npm run start:backend
npm start
- Build the frontend assets (if not already done):
npm run build
- Start the Python backend server:
This command will typically run:
npm run start:python
uvicorn backend.server:app --reload --port 3000
For a development environment with hot reloading for the frontend and concurrent backend execution:
npm run devThis command uses concurrently to run both the Node.js backend (npm run start:backend) and the webpack development server (webpack serve --mode development).
After starting the application using any of the above methods, you can access the chatbot by navigating to:
http://localhost:3000/
(Or the port specified by your webpack dev server, typically http://localhost:8080/ if npm run dev is used and the Python backend is not on port 3000).
Here's an overview of the key files and directories:
SIT-chatbot/
├── backend/
│ ├── server.js # Node.js backend server
│ └── server.py # Python backend server (FastAPI)
├── src/
│ ├── app.js # Main frontend JavaScript logic
│ ├── index.html # Main HTML file for the frontend
│ ├── styles.css # CSS styles for the frontend
│ └── sit-data/
│ └── logo.png # Project logo
├── .env # Environment variables (create this file)
├── package.json # npm package configuration, scripts, and frontend dependencies
├── README.md # This file
├── requirements.txt # Python backend dependencies
└── webpack.config.js # Webpack configuration for building frontend assets
This project is licensed under the MIT License.