Vodafone Chatbot is a managerial-level simulation designed to streamline Vodafone database interactions using Large Language Models (LLMs) and LangChain. This project leverages MySQL for data storage and retrieval and utilizes LLMs to generate SQL queries based on user questions. The resulting data is then processed and, if it represents a time series, visualized using graphs to facilitate easy interpretation.
First of all, download the Chinook database. This is a sample database that represents a digital media store, including tables for artists, albums, media tracks, invoices, and customers. We will use this database to test our chatbot.
- Download MySQL From Ofiicial site
- Also you cloud download MySQL Workbench From here
- Go to your terminal and log in to MySQL using the following command:
$ mysql -u root -p
- You will be prompted to enter your password. Once you are logged in, you can create a new database using the following commands:
$ CREATE DATABASE chinook;
$ USE chinook;
$ SOURCE chinook.sql;
- Python 3.8 or later
- Download and install MiniConda From here
- Create a new environment using the following command:
$ conda create -n vodafone-chatbot python=3.10
Another way to create a new environment is by using the following command:
$ conda create --name vodafone-chatbot python=3.10
- Activate the environment:
$ conda activate vodafone-chatbot
- Install Virtualenv
$ pip install virtualenv
- Create a new environment using the following command:
$ python -m venv vodafone-chatbot
- Activate the environment:
$ .\vodafone-chatbot\Scripts\Activate.ps1
export PS1=export PS1="\[\033[01;32m\]\u@\h:\w\n\[\033[00m\]\$ "
$ pip install -r requirements.txt
$ cp .env.example .env
Set your environment variables in the .env
file. Like API_KEYS
value.
Create a private key for free and choose suitable open-source model as API from here
You could download ollama from here
$ ollama pull llama3.1
$ ollama list
$ streamlit run app.py