Every evening, we want to relax at home in the comfort of our own home. And sometimes, that relaxation can't be complete without a cold drink. A highball is the perfect choice for such moments. However, making a highball with the right proportions is harder than it sounds, so I decided to develop an AI highball machine - a personal bartender for your home.
The appeal of a highball lies in its simplicity and sophisticated flavor. However, achieving the perfect blend of this simple drink requires precise proportions and skill, so I decided to automate this process using a Wiznet Pico POE and a water pump. The idea is simple: use AI to calculate the correct proportions and a water pump to mix the whiskey and soda water in the correct ratio.
Development ProcessPrepare materials: Prepare the necessary materials: Wiznet Pico POE, water pump, tubing, sensors, etc.Design an AI algorithm: Develop a simple AI algorithm to calculate the optimal ratio of highballs.Hardware assembly: Build the circuit around the Wiznet Pico POE and connect the water pump.Software development: Integrate the AI algorithm into the Wiznet Pico POE and write the code to control the water pump.Test and tweak: Make highballs using real whiskey and soda water, adjusting proportions and fine-tuning if necessary.
This project will allow you to quickly and easily enjoy the perfect highball at home. After a busy day, a glass of highballs in the comfort of your own home will bring you a little joy. This project is also a great example of how technology can be applied in everyday life through the fusion of AI and hardware.
Software
- ChatGPT - It utilizes the ChatGPT API to create a chatbot. The key is to give clear instructions in System:Role to make the bot specific to your highball domain.
- To configure the UI, we install the Streamlit library and create a chatbot UI that can talk to the user.
- It indexes the results of the user's conversation with the chatbot and extracts the values for data from the hardware.
- inviare I dati estratti al PicoPOE in modo che l'hardware possa funzionare.
ChatBot function
def generate_response(client, user_input, conversations):
# convert previous conversation history to OpenAI message format
messages = []
messages = [{"role": "system", "content": ins}]
for msg in conversations:
# add separate conversations from the user and the chatbot
if msg.startswith("User: "):
messages.append({"role": "user", "content": msg[len("user: "):]})
elif msg.startswith("Chatbot: "):
messages.append({"role": "assistant", "content": msg[len("chatbot: "):]})
# add a message from the current user
messages.append({"role": "user", "content": user_input})
completion = client.chat.completions.create(
model="gpt-4",
messages=messages,
temperature=0.1,
max_tokens=500
)
return completion.choices[0].message.content.strip()
Prompt Engineering
<persona>
You are Louis, the friendly owner of AI BAR.
</persona>
[instructions]
Your first greeting should be "I'm Louis, the owner of AI Bar, how can I help you"? Please say
1. set up a highball recommendation bot: "You are a bot that recommends highballs based on the mood of the day. You need to empathize with the person's mood, give them a highball recipe, specify the amount of whiskey and other ingredients in ml, and provide a message of hope."
2. Have a natural conversation: "After 2-3 natural conversations, ask them if they would like a highball recommendation."
3. Provide a highball recipe: "Based on their response, provide them with a highball recipe that matches their mood for the day, including the name of the highball and the ingredients in exact ml. The whiskey used in the highball should be based on their suggestion or a whiskey you know."
4. Provide a message of the day: "After providing the recipe, provide a message of the day that matches the person's mood."
Github
#git clone
!git clone https://github.com/jh941213/ChatHighball.git
Hardware
The hardware used in the project above is a Pico POE module, a pico water pump, silicone hoses, and a motor drive. Additional ingredients such as whiskey and tonic water can be used according to your taste.
More than just a beverage maker, the AI Highball Machine is a new way to bring the convenience and enjoyment of technology into our daily lives
more project
https://maker.wiznet.io/louis_m/projects/ai%2Dpoe%2Dmy%2Dhighball/?serob=rd&serterm=month
Comments
Please log in or sign up to comment.