OrderBot 🍕🍽️
A GPT-based Chatbot for Food Ordering 🍽️ using data from MySQL DB and OpenAI Function Calling, through natural language.
Overview
OrderBot is an intelligent virtual server that can take input questions related to a mysql database and uses the power of artificial intelligence to understand users' prompts and propose suitable items to order, totally simulating the tasks of a server. Through an intuitive interface it is possible to ask for advice on products based on and to know any information relating to the menu.
Main features
- Allows customers to order products using a LLM directly with their mysql database.
- Interact with the chatbot using natural language to order products and better understand the best product to order, based on your own data.
- AI-powered interaction: OrderBot uses advanced AI algorithms to take the correct data and generate a precise response.
Architecture
Database: MySQL
Backend: Python + OpenAI Function Calling
Frontend: Chainlit
Getting started
- Install all the dependencies using the command:
pip install -r requirements.txt
- Clone the Orderbot repository to your local machine.
- Run the script.sql in MySQL workbench
- Specify the local db credentials inside the file db_helper.py
db = mysql.connector.connect(
host="localhost",
user="-> insert here the username <-",
password="-> insert here the password <-",
database="-> insert here your locale db name <-"
)
- Add your OpenAI API key inside the file my_openai_key.py
openai_api_key = "--> insert API key <--"
- Open the terminal and launch the following command:
chainlit run main.py -w
Todo list
- Specify the functions that create the order instance and insert it into the Orders table
- Improve existing functions and their descriptions
- Improve the initial prompt