This project is a proof of concept for a fully automated restaurant drive-thru order terminal using OpenAI's GPT language model. This code allows you to extract products from a customer order dialog based on a predefined list of valid items which can be ordered. Multilingual input is supported.
-
Clone the repository:
git clone https://github.com/louis-e/gpt-order-terminal.git
-
Install the required dependencies:
pip install openai pvrecorder keyboard
-
Save your OpenAI API key in a file named
openai_api_key.txt
. -
Edit the
items.txt
file accordingly to your needs. -
Run the code:
python order_terminal.py
-
Follow the instructions to record the customer dialog. Press ENTER to stop recording.
SYSTEM: Recording customer dialog... Press ENTER to stop recording.
SYSTEM: Customer dialog recorded sucessfully. Transcribing...
SYSTEM: Customer dialog transcribed sucessfully: Hi there, I would like to order a cheeseburger and two cheesy fries as well as a coke. And for my daughter, let me see. One second. Ah, for my daughter I would like to order nachos, two chicken bites and a shake. That's it, thank you!
SYSTEM: Prompt prepared successfully. Sending API call...
SYSTEM: Processed API response successfully.
Processing order: Cheeseburger (1), Cheesy Fries (2), Coke (1), Nachos (1), Chicken Bites (2), Chocolate Shake (1)
This project is licensed under the MIT License. See the LICENSE file for details.