nicoladisabato / OrderBot

GPT-based Chatbot for Food Ordering 🍽️ using data from MySQL DB and OpenAI Function Calling.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OrderBot 🍕🍽️

A GPT-based Chatbot for Food Ordering 🍽️ using data from MySQL DB and OpenAI Function Calling, through natural language.

orderbot_image

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

  1. Install all the dependencies using the command:
pip install -r requirements.txt
  1. Clone the Orderbot repository to your local machine.
  2. Run the script.sql in MySQL workbench
  3. 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 <-"
    )
  1. Add your OpenAI API key inside the file my_openai_key.py
openai_api_key = "--> insert API key <--"
  1. 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

About

GPT-based Chatbot for Food Ordering 🍽️ using data from MySQL DB and OpenAI Function Calling.

License:GNU Affero General Public License v3.0


Languages

Language:Python 100.0%