100 Days of Gen AI: Day 17

I built Cocktail Apothecary! It’s a site that allows you to specify your drink preferences and then our AI bartender will recommend a cocktail recipe for you.

Here’s the finished product!

see cocktail apothecary in action

You can see it live here: https://cocktails.woolgathering.io/

It uses a simple html page to collect preferences from the user. It then sends these preferences to the ChatGPT API, along with some guidance in how to format the response. Once we get the response back from ChatGPT, we format this as HTML and print it back to the user.

I used ChatGPT to help build the initial frontend and backend server code, then touched it up from there. I chose to use Python since this is the language I work with professionally these days.

The next step if I were to build this out further would be to allow the user to save their list of ingredients and then we could submit this to ChatGPT along with the user’s drink preferences. This would allow the recommendation to reflect the ingredients on hand and save the user a trip to the store. We could persist this to the browser’s local storage so that it will remember your ingredients next time you visit the site (liquor bottles tend to last a long time so presumably your ingredients on hand haven’t changed too much between site visits).

See it on github here: https://github.com/cmonaghan/ai-bartender