This is version 2.0 of the chatbot developed for UETStore, an e-commerce platform (you can explore the project via the Github and Figma ). The chatbot has been upgraded into an AI-powered agent with a modern, user-friendly chat interface. It is designed to assist users by answering questions related to the UETStore website, available products, how to navigate and use the platform effectively.
User interface:
- Languages: Python3, Javascript
- UI: HTML, CSS
- Frameworks: Langchain, FastAPI
- Databases: MySQL, MongoDB
- Tools: Docker, Postman, DVC
- Services: GoogleOauth2, Openrouter (use gpt3.5 model)
- Go to the Google console cloud
- Create a new project (or select an existing one)
- Navigate to APIs & Services > Credentials
- Click Create Credentials > OAuth 2.0 Client ID 5.Choose Web Application
- Set the following: Authorized redirect URI:
http://localhost:3000//auth/google/callback
- Copy your Client ID and Client Secret into the .env file
- Visit: OpenRouter
- Sign in and go to: Keys
- Generate a new API key
- Add it to the .env file under OPENROUTER_API
This project uses DVC with Google Drive to manage dataset and embedding files.
To pull the required data, please contact the author to receive the secure access key (key.json
), then run:
dvc remote modify gdrive gdrive_use_service_account true
dvc remote modify gdrive gdrive_service_account_json_file_path secrets/dvc-remote-key-viewer.json
First, you clone this project by Git:
git clone https://github.com/phamngocdo/Simple-chatbot-for-Ecomerce-Website.git
cd Simple-chatbot-for-Ecomerce-Website.git
Next step, you need to create a .env file:
MYSQL_HOST=localhost
MYSQL_USER=root
MYSQL_NAME=uet_store
MYSQL_PASS=type_your_password here
MYSQL_PORT=3306
MONGO_URI=mongodb://localhost:27017
MONGO_DB_NAME=chat_messages
PORT=3000
SECRET_KEY=type_your_random_key(for authentication)
GOOGLE_CLIENT_ID=type_your_client_id
GOOGLE_CLIENT_SECRET=type_your_client_secret
OPENROUTER_API=type_your_key
Install docker if you don't have, then:
docker compose up -d
To stop app:
docker compose down
Distributed under the MIT License. See LICENSE.txt for more information.
Email - ngocdo992k4@gmail.com
Github - phamngocdo