SwigMenu Playwright OpenAI MongoDB
Overview
In this tutorial we are going to scrape the popular Utah "dirty" soda website, Swig, using Playwright, then we are going to feed in our drinks into OpenAI using a prompt and their structured outputs to understand which drinks from their menu are best for various seasons with reasonings, and then save this information into MongoDB Atlas so we can use Atlas Search to find specific drinks based on the fall season and ingredients we are craving.
Part 1: Scrape all menu items from Swig website
Let's first scrape all our menu items from the Swig website. We need to install Playwright and then build out our function.
Collecting playwright Downloading playwright-1.47.0-py3-none-manylinux1_x86_64.whl.metadata (3.5 kB) Collecting greenlet==3.0.3 (from playwright) Downloading greenlet-3.0.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (3.8 kB) Collecting pyee==12.0.0 (from playwright) Downloading pyee-12.0.0-py3-none-any.whl.metadata (2.8 kB) Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from pyee==12.0.0->playwright) (4.12.2) Downloading playwright-1.47.0-py3-none-manylinux1_x86_64.whl (38.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.1/38.1 MB 22.2 MB/s eta 0:00:00 Downloading greenlet-3.0.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (616 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 616.0/616.0 kB 26.4 MB/s eta 0:00:00 Downloading pyee-12.0.0-py3-none-any.whl (14 kB) Installing collected packages: pyee, greenlet, playwright Attempting uninstall: greenlet Found existing installation: greenlet 3.1.1 Uninstalling greenlet-3.1.1: Successfully uninstalled greenlet-3.1.1 Successfully installed greenlet-3.0.3 playwright-1.47.0 pyee-12.0.0 Downloading Chromium 129.0.6668.29 (playwright build v1134) from https://playwright.azureedge.net/builds/chromium/1134/chromium-linux.zip 164 MiB [] 0% 0.0s164 MiB [] 0% 76.6s164 MiB [] 0% 69.2s164 MiB [] 0% 43.4s164 MiB [] 0% 44.2s164 MiB [] 0% 58.3s164 MiB [] 0% 63.7s164 MiB [] 0% 77.6s164 MiB [] 0% 75.8s164 MiB [] 0% 76.1s164 MiB [] 0% 76.6s164 MiB [] 0% 80.0s164 MiB [] 0% 87.5s164 MiB [] 0% 101.8s164 MiB [] 0% 106.0s164 MiB [] 0% 116.6s164 MiB [] 0% 121.2s164 MiB [] 0% 127.5s164 MiB [] 0% 136.0s164 MiB [] 0% 141.1s164 MiB [] 0% 141.7s164 MiB [] 0% 147.5s164 MiB [] 0% 150.8s164 MiB [] 0% 163.9s164 MiB [] 0% 168.9s164 MiB [] 0% 171.6s164 MiB [] 0% 173.7s164 MiB [] 0% 172.8s164 MiB [] 0% 173.4s164 MiB [] 0% 172.0s164 MiB [] 0% 161.9s164 MiB [] 0% 156.4s164 MiB [] 0% 150.1s164 MiB [] 0% 147.8s164 MiB [] 0% 152.1s164 MiB [] 0% 150.7s164 MiB [] 0% 149.8s164 MiB [] 1% 145.8s164 MiB [] 1% 136.8s164 MiB [] 1% 120.9s164 MiB [] 1% 111.8s164 MiB [] 1% 105.7s164 MiB [] 1% 106.4s164 MiB [] 1% 105.4s164 MiB [] 1% 104.5s164 MiB [] 1% 81.5s164 MiB [] 2% 70.5s164 MiB [] 2% 70.6s164 MiB [] 2% 71.0s164 MiB [] 2% 72.7s164 MiB [] 2% 73.0s164 MiB [] 2% 73.3s164 MiB [] 2% 73.4s164 MiB [] 2% 75.1s164 MiB [] 2% 75.6s164 MiB [] 2% 72.7s164 MiB [] 2% 63.0s164 MiB [] 3% 61.1s164 MiB [] 3% 58.0s164 MiB [] 3% 53.1s164 MiB [] 3% 50.8s164 MiB [] 4% 47.5s164 MiB [] 4% 45.3s164 MiB [] 4% 40.1s164 MiB [] 5% 35.9s164 MiB [] 5% 33.0s164 MiB [] 6% 30.6s164 MiB [] 6% 28.7s164 MiB [] 7% 27.4s164 MiB [] 7% 26.5s164 MiB [] 7% 25.2s164 MiB [] 8% 24.8s164 MiB [] 8% 23.7s164 MiB [] 8% 22.5s164 MiB [] 9% 22.0s164 MiB [] 9% 21.2s164 MiB [] 9% 21.1s164 MiB [] 9% 20.6s164 MiB [] 10% 20.3s164 MiB [] 10% 19.6s164 MiB [] 10% 18.9s164 MiB [] 11% 18.0s164 MiB [] 11% 17.9s164 MiB [] 11% 17.6s164 MiB [] 12% 17.3s164 MiB [] 12% 17.5s164 MiB [] 12% 17.2s164 MiB [] 13% 16.9s164 MiB [] 13% 16.5s164 MiB [] 13% 16.4s164 MiB [] 13% 16.0s164 MiB [] 14% 15.8s164 MiB [] 14% 15.2s164 MiB [] 15% 14.6s164 MiB [] 15% 14.4s164 MiB [] 15% 14.3s164 MiB [] 15% 14.1s164 MiB [] 16% 13.8s164 MiB [] 16% 13.5s164 MiB [] 17% 12.9s164 MiB [] 18% 12.2s164 MiB [] 18% 11.8s164 MiB [] 19% 12.0s164 MiB [] 19% 12.2s164 MiB [] 19% 12.3s164 MiB [] 19% 12.1s164 MiB [] 19% 12.0s164 MiB [] 20% 11.7s164 MiB [] 20% 11.5s164 MiB [] 20% 11.4s164 MiB [] 21% 10.9s164 MiB [] 22% 10.5s164 MiB [] 23% 10.2s164 MiB [] 23% 10.0s164 MiB [] 24% 9.7s164 MiB [] 24% 9.4s164 MiB [] 25% 9.2s164 MiB [] 25% 8.9s164 MiB [] 26% 8.8s164 MiB [] 27% 8.5s164 MiB [] 27% 8.3s164 MiB [] 28% 8.0s164 MiB [] 29% 7.8s164 MiB [] 30% 7.5s164 MiB [] 30% 7.4s164 MiB [] 31% 7.2s164 MiB [] 31% 7.0s164 MiB [] 32% 6.8s164 MiB [] 33% 6.5s164 MiB [] 34% 6.3s164 MiB [] 35% 6.2s164 MiB [] 35% 6.0s164 MiB [] 36% 5.9s164 MiB [] 37% 5.7s164 MiB [] 38% 5.6s164 MiB [] 38% 5.4s164 MiB [] 39% 5.2s164 MiB [] 40% 5.1s164 MiB [] 41% 4.9s164 MiB [] 42% 4.8s164 MiB [] 43% 4.6s164 MiB [] 44% 4.5s164 MiB [] 45% 4.3s164 MiB [] 46% 4.1s164 MiB [] 47% 4.0s164 MiB [] 48% 3.9s164 MiB [] 48% 3.8s164 MiB [] 49% 3.7s164 MiB [] 50% 3.6s164 MiB [] 51% 3.5s164 MiB [] 52% 3.4s164 MiB [] 52% 3.3s164 MiB [] 53% 3.2s164 MiB [] 54% 3.2s164 MiB [] 55% 3.1s164 MiB [] 55% 3.0s164 MiB [] 56% 2.9s164 MiB [] 57% 2.8s164 MiB [] 58% 2.7s164 MiB [] 59% 2.6s164 MiB [] 60% 2.6s164 MiB [] 60% 2.5s164 MiB [] 61% 2.5s164 MiB [] 61% 2.4s164 MiB [] 62% 2.4s164 MiB [] 62% 2.3s164 MiB [] 63% 2.3s164 MiB [] 64% 2.2s164 MiB [] 65% 2.2s164 MiB [] 65% 2.1s164 MiB [] 66% 2.0s164 MiB [] 67% 2.0s164 MiB [] 68% 1.9s164 MiB [] 69% 1.9s164 MiB [] 69% 1.8s164 MiB [] 70% 1.8s164 MiB [] 71% 1.7s164 MiB [] 72% 1.6s164 MiB [] 73% 1.6s164 MiB [] 73% 1.5s164 MiB [] 74% 1.5s164 MiB [] 75% 1.4s164 MiB [] 76% 1.4s164 MiB [] 77% 1.3s164 MiB [] 78% 1.2s164 MiB [] 79% 1.2s164 MiB [] 79% 1.1s164 MiB [] 80% 1.1s164 MiB [] 81% 1.0s164 MiB [] 82% 1.0s164 MiB [] 83% 0.9s164 MiB [] 84% 0.8s164 MiB [] 85% 0.8s164 MiB [] 86% 0.7s164 MiB [] 87% 0.7s164 MiB [] 88% 0.6s164 MiB [] 90% 0.5s164 MiB [] 91% 0.4s164 MiB [] 92% 0.4s164 MiB [] 93% 0.4s164 MiB [] 94% 0.3s164 MiB [] 95% 0.2s164 MiB [] 96% 0.2s164 MiB [] 97% 0.1s164 MiB [] 98% 0.1s164 MiB [] 99% 0.0s164 MiB [] 100% 0.0s Chromium 129.0.6668.29 (playwright build v1134) downloaded to /root/.cache/ms-playwright/chromium-1134 Downloading FFMPEG playwright build v1010 from https://playwright.azureedge.net/builds/ffmpeg/1010/ffmpeg-linux.zip 2.3 MiB [] 0% 0.0s2.3 MiB [] 3% 0.5s2.3 MiB [] 9% 0.3s2.3 MiB [] 24% 0.2s2.3 MiB [] 46% 0.1s2.3 MiB [] 61% 0.1s2.3 MiB [] 82% 0.0s2.3 MiB [] 100% 0.0s FFMPEG playwright build v1010 downloaded to /root/.cache/ms-playwright/ffmpeg-1010 Downloading Firefox 130.0 (playwright build v1463) from https://playwright.azureedge.net/builds/firefox/1463/firefox-ubuntu-22.04.zip 86.4 MiB [] 0% 0.0s86.4 MiB [] 0% 15.9s86.4 MiB [] 0% 9.3s86.4 MiB [] 0% 10.2s86.4 MiB [] 1% 11.0s86.4 MiB [] 1% 8.0s86.4 MiB [] 2% 7.6s86.4 MiB [] 2% 6.4s86.4 MiB [] 3% 5.5s86.4 MiB [] 4% 4.8s86.4 MiB [] 4% 4.6s86.4 MiB [] 5% 4.5s86.4 MiB [] 5% 4.3s86.4 MiB [] 6% 4.5s86.4 MiB [] 6% 4.4s86.4 MiB [] 7% 4.2s86.4 MiB [] 8% 4.1s86.4 MiB [] 8% 4.2s86.4 MiB [] 9% 3.9s86.4 MiB [] 9% 3.7s86.4 MiB [] 10% 3.7s86.4 MiB [] 11% 3.3s86.4 MiB [] 13% 3.0s86.4 MiB [] 14% 2.9s86.4 MiB [] 15% 2.6s86.4 MiB [] 17% 2.5s86.4 MiB [] 18% 2.3s86.4 MiB [] 19% 2.2s86.4 MiB [] 21% 2.0s86.4 MiB [] 22% 2.0s86.4 MiB [] 23% 1.9s86.4 MiB [] 24% 1.8s86.4 MiB [] 26% 1.7s86.4 MiB [] 28% 1.6s86.4 MiB [] 29% 1.6s86.4 MiB [] 30% 1.5s86.4 MiB [] 32% 1.5s86.4 MiB [] 35% 1.3s86.4 MiB [] 36% 1.3s86.4 MiB [] 39% 1.2s86.4 MiB [] 41% 1.1s86.4 MiB [] 42% 1.1s86.4 MiB [] 44% 1.0s86.4 MiB [] 46% 1.0s86.4 MiB [] 47% 0.9s86.4 MiB [] 49% 0.9s86.4 MiB [] 50% 0.9s86.4 MiB [] 52% 0.8s86.4 MiB [] 54% 0.8s86.4 MiB [] 55% 0.7s86.4 MiB [] 57% 0.7s86.4 MiB [] 59% 0.6s86.4 MiB [] 61% 0.6s86.4 MiB [] 63% 0.6s86.4 MiB [] 65% 0.5s86.4 MiB [] 67% 0.5s86.4 MiB [] 68% 0.5s86.4 MiB [] 70% 0.5s86.4 MiB [] 71% 0.4s86.4 MiB [] 72% 0.4s86.4 MiB [] 73% 0.4s86.4 MiB [] 75% 0.4s86.4 MiB [] 76% 0.3s86.4 MiB [] 78% 0.3s86.4 MiB [] 79% 0.3s86.4 MiB [] 81% 0.3s86.4 MiB [] 82% 0.3s86.4 MiB [] 83% 0.2s86.4 MiB [] 85% 0.2s86.4 MiB [] 87% 0.2s86.4 MiB [] 89% 0.2s86.4 MiB [] 90% 0.1s86.4 MiB [] 92% 0.1s86.4 MiB [] 94% 0.1s86.4 MiB [] 96% 0.0s86.4 MiB [] 98% 0.0s86.4 MiB [] 100% 0.0s Firefox 130.0 (playwright build v1463) downloaded to /root/.cache/ms-playwright/firefox-1463 Downloading Webkit 18.0 (playwright build v2070) from https://playwright.azureedge.net/builds/webkit/2070/webkit-ubuntu-22.04.zip 88.2 MiB [] 0% 0.0s88.2 MiB [] 0% 34.2s88.2 MiB [] 0% 35.9s88.2 MiB [] 0% 22.6s88.2 MiB [] 0% 19.1s88.2 MiB [] 0% 23.4s88.2 MiB [] 0% 24.6s88.2 MiB [] 0% 24.5s88.2 MiB [] 0% 23.6s88.2 MiB [] 0% 22.9s88.2 MiB [] 0% 26.2s88.2 MiB [] 0% 25.0s88.2 MiB [] 1% 20.2s88.2 MiB [] 1% 25.0s88.2 MiB [] 1% 35.7s88.2 MiB [] 1% 38.3s88.2 MiB [] 1% 40.7s88.2 MiB [] 1% 43.0s88.2 MiB [] 1% 43.2s88.2 MiB [] 1% 43.4s88.2 MiB [] 1% 44.6s88.2 MiB [] 1% 50.6s88.2 MiB [] 1% 52.2s88.2 MiB [] 1% 53.1s88.2 MiB [] 1% 53.4s88.2 MiB [] 1% 53.6s88.2 MiB [] 1% 52.9s88.2 MiB [] 1% 52.3s88.2 MiB [] 2% 49.9s88.2 MiB [] 2% 49.4s88.2 MiB [] 2% 48.8s88.2 MiB [] 2% 47.9s88.2 MiB [] 2% 45.9s88.2 MiB [] 2% 43.9s88.2 MiB [] 2% 42.2s88.2 MiB [] 2% 41.3s88.2 MiB [] 2% 40.5s88.2 MiB [] 3% 37.8s88.2 MiB [] 3% 36.4s88.2 MiB [] 3% 33.9s88.2 MiB [] 3% 34.0s88.2 MiB [] 3% 33.8s88.2 MiB [] 3% 32.7s88.2 MiB [] 4% 32.2s88.2 MiB [] 4% 30.5s88.2 MiB [] 4% 30.3s88.2 MiB [] 4% 29.7s88.2 MiB [] 5% 27.2s88.2 MiB [] 5% 27.0s88.2 MiB [] 5% 27.2s88.2 MiB [] 5% 27.0s88.2 MiB [] 5% 26.5s88.2 MiB [] 5% 25.4s88.2 MiB [] 5% 25.2s88.2 MiB [] 6% 23.7s88.2 MiB [] 6% 23.4s88.2 MiB [] 6% 22.1s88.2 MiB [] 7% 21.0s88.2 MiB [] 7% 20.4s88.2 MiB [] 7% 19.7s88.2 MiB [] 8% 19.0s88.2 MiB [] 8% 18.6s88.2 MiB [] 9% 17.2s88.2 MiB [] 9% 17.1s88.2 MiB [] 9% 17.2s88.2 MiB [] 9% 16.7s88.2 MiB [] 10% 15.6s88.2 MiB [] 10% 14.7s88.2 MiB [] 10% 14.6s88.2 MiB [] 11% 14.6s88.2 MiB [] 11% 14.8s88.2 MiB [] 11% 14.9s88.2 MiB [] 11% 14.8s88.2 MiB [] 11% 14.9s88.2 MiB [] 11% 14.8s88.2 MiB [] 12% 13.9s88.2 MiB [] 12% 14.0s88.2 MiB [] 12% 13.8s88.2 MiB [] 13% 13.1s88.2 MiB [] 14% 12.2s88.2 MiB [] 15% 11.3s88.2 MiB [] 16% 10.7s88.2 MiB [] 17% 10.3s88.2 MiB [] 18% 9.9s88.2 MiB [] 18% 9.8s88.2 MiB [] 18% 9.9s88.2 MiB [] 19% 10.0s88.2 MiB [] 19% 10.1s88.2 MiB [] 19% 10.2s88.2 MiB [] 19% 10.1s88.2 MiB [] 19% 10.2s88.2 MiB [] 20% 10.2s88.2 MiB [] 20% 10.3s88.2 MiB [] 20% 10.2s88.2 MiB [] 20% 10.5s88.2 MiB [] 20% 10.6s88.2 MiB [] 20% 10.5s88.2 MiB [] 21% 10.5s88.2 MiB [] 21% 10.1s88.2 MiB [] 22% 9.9s88.2 MiB [] 23% 9.6s88.2 MiB [] 23% 9.3s88.2 MiB [] 24% 9.2s88.2 MiB [] 24% 9.0s88.2 MiB [] 25% 8.8s88.2 MiB [] 25% 8.5s88.2 MiB [] 26% 8.1s88.2 MiB [] 27% 8.3s88.2 MiB [] 27% 8.2s88.2 MiB [] 28% 8.1s88.2 MiB [] 28% 8.0s88.2 MiB [] 29% 7.8s88.2 MiB [] 29% 7.6s88.2 MiB [] 30% 7.6s88.2 MiB [] 30% 7.5s88.2 MiB [] 30% 7.4s88.2 MiB [] 31% 7.3s88.2 MiB [] 31% 7.2s88.2 MiB [] 32% 7.1s88.2 MiB [] 32% 7.0s88.2 MiB [] 32% 6.9s88.2 MiB [] 33% 6.7s88.2 MiB [] 33% 6.8s88.2 MiB [] 33% 6.9s88.2 MiB [] 34% 6.8s88.2 MiB [] 34% 6.7s88.2 MiB [] 35% 6.7s88.2 MiB [] 35% 6.8s88.2 MiB [] 35% 6.7s88.2 MiB [] 35% 6.6s88.2 MiB [] 36% 6.5s88.2 MiB [] 36% 6.4s88.2 MiB [] 37% 6.3s88.2 MiB [] 37% 6.2s88.2 MiB [] 38% 6.2s88.2 MiB [] 38% 6.1s88.2 MiB [] 39% 6.0s88.2 MiB [] 40% 5.8s88.2 MiB [] 41% 5.7s88.2 MiB [] 42% 5.5s88.2 MiB [] 42% 5.4s88.2 MiB [] 43% 5.3s88.2 MiB [] 43% 5.2s88.2 MiB [] 44% 5.1s88.2 MiB [] 45% 5.0s88.2 MiB [] 46% 4.8s88.2 MiB [] 47% 4.5s88.2 MiB [] 48% 4.3s88.2 MiB [] 50% 4.1s88.2 MiB [] 52% 3.8s88.2 MiB [] 53% 3.7s88.2 MiB [] 53% 3.6s88.2 MiB [] 54% 3.5s88.2 MiB [] 55% 3.5s88.2 MiB [] 55% 3.4s88.2 MiB [] 56% 3.4s88.2 MiB [] 56% 3.3s88.2 MiB [] 57% 3.2s88.2 MiB [] 58% 3.1s88.2 MiB [] 60% 2.9s88.2 MiB [] 61% 2.9s88.2 MiB [] 61% 2.8s88.2 MiB [] 62% 2.7s88.2 MiB [] 63% 2.6s88.2 MiB [] 64% 2.5s88.2 MiB [] 65% 2.4s88.2 MiB [] 66% 2.3s88.2 MiB [] 67% 2.2s88.2 MiB [] 68% 2.1s88.2 MiB [] 69% 2.1s88.2 MiB [] 70% 2.0s88.2 MiB [] 70% 1.9s88.2 MiB [] 71% 1.9s88.2 MiB [] 72% 1.8s88.2 MiB [] 73% 1.7s88.2 MiB [] 74% 1.6s88.2 MiB [] 75% 1.5s88.2 MiB [] 76% 1.4s88.2 MiB [] 78% 1.4s88.2 MiB [] 79% 1.3s88.2 MiB [] 80% 1.2s88.2 MiB [] 81% 1.1s88.2 MiB [] 82% 1.1s88.2 MiB [] 83% 1.0s88.2 MiB [] 85% 0.9s88.2 MiB [] 86% 0.8s88.2 MiB [] 87% 0.7s88.2 MiB [] 88% 0.7s88.2 MiB [] 89% 0.6s88.2 MiB [] 90% 0.6s88.2 MiB [] 90% 0.5s88.2 MiB [] 91% 0.5s88.2 MiB [] 92% 0.4s88.2 MiB [] 93% 0.3s88.2 MiB [] 95% 0.2s88.2 MiB [] 96% 0.2s88.2 MiB [] 98% 0.1s88.2 MiB [] 99% 0.0s88.2 MiB [] 100% 0.0s Webkit 18.0 (playwright build v2070) downloaded to /root/.cache/ms-playwright/webkit-2070 Playwright Host validation warning: ╔══════════════════════════════════════════════════════╗ ║ Host system is missing dependencies to run browsers. ║ ║ Missing libraries: ║ ║ libwoff2dec.so.1.0.2 ║ ║ libgstgl-1.0.so.0 ║ ║ libgstcodecparsers-1.0.so.0 ║ ║ libharfbuzz-icu.so.0 ║ ║ libenchant-2.so.2 ║ ║ libsecret-1.so.0 ║ ║ libhyphen.so.0 ║ ║ libmanette-0.2.so.0 ║ ╚══════════════════════════════════════════════════════╝ at validateDependenciesLinux (/usr/local/lib/python3.10/dist-packages/playwright/driver/package/lib/server/registry/dependencies.js:216:9) at async Registry._validateHostRequirements (/usr/local/lib/python3.10/dist-packages/playwright/driver/package/lib/server/registry/index.js:626:43) at async Registry._validateHostRequirementsForExecutableIfNeeded (/usr/local/lib/python3.10/dist-packages/playwright/driver/package/lib/server/registry/index.js:724:7) at async Registry.validateHostRequirementsForExecutablesIfNeeded (/usr/local/lib/python3.10/dist-packages/playwright/driver/package/lib/server/registry/index.js:713:43) at async t.<anonymous> (/usr/local/lib/python3.10/dist-packages/playwright/driver/package/lib/cli/program.js:119:7)
We have to use async since we are using Google Colab. If you're not using a notebook you can use sync instead. Please refer to the article written to understand where our selectors came from.
We are using the URL that is inside of the websites iframe, and we are using selectors to make sure we are waiting for the information we want to load. We want to grab the name of each menu item along with its description. Please refer to the written article to understand this function better if necessary!
Name: , Description:
Name: Soda, Description: Create Your Own Dirty Soda:
Soda + Flavors, Fruits, & Creams
Name: DDD, Description: Diet Dr Pepper + Coconut (25 - 70 Calories)
Name: Dirty Dr Pepper, Description: Dr Pepper + Coconut (120 - 440 Calories)
Name: Dirty S.O.P, Description: Dr Pepper + Coconut + Peach (120 - 440 Calories)
Name: Dr Spice, Description: Dr Pepper + Cinnamon + Coconut + Cinnamon Stick + Half & Half (140 - 490 Calories)
Name: Life's a Peach, Description: Dr Pepper + Vanilla + Peach + Half & Half (130 - 480 Calories)
Name: Naughty & Nice, Description: Dr Pepper + English Toffee + Half & Half (130 - 470 Calories)
Name: Princess Peach, Description: Dr Pepper + Peach + Coconut Cream (140 - 510 Calories)
Name: Raspberry Dream, Description: Dr Pepper + Raspberry Puree + Coconut Cream (150 - 550 Calories)
Name: Save Me Jade, Description: Diet Dr Pepper + Sugar Free Vanilla + Sugar Free Coconut (0 Calories)
Name: Spring Fling, Description: Dr Pepper + Vanilla + Strawberry Puree + Coconut Cream (170 - 610 Calories)
Name: Texas Tab, Description: Dr Pepper + Vanilla + Coconut Cream (140 - 500 Calories)
Name: The Heartbreaker, Description: Dr Pepper + Blackberry + Coconut + Half & Half (130 - 470 Calories)
Name: The Ring King, Description: Dr Pepper + Cupcake + Strawberry Puree + Vanilla Cream (170 - 620 Calories)
Name: Big Al, Description: Diet Coke + Coconut + Fresh Lime (15 - 40 Calories)
Name: This Bliss, Description: Diet Coke + Cranberry + Fresh Lime (25 - 80 Calories)
Name: The Founder, Description: Diet Coke + Sugar Free Coconut + Fresh Lime + Coconut Cream (20 - 80 Calories)
Name: Just Peachy, Description: Coke Zero Sugar + Pineapple + Peach Puree + Fresh Lime + Coconut Cream (60 - 220 Calories)
Name: Waikiki, Description: Coke + Pineapple + Coconut Cream (150 - 540 Calories)
Name: Cherry Bomb, Description: Pepsi + Cherry + Coconut + Vanilla Cream (150 - 520 Calories)
Name: Beach Babe, Description: Mountain Dew + Raspberry + Peach + Vanilla Cream (160 - 570 Calories)
Name: Bloody Wild, Description: Mountain Dew + Mango Puree + Strawberry Puree (150 - 590 Calories)
Name: Dew Gooder, Description: Mountain Dew + Pineapple + Fresh Lime + Raspberry Puree + Coconut Cream (170 - 650 Calories)
Name: Endless Summer, Description: Mountain Dew + Pomegranate + Grapefruit + Fresh Lime (140 - 500 Calories)
Name: Guava Have It!, Description: Mountain Dew + Guava + Strawberry + Coconut Cream (160 - 560 Calories)
Name: Jolly Elf, Description: Mountain Dew + Passion Fruit + Strawberry Puree + Fresh Orange (160 - 590 Calories)
Name: The Rocket, Description: Mountain Dew + Raspberry + Coconut + Blackberry + Vanilla Cream (160 - 570 Calories)
Name: Watermelon Sugar, Description: Mountain Dew + Mango + Watermelon + Coconut Cream + Passion Fruit Popping Pearls (180 - 590 Calories)
Name: Hula Girl, Description: Sprite + Lemonade + Mango + Pineapple + Strawberry + Coconut Cream (160 - 600 Calories)
Name: Loop-T-Loop, Description: Sprite + Strawberry + Watermelon + Peach (120 - 500 Calories)
Name: Poppin' Pineapple, Description: Sprite + Pineapple + Watermelon + Strawberry Popping Pearls (150 - 520 Calories)
Name: Riptide, Description: Sprite + Cranberry + Raspberry Puree + Fresh Lime (140 - 590 Calories)
Name: Shark Attack, Description: Sprite + Lemonade + Blue Raspberry + Gummy Shark (140 - 460 Calories)
Name: Unlucky Ducky, Description: Sprite + Lemonade + Strawberry + Gummy Shark (140 - 450 Calories)
Name: Beach Bum, Description: Lemonade + Guava + Grapefruit + Fresh Orange
Name: The Tropic, Description: Lemonade + Mango + Passion Fruit + Vanilla Cream
Name: Buttery Beer, Description: Root Beer + Butterscotch + Vanilla Creme (140 - 490 Calories)
Name: Happy Camper, Description: Root Beer + Toasted Marshmallow + Half & Half (130 - 460 Calories)
Name: Cinnamon Cider, Description: Ginger Ale + Lemonade + Cinnamon + Apple + Cinnamon Stick (190 - 460 Calories)
Name: Island Time, Description: Fresca + Passion Fruit + Fresh Orange + Mango Puree + Coconut Cream (60 - 240 Calories)
Name: Pink Bahama, Description: Fresca + Peach + Strawberry+ Raspberry + Fresh Lemon (25 - 80 Calories)
Name: Sleigh All Day, Description: Fresca + Lemonade + Pomegranate + Peach + Strawberry Puree + Fresh Lemon (60 - 200 Calories)
Name: Reviver, Description: Create Your Own
Reviver Energy + Flavors, Fruits, & Creams
Name: Drama Queen, Description: Sugar Free Reviver Energy + Sugar Free Strawberry + Sugar Free Peach + Sugar Free Coconut + Light Lemonade (80 - 210 Calories)
Name: Mountain Man, Description: Reviver Energy + Blackberry + Coconut + Fresh Lime + Half & Half + Mountain Dew (290 - 630 Calories)
Name: P.O.G., Description: Reviver Energy + Passion Fruit + Guava + Fresh Orange (220 - 430 Calories)
Name: Ride or Die, Description: Reviver Energy + Peach + Pineapple + Coconut Cream (230 - 480 Calories)
Name: Super Trooper, Description: Reviver Energy + Lemonade + Mango + Strawberry Puree + Coconut Cream (340 - 760 Calories)
Name: Surf's Up, Description: Reviver Energy + Lemonade + Peach + Mango + Raspberry + Fresh Orange (280 - 560 Calories)
Name: Weekender, Description: Reviver + Strawberry + Coconut + Coconut Cream + Sprite (280 - 580 Calories)
Name: All Star, Description: Blended Reviver Energy + Lemonade + Guava + Strawberry + Coconut Cream (280 - 550 Calories)
Name: Cloud 9, Description: Blended Reviver Energy + Mountain Dew + Coconut + Pineapple + Blue Raspberry + Half & Half (280 - 550 Calories)
Name: Daisy Duke, Description: Blended Reviver Energy + Mountain Dew + Pineapple + Strawberry Puree + Coconut Cream (390 - 760 Calories)
Name: Flirty Flamango, Description: Blended Reviver Energy + Sprite + Grapefruit + Pineapple + Mango Puree + Coconut Cream (300 - 600 Calories)
Name: Peaches n Cream, Description: Blended Reviver Energy + Sprite + Peach Puree + Vanilla Cream (250 - 500 Calories)
Name: Polar Punch, Description: Blended Reviver Energy + Ginger Ale + Blackberry + Strawberry + Raspberry + Vanilla Cream (270 - 540 Calories)
Name: Sucker Punch, Description: Blended Reviver Energy + Lemonade + Grapefruit + Mango (250 - 490 Calories)
Name: Refresher, Description: Create Your Own: Water + Flavors, Fruits, & Creams
Name: Autumn Blush, Description: Water + Apple + Raspberry + Mango Puree + Vanilla Cream (120 - 420 Calories)
Name: Berry Nice, Description: Water + Sugar Free Strawberry + Fresh Lime (0 - 10 Calories)
Name: Berry Swigmas, Description: Water + Cranberry + Sugar Free Vanilla + Fresh Orange (30 - 90 Calories)
Name: Fruit Water, Description: Water + Sugar Free Coconut + Sugar Free Vanilla + Frozen Strawberry + Frozen Mango (25 - 80 Calories)
Name: Mango Breeze, Description: Water + Sugar Free Coconut + Sugar Free Vanilla + Mango Puree + Frozen Mango + Coconut Cream (110 - 340 Calories)
Name: Pretty in Pink, Description: Water + Guava + Grapefruit + Fresh Orange (50 - 140 Calories)
Name: Sandy Cheeks, Description: Water + Sugar Free Peach + Fresh Lemon (0 - 5 Calories)
Name: Strawberry Breeze, Description: Water + Sugar Free Coconut + Sugar Free Vanilla + Strawberry Puree + Frozen Strawberry + Coconut Cream (90 - 310 Calories)
Name: Summer Splash, Description: Water + Sugar Free Pineapple + Strawberry Puree + Fresh Lemon (60 - 230 Calories)
Name: Tiki Tiki, Description: Water + Sugar Free Coconut + Fresh Orange (10 - 25 Calories)
Name: The Fighter, Description: Water + Sugar Free Vanilla + Sugar Free Peach + Sugar Free Pineapple + Fresh Lime + Raspberry Puree (60 - 230 Calories)
Name: Unbreakable, Description: Water + Grapefruit + Mango Puree + Fresh Lemon (100 - 350 Calories)
Name: Water Cup, Description: Cup of Water or Ice
Name: Salted Pretzel Bites, Description: Warm, buttery, salted pretzel bits. (410 Calories)
Name: Strawberry Cream Cheese, Description: Cold Strawberry Cream Cheese Dip. Great for a morning snack. Makes the pretzel bites taste like a delicious bagel. (60 Calories)
Name: White Cheddar, Description: Warm White Cheddar Cheese Dip (110 Calories)
Name: Sugar Cookie, Description: 410 Calories
Name: Kid's Cookie, Description: One mini frosted Sugar Cookie (240 Calories)
Name: Chocolate Chip - Mini, Description: Mini Chocolate Chip Cookies made with a mix of milk chocolate and semi-sweet chips. Available in a Cup (12 mini's - 600 Calories) or Party Pack (60 minis).
Name: Pumpkin Chocolate Chip - Mini, Description: Mini Pumpkin Chocolate Chip Cookies are back for a limited time! You will not want to miss our most anticipated cookie of the year! Available in a Cup (6 mini's - 480 Calories) or Party Pack (30 minis).
Name: Hot - Hot Chocolate, Description:
Name: Frozen - Hot Chocolate, Description: Create Your Own:
Frozen Hot Chocolate + Flavors, Fruits, & Creams
[{'name': '', 'description': ''}, {'name': 'Soda', 'description': 'Create Your Own Dirty Soda:\nSoda + Flavors, Fruits, & Creams'}, {'name': 'DDD', 'description': 'Diet Dr Pepper + Coconut (25 - 70 Calories)'}, {'name': 'Dirty Dr Pepper', 'description': 'Dr Pepper + Coconut (120 - 440 Calories)'}, {'name': 'Dirty S.O.P', 'description': 'Dr Pepper + Coconut + Peach (120 - 440 Calories)'}, {'name': 'Dr Spice', 'description': 'Dr Pepper + Cinnamon + Coconut + Cinnamon Stick + Half & Half (140 - 490 Calories)'}, {'name': "Life's a Peach", 'description': 'Dr Pepper + Vanilla + Peach + Half & Half (130 - 480 Calories)'}, {'name': 'Naughty & Nice', 'description': 'Dr Pepper + English Toffee + Half & Half (130 - 470 Calories)'}, {'name': 'Princess Peach', 'description': 'Dr Pepper + Peach + Coconut Cream (140 - 510 Calories)'}, {'name': 'Raspberry Dream', 'description': 'Dr Pepper + Raspberry Puree + Coconut Cream (150 - 550 Calories)'}, {'name': 'Save Me Jade', 'description': 'Diet Dr Pepper + Sugar Free Vanilla + Sugar Free Coconut (0 Calories)'}, {'name': 'Spring Fling', 'description': 'Dr Pepper + Vanilla + Strawberry Puree + Coconut Cream (170 - 610 Calories)'}, {'name': 'Texas Tab', 'description': 'Dr Pepper + Vanilla + Coconut Cream (140 - 500 Calories)'}, {'name': 'The Heartbreaker', 'description': 'Dr Pepper + Blackberry + Coconut + Half & Half (130 - 470 Calories)'}, {'name': 'The Ring King', 'description': 'Dr Pepper + Cupcake + Strawberry Puree + Vanilla Cream (170 - 620 Calories)'}, {'name': 'Big Al', 'description': 'Diet Coke + Coconut + Fresh Lime (15 - 40 Calories)'}, {'name': 'This Bliss', 'description': 'Diet Coke + Cranberry + Fresh Lime (25 - 80 Calories)'}, {'name': 'The Founder', 'description': 'Diet Coke + Sugar Free Coconut + Fresh Lime + Coconut Cream (20 - 80 Calories)'}, {'name': 'Just Peachy', 'description': 'Coke Zero Sugar + Pineapple + Peach Puree + Fresh Lime + Coconut Cream (60 - 220 Calories)'}, {'name': 'Waikiki', 'description': 'Coke + Pineapple + Coconut Cream (150 - 540 Calories)'}, {'name': 'Cherry Bomb', 'description': 'Pepsi + Cherry + Coconut + Vanilla Cream (150 - 520 Calories)'}, {'name': 'Beach Babe', 'description': 'Mountain Dew + Raspberry + Peach + Vanilla Cream (160 - 570 Calories)'}, {'name': 'Bloody Wild', 'description': 'Mountain Dew + Mango Puree + Strawberry Puree (150 - 590 Calories)'}, {'name': 'Dew Gooder', 'description': 'Mountain Dew + Pineapple + Fresh Lime + Raspberry Puree + Coconut Cream (170 - 650 Calories)'}, {'name': 'Endless Summer', 'description': 'Mountain Dew + Pomegranate + Grapefruit + Fresh Lime (140 - 500 Calories)'}, {'name': 'Guava Have It!', 'description': 'Mountain Dew + Guava + Strawberry + Coconut Cream (160 - 560 Calories)'}, {'name': 'Jolly Elf', 'description': 'Mountain Dew + Passion Fruit + Strawberry Puree + Fresh Orange (160 - 590 Calories)'}, {'name': 'The Rocket', 'description': 'Mountain Dew + Raspberry + Coconut + Blackberry + Vanilla Cream (160 - 570 Calories)'}, {'name': 'Watermelon Sugar', 'description': 'Mountain Dew + Mango + Watermelon + Coconut Cream + Passion Fruit Popping Pearls (180 - 590 Calories)'}, {'name': 'Hula Girl', 'description': 'Sprite + Lemonade + Mango + Pineapple + Strawberry + Coconut Cream (160 - 600 Calories)'}, {'name': 'Loop-T-Loop', 'description': 'Sprite + Strawberry + Watermelon + Peach (120 - 500 Calories)'}, {'name': "Poppin' Pineapple", 'description': 'Sprite + Pineapple + Watermelon + Strawberry Popping Pearls (150 - 520 Calories)'}, {'name': 'Riptide', 'description': 'Sprite + Cranberry + Raspberry Puree + Fresh Lime (140 - 590 Calories)'}, {'name': 'Shark Attack', 'description': 'Sprite + Lemonade + Blue Raspberry + Gummy Shark (140 - 460 Calories)'}, {'name': 'Unlucky Ducky', 'description': 'Sprite + Lemonade + Strawberry + Gummy Shark (140 - 450 Calories)'}, {'name': 'Beach Bum', 'description': 'Lemonade + Guava + Grapefruit + Fresh Orange'}, {'name': 'The Tropic', 'description': 'Lemonade + Mango + Passion Fruit + Vanilla Cream'}, {'name': 'Buttery Beer', 'description': 'Root Beer + Butterscotch + Vanilla Creme (140 - 490 Calories)'}, {'name': 'Happy Camper', 'description': 'Root Beer + Toasted Marshmallow + Half & Half (130 - 460 Calories)'}, {'name': 'Cinnamon Cider', 'description': 'Ginger Ale + Lemonade + Cinnamon + Apple + Cinnamon Stick (190 - 460 Calories)'}, {'name': 'Island Time', 'description': 'Fresca + Passion Fruit + Fresh Orange + Mango Puree + Coconut Cream (60 - 240 Calories)'}, {'name': 'Pink Bahama', 'description': 'Fresca + Peach + Strawberry+ Raspberry + Fresh Lemon (25 - 80 Calories)'}, {'name': 'Sleigh All Day', 'description': 'Fresca + Lemonade + Pomegranate + Peach + Strawberry Puree + Fresh Lemon (60 - 200 Calories)'}, {'name': 'Reviver', 'description': 'Create Your Own\nReviver Energy + Flavors, Fruits, & Creams'}, {'name': 'Drama Queen', 'description': 'Sugar Free Reviver Energy + Sugar Free Strawberry + Sugar Free Peach + Sugar Free Coconut + Light Lemonade (80 - 210 Calories)'}, {'name': 'Mountain Man', 'description': 'Reviver Energy + Blackberry + Coconut + Fresh Lime + Half & Half + Mountain Dew (290 - 630 Calories)'}, {'name': 'P.O.G.', 'description': 'Reviver Energy + Passion Fruit + Guava + Fresh Orange (220 - 430 Calories)'}, {'name': 'Ride or Die', 'description': 'Reviver Energy + Peach + Pineapple + Coconut Cream (230 - 480 Calories)'}, {'name': 'Super Trooper', 'description': 'Reviver Energy + Lemonade + Mango + Strawberry Puree + Coconut Cream (340 - 760 Calories)'}, {'name': "Surf's Up", 'description': 'Reviver Energy + Lemonade + Peach + Mango + Raspberry + Fresh Orange (280 - 560 Calories)'}, {'name': 'Weekender', 'description': 'Reviver + Strawberry + Coconut + Coconut Cream + Sprite (280 - 580 Calories)'}, {'name': 'All Star', 'description': 'Blended Reviver Energy + Lemonade + Guava + Strawberry + Coconut Cream (280 - 550 Calories)'}, {'name': 'Cloud 9', 'description': 'Blended Reviver Energy + Mountain Dew + Coconut + Pineapple + Blue Raspberry + Half & Half (280 - 550 Calories)'}, {'name': 'Daisy Duke', 'description': 'Blended Reviver Energy + Mountain Dew + Pineapple + Strawberry Puree + Coconut Cream (390 - 760 Calories)'}, {'name': 'Flirty Flamango', 'description': 'Blended Reviver Energy + Sprite + Grapefruit + Pineapple + Mango Puree + Coconut Cream (300 - 600 Calories)'}, {'name': 'Peaches n Cream', 'description': 'Blended Reviver Energy + Sprite + Peach Puree + Vanilla Cream (250 - 500 Calories)'}, {'name': 'Polar Punch', 'description': 'Blended Reviver Energy + Ginger Ale + Blackberry + Strawberry + Raspberry + Vanilla Cream (270 - 540 Calories)'}, {'name': 'Sucker Punch', 'description': 'Blended Reviver Energy + Lemonade + Grapefruit + Mango (250 - 490 Calories)'}, {'name': 'Refresher', 'description': 'Create Your Own: Water + Flavors, Fruits, & Creams'}, {'name': 'Autumn Blush', 'description': 'Water + Apple + Raspberry + Mango Puree + Vanilla Cream (120 - 420 Calories)'}, {'name': 'Berry Nice', 'description': 'Water + Sugar Free Strawberry + Fresh Lime (0 - 10 Calories)'}, {'name': 'Berry Swigmas', 'description': 'Water + Cranberry + Sugar Free Vanilla + Fresh Orange (30 - 90 Calories)'}, {'name': 'Fruit Water', 'description': 'Water + Sugar Free Coconut + Sugar Free Vanilla + Frozen Strawberry + Frozen Mango (25 - 80 Calories)'}, {'name': 'Mango Breeze', 'description': 'Water + Sugar Free Coconut + Sugar Free Vanilla + Mango Puree + Frozen Mango + Coconut Cream (110 - 340 Calories)'}, {'name': 'Pretty in Pink', 'description': 'Water + Guava + Grapefruit + Fresh Orange (50 - 140 Calories)'}, {'name': 'Sandy Cheeks', 'description': 'Water + Sugar Free Peach + Fresh Lemon (0 - 5 Calories)'}, {'name': 'Strawberry Breeze', 'description': 'Water + Sugar Free Coconut + Sugar Free Vanilla + Strawberry Puree + Frozen Strawberry + Coconut Cream (90 - 310 Calories)'}, {'name': 'Summer Splash', 'description': 'Water + Sugar Free Pineapple + Strawberry Puree + Fresh Lemon (60 - 230 Calories)'}, {'name': 'Tiki Tiki', 'description': 'Water + Sugar Free Coconut + Fresh Orange (10 - 25 Calories)'}, {'name': 'The Fighter', 'description': 'Water + Sugar Free Vanilla + Sugar Free Peach + Sugar Free Pineapple + Fresh Lime + Raspberry Puree (60 - 230 Calories)'}, {'name': 'Unbreakable', 'description': 'Water + Grapefruit + Mango Puree + Fresh Lemon (100 - 350 Calories)'}, {'name': 'Water Cup', 'description': 'Cup of Water or Ice'}, {'name': 'Salted Pretzel Bites', 'description': 'Warm, buttery, salted pretzel bits. (410 Calories)'}, {'name': 'Strawberry Cream Cheese', 'description': 'Cold Strawberry Cream Cheese Dip. Great for a morning snack. Makes the pretzel bites taste like a delicious bagel. (60 Calories)'}, {'name': 'White Cheddar', 'description': 'Warm White Cheddar Cheese Dip (110 Calories)'}, {'name': 'Sugar Cookie', 'description': '410 Calories'}, {'name': "Kid's Cookie", 'description': 'One mini frosted Sugar Cookie (240 Calories)'}, {'name': 'Chocolate Chip - Mini', 'description': "Mini Chocolate Chip Cookies made with a mix of milk chocolate and semi-sweet chips. Available in a Cup (12 mini's - 600 Calories) or Party Pack (60 minis)."}, {'name': 'Pumpkin Chocolate Chip - Mini', 'description': "Mini Pumpkin Chocolate Chip Cookies are back for a limited time! You will not want to miss our most anticipated cookie of the year! Available in a Cup (6 mini's - 480 Calories) or Party Pack (30 minis)."}, {'name': 'Hot - Hot Chocolate', 'description': ''}, {'name': 'Frozen - Hot Chocolate', 'description': 'Create Your Own:\nFrozen Hot Chocolate + Flavors, Fruits, & Creams'}]
Now that we have all of our menu options, let's use OpenAI to tell us which drinks are best for fall based on their descriptions.
Step 2: OpenAI Structured Schema Outputs
Please refer to the documentation to understand OpenAI's structured schema outputs. We want to emulate the section where they are extracting structured data from unstructured data.
Collecting openai Downloading openai-1.48.0-py3-none-any.whl.metadata (24 kB) Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.10/dist-packages (from openai) (3.7.1) Requirement already satisfied: distro<2,>=1.7.0 in /usr/lib/python3/dist-packages (from openai) (1.7.0) Collecting httpx<1,>=0.23.0 (from openai) Downloading httpx-0.27.2-py3-none-any.whl.metadata (7.1 kB) Collecting jiter<1,>=0.4.0 (from openai) Downloading jiter-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.6 kB) Requirement already satisfied: pydantic<3,>=1.9.0 in /usr/local/lib/python3.10/dist-packages (from openai) (2.9.2) Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from openai) (1.3.1) Requirement already satisfied: tqdm>4 in /usr/local/lib/python3.10/dist-packages (from openai) (4.66.5) Requirement already satisfied: typing-extensions<5,>=4.11 in /usr/local/lib/python3.10/dist-packages (from openai) (4.12.2) Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.10/dist-packages (from anyio<5,>=3.5.0->openai) (3.10) Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5,>=3.5.0->openai) (1.2.2) Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->openai) (2024.8.30) Collecting httpcore==1.* (from httpx<1,>=0.23.0->openai) Downloading httpcore-1.0.5-py3-none-any.whl.metadata (20 kB) Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx<1,>=0.23.0->openai) Downloading h11-0.14.0-py3-none-any.whl.metadata (8.2 kB) Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from pydantic<3,>=1.9.0->openai) (0.7.0) Requirement already satisfied: pydantic-core==2.23.4 in /usr/local/lib/python3.10/dist-packages (from pydantic<3,>=1.9.0->openai) (2.23.4) Downloading openai-1.48.0-py3-none-any.whl (376 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 376.1/376.1 kB 10.2 MB/s eta 0:00:00 Downloading httpx-0.27.2-py3-none-any.whl (76 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.4/76.4 kB 6.9 MB/s eta 0:00:00 Downloading httpcore-1.0.5-py3-none-any.whl (77 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.9/77.9 kB 6.7 MB/s eta 0:00:00 Downloading jiter-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (318 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 318.9/318.9 kB 22.9 MB/s eta 0:00:00 Downloading h11-0.14.0-py3-none-any.whl (58 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 4.6 MB/s eta 0:00:00 Installing collected packages: jiter, h11, httpcore, httpx, openai Successfully installed h11-0.14.0 httpcore-1.0.5 httpx-0.27.2 jiter-0.5.0 openai-1.48.0
Put in OpenAI API Key here··········
Here we are formatting our menu from when we scraped it, putting everything into a single string for OpenAI to understand, and then creating a prompt helping our model understand what we are hoping to achieve.
Let's check and see our full response and see if it's structured the way we want.
{
"id": "chatcmpl-ABj64ekfxsyu1n7kY1q73GK3reMFT",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "{\"seasonal_drinks\":[{\"drink\":\"Dirty S.O.P: Dr Pepper + Coconut + Peach\",\"reason\":\"The inclusion of peach makes this drink more suited for summer, as peach is typically associated with warm weather and summer harvests.\"},{\"drink\":\"Dr Spice: Dr Pepper + Cinnamon + Coconut + Cinnamon Stick + Half & Half\",\"reason\":\"Cinnamon and cinnamon stick are warm spices typically associated with fall and winter, making this drink best suited for chillier weather.\"},{\"drink\":\"Life's a Peach: Dr Pepper + Vanilla + Peach + Half & Half\",\"reason\":\"The peach flavor suggests a summer drink, as peach is a classic summer fruit. The vanilla adds a creamy note that works well in warmer temperatures.\"},{\"drink\":\"Naughty & Nice: Dr Pepper + English Toffee + Half & Half\",\"reason\":\"The English toffee brings a rich, dessert-like quality suitable for winter, when people tend to crave warmer, indulgent flavors.\"},{\"drink\":\"Princess Peach: Dr Pepper + Peach + Coconut Cream\",\"reason\":\"The tropical flavors of peach and coconut are perfect for summer, evoking a sense of beachside relaxation.\"},{\"drink\":\"Raspberry Dream: Dr Pepper + Raspberry Puree + Coconut Cream\",\"reason\":\"Raspberry is often considered a summer fruit, making this drink ideal for the warmer months.\"},{\"drink\":\"Save Me Jade: Diet Dr Pepper + Sugar Free Vanilla + Sugar Free Coconut\",\"reason\":\"Coconut and vanilla make this drink light and refreshing, suited for both spring and summer.\"},{\"drink\":\"Spring Fling: Dr Pepper + Vanilla + Strawberry Puree + Coconut Cream\",\"reason\":\"Strawberries are typically associated with springtime, making this a fitting beverage for this season.\"},{\"drink\":\"Texas Tab: Dr Pepper + Vanilla + Coconut Cream\",\"reason\":\"Vanilla and coconut create a refreshing combination suitable for both spring and summer.\"},{\"drink\":\"The Heartbreaker: Dr Pepper + Blackberry + Coconut + Half & Half\",\"reason\":\"Blackberry is often associated with late summer, aligning this drink with the latter part of the season.\"},{\"drink\":\"The Ring King: Dr Pepper + Cupcake + Strawberry Puree + Vanilla Cream\",\"reason\":\"Strawberry puree points to a summer association, while the rich cupcake and vanilla flavors also hint at a celebratory summer drink.\"},{\"drink\":\"Big Al: Diet Coke + Coconut + Fresh Lime\",\"reason\":\"The coconut and lime combination gives a tropical feel, perfect for summer.\"},{\"drink\":\"This Bliss: Diet Coke + Cranberry + Fresh Lime\",\"reason\":\"Cranberry is typically a winter fruit, making this drink apt for colder months leading into winter.\"},{\"drink\":\"The Founder: Diet Coke + Sugar Free Coconut + Fresh Lime + Coconut Cream\",\"reason\":\"The coconut ingredients make this drink feel like a summer escape.\"},{\"drink\":\"Just Peachy: Coke Zero Sugar + Pineapple + Peach Puree + Fresh Lime + Coconut Cream\",\"reason\":\"Peach and pineapple evoke the tropical glow of summer, aligning this drink perfectly with the season.\"},{\"drink\":\"Waikiki: Coke + Pineapple + Coconut Cream\",\"reason\":\"Named after a famous beach, the pineapple and coconut scream summer vacation.\"},{\"drink\":\"Cherry Bomb: Pepsi + Cherry + Coconut + Vanilla Cream\",\"reason\":\"Cherries are associated with summer, making this drink ideal for the warmer months.\"},{\"drink\":\"Beach Babe: Mountain Dew + Raspberry + Peach + Vanilla Cream\",\"reason\":\"Raspberry and peach both hint at summer vibes, complementing the fruity beach theme.\"},{\"drink\":\"Bloody Wild: Mountain Dew + Mango Puree + Strawberry Puree\",\"reason\":\"Mango and strawberries are summer fruits, providing a refreshing drink fitting for the season.\"},{\"drink\":\"Dew Gooder: Mountain Dew + Pineapple + Fresh Lime + Raspberry Puree + Coconut Cream\",\"reason\":\"Pineapple and coconut have distinctive tropical, summery connotations.\"},{\"drink\":\"Endless Summer: Mountain Dew + Pomegranate + Grapefruit + Fresh Lime\",\"reason\":\"Pomegranate can bridge between fall and winter, but grapefruit and lime suggest summer, making this a versatile drink.\"},{\"drink\":\"Guava Have It!: Mountain Dew + Guava + Strawberry + Coconut Cream\",\"reason\":\"Guava and strawberry, alongside the coconut, strongly suggest a summer cocktail.\"},{\"drink\":\"Jolly Elf: Mountain Dew + Passion Fruit + Strawberry Puree + Fresh Orange\",\"reason\":\"Despite its name hinting at winter, the passion fruit and strawberry make it suitable for summer.\"},{\"drink\":\"The Rocket: Mountain Dew + Raspberry + Coconut + Blackberry + Vanilla Cream\",\"reason\":\"The blend of berry and coconut flavors feels summery, despite vanilla's winter flexibilities.\"},{\"drink\":\"Watermelon Sugar: Mountain Dew + Mango + Watermelon + Coconut Cream + Passion Fruit Popping Pearls\",\"reason\":\"Watermelon is iconic for summer refreshment, paired with mango and passion fruit.\"},{\"drink\":\"Hula Girl: Sprite + Lemonade + Mango + Pineapple + Strawberry + Coconut Cream\",\"reason\":\"Lemonade, mango, pineapple, and coconut are classic summer refreshers.\"},{\"drink\":\"Loop-T-Loop: Sprite + Strawberry + Watermelon + Peach\",\"reason\":\"All three fruits - strawberry, watermelon, and peach - firmly cement this drink in summer.\"},{\"drink\":\"Poppin' Pineapple: Sprite + Pineapple + Watermelon + Strawberry Popping Pearls\",\"reason\":\"Pineapple and watermelon are key summer fruits, with popping pearls adding a fun twist.\"},{\"drink\":\"Riptide: Sprite + Cranberry + Raspberry Puree + Fresh Lime\",\"reason\":\"Cranberries indicate winter to fall, but lime and raspberry shift it towards summer.\"},{\"drink\":\"Shark Attack: Sprite + Lemonade + Blue Raspberry + Gummy Shark\",\"reason\":\"The blue raspberry gives a playful summer vibe alongside classic lemonade.\"},{\"drink\":\"Unlucky Ducky: Sprite + Lemonade + Strawberry + Gummy Shark\",\"reason\":\"Strawberries paired with lemonade invite a refreshing summer image.\"},{\"drink\":\"Beach Bum: Lemonade + Guava + Grapefruit + Fresh Orange\",\"reason\":\"Citrus and guava's refreshing notes herald sunny, summer days.\"},{\"drink\":\"The Tropic: Lemonade + Mango + Passion Fruit + Vanilla Cream\",\"reason\":\"Mango and passion fruit scream summer island paradise.\"},{\"drink\":\"Buttery Beer: Root Beer + Butterscotch + Vanilla Creme\",\"reason\":\"The rich and creamy notes are more typically associated with winter, offering a warming effect.\"},{\"drink\":\"Happy Camper: Root Beer + Toasted Marshmallow + Half & Half\",\"reason\":\"Toasted marshmallow aligns with fall campfires and cooler weather traditions.\"},{\"drink\":\"Cinnamon Cider: Ginger Ale + Lemonade + Cinnamon + Apple + Cinnamon Stick\",\"reason\":\"Cinnamon and apple make this a quintessential fall drink, reflecting traditional fall flavors like cider.\"},{\"drink\":\"Island Time: Fresca + Passion Fruit + Fresh Orange + Mango Puree + Coconut Cream\",\"reason\":\"The tropical fruits signal a summery escape.\"},{\"drink\":\"Pink Bahama: Fresca + Peach + Strawberry+ Raspberry + Fresh Lemon\",\"reason\":\"The berry and fruity mix with lemon suggest a spring to summer transition.\"},{\"drink\":\"Sleigh All Day: Fresca + Lemonade + Pomegranate + Peach + Strawberry Puree + Fresh Lemon\",\"reason\":\"Blending pomegranate with peach suggests a winter drink with a bright spring twist.\"},{\"drink\":\"Drama Queen: Sugar Free Reviver Energy + Sugar Free Strawberry + Sugar Free Peach + Sugar Free Coconut + Light Lemonade\",\"reason\":\"Peach and coconut ingredients indicate a summer preference.\"},{\"drink\":\"Mountain Man: Reviver Energy + Blackberry + Coconut + Fresh Lime + Half & Half + Mountain Dew\",\"reason\":\"Despite coconut suggesting summer, blackberry can veer toward fall, providing versatility.\"},{\"drink\":\"P.O.G.: Reviver Energy + Passion Fruit + Guava + Fresh Orange\",\"reason\":\"Passion fruit and guava designate a summer drink, reminiscent of tropical islands.\"},{\"drink\":\"Ride or Die: Reviver Energy + Peach + Pineapple + Coconut Cream\",\"reason\":\"Peach and pineapple strongly support a summer alignment.\"},{\"drink\":\"Super Trooper: Reviver Energy + Lemonade + Mango + Strawberry Puree + Coconut Cream\",\"reason\":\"Lemonade, mango, and strawberry are summer favorites, making this seasonally aligned.\"},{\"drink\":\"Surf's Up: Reviver Energy + Lemonade + Peach + Mango + Raspberry + Fresh Orange\",\"reason\":\"The cocktail of spring/summer fruits places this drink firmly in summer.\"},{\"drink\":\"Weekender: Reviver + Strawberry + Coconut + Coconut Cream + Sprite\",\"reason\":\"Strawberry and coconut epitomize summer freshness and leisure.\"},{\"drink\":\"All Star: Blended Reviver Energy + Lemonade + Guava + Strawberry + Coconut Cream\",\"reason\":\"Featuring lemonade, guava, strawberry, and coconut - peak summer.\"},{\"drink\":\"Cloud 9: Blended Reviver Energy + Mountain Dew + Coconut + Pineapple + Blue Raspberry + Half & Half\",\"reason\":\"Pineapple and coconut make this another summer-themed drink.\"},{\"drink\":\"Daisy Duke: Blended Reviver Energy + Mountain Dew + Pineapple + Strawberry Puree + Coconut Cream\",\"reason\":\"The tropical pineapple and soothing coconut are made for summer sipping.\"},{\"drink\":\"Flirty Flamango: Blended Reviver Energy + Sprite + Grapefruit + Pineapple + Mango Puree + Coconut Cream\",\"reason\":\"The balance of pineapple and mango hints strongly towards summer.\"},{\"drink\":\"Peaches n Cream: Blended Reviver Energy + Sprite + Peach Puree + Vanilla Cream\",\"reason\":\"Peach puree creates a summery vibe, contrasting vanilla's winter warmth.\"},{\"drink\":\"Polar Punch: Blended Reviver Energy + Ginger Ale + Blackberry + Strawberry + Raspberry + Vanilla Cream\",\"reason\":\"The mix of berries offers flexibility across the latter part of summer and into fall.\"},{\"drink\":\"Sucker Punch: Blended Reviver Energy + Lemonade + Grapefruit + Mango\",\"reason\":\"The lemonade and mango dual are ideal for summer afternoons.\"},{\"drink\":\"Autumn Blush: Water + Apple + Raspberry + Mango Puree + Vanilla Cream\",\"reason\":\"Apple and vanilla cream indicate fall, despite raspberry and mango's touches of summer.\"},{\"drink\":\"Berry Nice: Water + Sugar Free Strawberry + Fresh Lime\",\"reason\":\"Strawberry aligns with late spring into summer due to its refreshing qualities.\"},{\"drink\":\"Berry Swigmas: Water + Cranberry + Sugar Free Vanilla + Fresh Orange\",\"reason\":\"Cranberry and vanilla both suggest a winter theme, reminiscent of holiday flavors.\"},{\"drink\":\"Fruit Water: Water + Sugar Free Coconut + Sugar Free Vanilla + Frozen Strawberry + Frozen Mango\",\"reason\":\"Strawberry, mango, and coconut signify summer.\"},{\"drink\":\"Mango Breeze: Water + Sugar Free Coconut + Sugar Free Vanilla + Mango Puree + Frozen Mango + Coconut Cream\",\"reason\":\"Mango and coconut make it clearly summer oriented.\"},{\"drink\":\"Pretty in Pink: Water + Guava + Grapefruit + Fresh Orange\",\"reason\":\"The summery fruit mix makes it ideal from late spring into summer.\"},{\"drink\":\"Sandy Cheeks: Water + Sugar Free Peach + Fresh Lemon\",\"reason\":\"Peach and lemon are bright and suited for spring and summer.\"},{\"drink\":\"Strawberry Breeze: Water + Sugar Free Coconut + Sugar Free Vanilla + Strawberry Puree + Frozen Strawberry + Coconut Cream\",\"reason\":\"Strawberries and coconut embody summer refreshment.\"},{\"drink\":\"Summer Splash: Water + Sugar Free Pineapple + Strawberry Puree + Fresh Lemon\",\"reason\":\"Pineapple and strawberry define it as a burst of summer.\"},{\"drink\":\"Tiki Tiki: Water + Sugar Free Coconut + Fresh Orange\",\"reason\":\"A light, refreshing mix aligned with summer.\"},{\"drink\":\"The Fighter: Water + Sugar Free Vanilla + Sugar Free Peach + Sugar Free Pineapple + Fresh Lime + Raspberry Puree\",\"reason\":\"Peach, lime, and pineapple aim this towards summer tones.\"},{\"drink\":\"Unbreakable: Water + Grapefruit + Mango Puree + Fresh Lemon\",\"reason\":\"Mango and lemon throwback to summer days.\"}]}",
"refusal": null,
"role": "assistant",
"function_call": null,
"tool_calls": null
}
}
],
"created": 1727358324,
"model": "gpt-4o-2024-08-06",
"object": "chat.completion",
"service_tier": null,
"system_fingerprint": "fp_5050236cbd",
"usage": {
"completion_tokens": 2473,
"prompt_tokens": 1973,
"total_tokens": 4446,
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}
It is structured nicely, but all our fall drinks with their reasonings are under the "content" part. Let's open this up so we can better read it.
{"seasonal_drinks":[{"drink":"Dirty S.O.P: Dr Pepper + Coconut + Peach","reason":"The inclusion of peach makes this drink more suited for summer, as peach is typically associated with warm weather and summer harvests."},{"drink":"Dr Spice: Dr Pepper + Cinnamon + Coconut + Cinnamon Stick + Half & Half","reason":"Cinnamon and cinnamon stick are warm spices typically associated with fall and winter, making this drink best suited for chillier weather."},{"drink":"Life's a Peach: Dr Pepper + Vanilla + Peach + Half & Half","reason":"The peach flavor suggests a summer drink, as peach is a classic summer fruit. The vanilla adds a creamy note that works well in warmer temperatures."},{"drink":"Naughty & Nice: Dr Pepper + English Toffee + Half & Half","reason":"The English toffee brings a rich, dessert-like quality suitable for winter, when people tend to crave warmer, indulgent flavors."},{"drink":"Princess Peach: Dr Pepper + Peach + Coconut Cream","reason":"The tropical flavors of peach and coconut are perfect for summer, evoking a sense of beachside relaxation."},{"drink":"Raspberry Dream: Dr Pepper + Raspberry Puree + Coconut Cream","reason":"Raspberry is often considered a summer fruit, making this drink ideal for the warmer months."},{"drink":"Save Me Jade: Diet Dr Pepper + Sugar Free Vanilla + Sugar Free Coconut","reason":"Coconut and vanilla make this drink light and refreshing, suited for both spring and summer."},{"drink":"Spring Fling: Dr Pepper + Vanilla + Strawberry Puree + Coconut Cream","reason":"Strawberries are typically associated with springtime, making this a fitting beverage for this season."},{"drink":"Texas Tab: Dr Pepper + Vanilla + Coconut Cream","reason":"Vanilla and coconut create a refreshing combination suitable for both spring and summer."},{"drink":"The Heartbreaker: Dr Pepper + Blackberry + Coconut + Half & Half","reason":"Blackberry is often associated with late summer, aligning this drink with the latter part of the season."},{"drink":"The Ring King: Dr Pepper + Cupcake + Strawberry Puree + Vanilla Cream","reason":"Strawberry puree points to a summer association, while the rich cupcake and vanilla flavors also hint at a celebratory summer drink."},{"drink":"Big Al: Diet Coke + Coconut + Fresh Lime","reason":"The coconut and lime combination gives a tropical feel, perfect for summer."},{"drink":"This Bliss: Diet Coke + Cranberry + Fresh Lime","reason":"Cranberry is typically a winter fruit, making this drink apt for colder months leading into winter."},{"drink":"The Founder: Diet Coke + Sugar Free Coconut + Fresh Lime + Coconut Cream","reason":"The coconut ingredients make this drink feel like a summer escape."},{"drink":"Just Peachy: Coke Zero Sugar + Pineapple + Peach Puree + Fresh Lime + Coconut Cream","reason":"Peach and pineapple evoke the tropical glow of summer, aligning this drink perfectly with the season."},{"drink":"Waikiki: Coke + Pineapple + Coconut Cream","reason":"Named after a famous beach, the pineapple and coconut scream summer vacation."},{"drink":"Cherry Bomb: Pepsi + Cherry + Coconut + Vanilla Cream","reason":"Cherries are associated with summer, making this drink ideal for the warmer months."},{"drink":"Beach Babe: Mountain Dew + Raspberry + Peach + Vanilla Cream","reason":"Raspberry and peach both hint at summer vibes, complementing the fruity beach theme."},{"drink":"Bloody Wild: Mountain Dew + Mango Puree + Strawberry Puree","reason":"Mango and strawberries are summer fruits, providing a refreshing drink fitting for the season."},{"drink":"Dew Gooder: Mountain Dew + Pineapple + Fresh Lime + Raspberry Puree + Coconut Cream","reason":"Pineapple and coconut have distinctive tropical, summery connotations."},{"drink":"Endless Summer: Mountain Dew + Pomegranate + Grapefruit + Fresh Lime","reason":"Pomegranate can bridge between fall and winter, but grapefruit and lime suggest summer, making this a versatile drink."},{"drink":"Guava Have It!: Mountain Dew + Guava + Strawberry + Coconut Cream","reason":"Guava and strawberry, alongside the coconut, strongly suggest a summer cocktail."},{"drink":"Jolly Elf: Mountain Dew + Passion Fruit + Strawberry Puree + Fresh Orange","reason":"Despite its name hinting at winter, the passion fruit and strawberry make it suitable for summer."},{"drink":"The Rocket: Mountain Dew + Raspberry + Coconut + Blackberry + Vanilla Cream","reason":"The blend of berry and coconut flavors feels summery, despite vanilla's winter flexibilities."},{"drink":"Watermelon Sugar: Mountain Dew + Mango + Watermelon + Coconut Cream + Passion Fruit Popping Pearls","reason":"Watermelon is iconic for summer refreshment, paired with mango and passion fruit."},{"drink":"Hula Girl: Sprite + Lemonade + Mango + Pineapple + Strawberry + Coconut Cream","reason":"Lemonade, mango, pineapple, and coconut are classic summer refreshers."},{"drink":"Loop-T-Loop: Sprite + Strawberry + Watermelon + Peach","reason":"All three fruits - strawberry, watermelon, and peach - firmly cement this drink in summer."},{"drink":"Poppin' Pineapple: Sprite + Pineapple + Watermelon + Strawberry Popping Pearls","reason":"Pineapple and watermelon are key summer fruits, with popping pearls adding a fun twist."},{"drink":"Riptide: Sprite + Cranberry + Raspberry Puree + Fresh Lime","reason":"Cranberries indicate winter to fall, but lime and raspberry shift it towards summer."},{"drink":"Shark Attack: Sprite + Lemonade + Blue Raspberry + Gummy Shark","reason":"The blue raspberry gives a playful summer vibe alongside classic lemonade."},{"drink":"Unlucky Ducky: Sprite + Lemonade + Strawberry + Gummy Shark","reason":"Strawberries paired with lemonade invite a refreshing summer image."},{"drink":"Beach Bum: Lemonade + Guava + Grapefruit + Fresh Orange","reason":"Citrus and guava's refreshing notes herald sunny, summer days."},{"drink":"The Tropic: Lemonade + Mango + Passion Fruit + Vanilla Cream","reason":"Mango and passion fruit scream summer island paradise."},{"drink":"Buttery Beer: Root Beer + Butterscotch + Vanilla Creme","reason":"The rich and creamy notes are more typically associated with winter, offering a warming effect."},{"drink":"Happy Camper: Root Beer + Toasted Marshmallow + Half & Half","reason":"Toasted marshmallow aligns with fall campfires and cooler weather traditions."},{"drink":"Cinnamon Cider: Ginger Ale + Lemonade + Cinnamon + Apple + Cinnamon Stick","reason":"Cinnamon and apple make this a quintessential fall drink, reflecting traditional fall flavors like cider."},{"drink":"Island Time: Fresca + Passion Fruit + Fresh Orange + Mango Puree + Coconut Cream","reason":"The tropical fruits signal a summery escape."},{"drink":"Pink Bahama: Fresca + Peach + Strawberry+ Raspberry + Fresh Lemon","reason":"The berry and fruity mix with lemon suggest a spring to summer transition."},{"drink":"Sleigh All Day: Fresca + Lemonade + Pomegranate + Peach + Strawberry Puree + Fresh Lemon","reason":"Blending pomegranate with peach suggests a winter drink with a bright spring twist."},{"drink":"Drama Queen: Sugar Free Reviver Energy + Sugar Free Strawberry + Sugar Free Peach + Sugar Free Coconut + Light Lemonade","reason":"Peach and coconut ingredients indicate a summer preference."},{"drink":"Mountain Man: Reviver Energy + Blackberry + Coconut + Fresh Lime + Half & Half + Mountain Dew","reason":"Despite coconut suggesting summer, blackberry can veer toward fall, providing versatility."},{"drink":"P.O.G.: Reviver Energy + Passion Fruit + Guava + Fresh Orange","reason":"Passion fruit and guava designate a summer drink, reminiscent of tropical islands."},{"drink":"Ride or Die: Reviver Energy + Peach + Pineapple + Coconut Cream","reason":"Peach and pineapple strongly support a summer alignment."},{"drink":"Super Trooper: Reviver Energy + Lemonade + Mango + Strawberry Puree + Coconut Cream","reason":"Lemonade, mango, and strawberry are summer favorites, making this seasonally aligned."},{"drink":"Surf's Up: Reviver Energy + Lemonade + Peach + Mango + Raspberry + Fresh Orange","reason":"The cocktail of spring/summer fruits places this drink firmly in summer."},{"drink":"Weekender: Reviver + Strawberry + Coconut + Coconut Cream + Sprite","reason":"Strawberry and coconut epitomize summer freshness and leisure."},{"drink":"All Star: Blended Reviver Energy + Lemonade + Guava + Strawberry + Coconut Cream","reason":"Featuring lemonade, guava, strawberry, and coconut - peak summer."},{"drink":"Cloud 9: Blended Reviver Energy + Mountain Dew + Coconut + Pineapple + Blue Raspberry + Half & Half","reason":"Pineapple and coconut make this another summer-themed drink."},{"drink":"Daisy Duke: Blended Reviver Energy + Mountain Dew + Pineapple + Strawberry Puree + Coconut Cream","reason":"The tropical pineapple and soothing coconut are made for summer sipping."},{"drink":"Flirty Flamango: Blended Reviver Energy + Sprite + Grapefruit + Pineapple + Mango Puree + Coconut Cream","reason":"The balance of pineapple and mango hints strongly towards summer."},{"drink":"Peaches n Cream: Blended Reviver Energy + Sprite + Peach Puree + Vanilla Cream","reason":"Peach puree creates a summery vibe, contrasting vanilla's winter warmth."},{"drink":"Polar Punch: Blended Reviver Energy + Ginger Ale + Blackberry + Strawberry + Raspberry + Vanilla Cream","reason":"The mix of berries offers flexibility across the latter part of summer and into fall."},{"drink":"Sucker Punch: Blended Reviver Energy + Lemonade + Grapefruit + Mango","reason":"The lemonade and mango dual are ideal for summer afternoons."},{"drink":"Autumn Blush: Water + Apple + Raspberry + Mango Puree + Vanilla Cream","reason":"Apple and vanilla cream indicate fall, despite raspberry and mango's touches of summer."},{"drink":"Berry Nice: Water + Sugar Free Strawberry + Fresh Lime","reason":"Strawberry aligns with late spring into summer due to its refreshing qualities."},{"drink":"Berry Swigmas: Water + Cranberry + Sugar Free Vanilla + Fresh Orange","reason":"Cranberry and vanilla both suggest a winter theme, reminiscent of holiday flavors."},{"drink":"Fruit Water: Water + Sugar Free Coconut + Sugar Free Vanilla + Frozen Strawberry + Frozen Mango","reason":"Strawberry, mango, and coconut signify summer."},{"drink":"Mango Breeze: Water + Sugar Free Coconut + Sugar Free Vanilla + Mango Puree + Frozen Mango + Coconut Cream","reason":"Mango and coconut make it clearly summer oriented."},{"drink":"Pretty in Pink: Water + Guava + Grapefruit + Fresh Orange","reason":"The summery fruit mix makes it ideal from late spring into summer."},{"drink":"Sandy Cheeks: Water + Sugar Free Peach + Fresh Lemon","reason":"Peach and lemon are bright and suited for spring and summer."},{"drink":"Strawberry Breeze: Water + Sugar Free Coconut + Sugar Free Vanilla + Strawberry Puree + Frozen Strawberry + Coconut Cream","reason":"Strawberries and coconut embody summer refreshment."},{"drink":"Summer Splash: Water + Sugar Free Pineapple + Strawberry Puree + Fresh Lemon","reason":"Pineapple and strawberry define it as a burst of summer."},{"drink":"Tiki Tiki: Water + Sugar Free Coconut + Fresh Orange","reason":"A light, refreshing mix aligned with summer."},{"drink":"The Fighter: Water + Sugar Free Vanilla + Sugar Free Peach + Sugar Free Pineapple + Fresh Lime + Raspberry Puree","reason":"Peach, lime, and pineapple aim this towards summer tones."},{"drink":"Unbreakable: Water + Grapefruit + Mango Puree + Fresh Lemon","reason":"Mango and lemon throwback to summer days."}]}
So it's still in one line. Let's print them out nicely for better readability and so when we input it into MongoDB Atlas everything is in different documents.
[
{
"drink": "Dirty S.O.P: Dr Pepper + Coconut + Peach",
"reason": "The inclusion of peach makes this drink more suited for summer, as peach is typically associated with warm weather and summer harvests."
},
{
"drink": "Dr Spice: Dr Pepper + Cinnamon + Coconut + Cinnamon Stick + Half & Half",
"reason": "Cinnamon and cinnamon stick are warm spices typically associated with fall and winter, making this drink best suited for chillier weather."
},
{
"drink": "Life's a Peach: Dr Pepper + Vanilla + Peach + Half & Half",
"reason": "The peach flavor suggests a summer drink, as peach is a classic summer fruit. The vanilla adds a creamy note that works well in warmer temperatures."
},
{
"drink": "Naughty & Nice: Dr Pepper + English Toffee + Half & Half",
"reason": "The English toffee brings a rich, dessert-like quality suitable for winter, when people tend to crave warmer, indulgent flavors."
},
{
"drink": "Princess Peach: Dr Pepper + Peach + Coconut Cream",
"reason": "The tropical flavors of peach and coconut are perfect for summer, evoking a sense of beachside relaxation."
},
{
"drink": "Raspberry Dream: Dr Pepper + Raspberry Puree + Coconut Cream",
"reason": "Raspberry is often considered a summer fruit, making this drink ideal for the warmer months."
},
{
"drink": "Save Me Jade: Diet Dr Pepper + Sugar Free Vanilla + Sugar Free Coconut",
"reason": "Coconut and vanilla make this drink light and refreshing, suited for both spring and summer."
},
{
"drink": "Spring Fling: Dr Pepper + Vanilla + Strawberry Puree + Coconut Cream",
"reason": "Strawberries are typically associated with springtime, making this a fitting beverage for this season."
},
{
"drink": "Texas Tab: Dr Pepper + Vanilla + Coconut Cream",
"reason": "Vanilla and coconut create a refreshing combination suitable for both spring and summer."
},
{
"drink": "The Heartbreaker: Dr Pepper + Blackberry + Coconut + Half & Half",
"reason": "Blackberry is often associated with late summer, aligning this drink with the latter part of the season."
},
{
"drink": "The Ring King: Dr Pepper + Cupcake + Strawberry Puree + Vanilla Cream",
"reason": "Strawberry puree points to a summer association, while the rich cupcake and vanilla flavors also hint at a celebratory summer drink."
},
{
"drink": "Big Al: Diet Coke + Coconut + Fresh Lime",
"reason": "The coconut and lime combination gives a tropical feel, perfect for summer."
},
{
"drink": "This Bliss: Diet Coke + Cranberry + Fresh Lime",
"reason": "Cranberry is typically a winter fruit, making this drink apt for colder months leading into winter."
},
{
"drink": "The Founder: Diet Coke + Sugar Free Coconut + Fresh Lime + Coconut Cream",
"reason": "The coconut ingredients make this drink feel like a summer escape."
},
{
"drink": "Just Peachy: Coke Zero Sugar + Pineapple + Peach Puree + Fresh Lime + Coconut Cream",
"reason": "Peach and pineapple evoke the tropical glow of summer, aligning this drink perfectly with the season."
},
{
"drink": "Waikiki: Coke + Pineapple + Coconut Cream",
"reason": "Named after a famous beach, the pineapple and coconut scream summer vacation."
},
{
"drink": "Cherry Bomb: Pepsi + Cherry + Coconut + Vanilla Cream",
"reason": "Cherries are associated with summer, making this drink ideal for the warmer months."
},
{
"drink": "Beach Babe: Mountain Dew + Raspberry + Peach + Vanilla Cream",
"reason": "Raspberry and peach both hint at summer vibes, complementing the fruity beach theme."
},
{
"drink": "Bloody Wild: Mountain Dew + Mango Puree + Strawberry Puree",
"reason": "Mango and strawberries are summer fruits, providing a refreshing drink fitting for the season."
},
{
"drink": "Dew Gooder: Mountain Dew + Pineapple + Fresh Lime + Raspberry Puree + Coconut Cream",
"reason": "Pineapple and coconut have distinctive tropical, summery connotations."
},
{
"drink": "Endless Summer: Mountain Dew + Pomegranate + Grapefruit + Fresh Lime",
"reason": "Pomegranate can bridge between fall and winter, but grapefruit and lime suggest summer, making this a versatile drink."
},
{
"drink": "Guava Have It!: Mountain Dew + Guava + Strawberry + Coconut Cream",
"reason": "Guava and strawberry, alongside the coconut, strongly suggest a summer cocktail."
},
{
"drink": "Jolly Elf: Mountain Dew + Passion Fruit + Strawberry Puree + Fresh Orange",
"reason": "Despite its name hinting at winter, the passion fruit and strawberry make it suitable for summer."
},
{
"drink": "The Rocket: Mountain Dew + Raspberry + Coconut + Blackberry + Vanilla Cream",
"reason": "The blend of berry and coconut flavors feels summery, despite vanilla's winter flexibilities."
},
{
"drink": "Watermelon Sugar: Mountain Dew + Mango + Watermelon + Coconut Cream + Passion Fruit Popping Pearls",
"reason": "Watermelon is iconic for summer refreshment, paired with mango and passion fruit."
},
{
"drink": "Hula Girl: Sprite + Lemonade + Mango + Pineapple + Strawberry + Coconut Cream",
"reason": "Lemonade, mango, pineapple, and coconut are classic summer refreshers."
},
{
"drink": "Loop-T-Loop: Sprite + Strawberry + Watermelon + Peach",
"reason": "All three fruits - strawberry, watermelon, and peach - firmly cement this drink in summer."
},
{
"drink": "Poppin' Pineapple: Sprite + Pineapple + Watermelon + Strawberry Popping Pearls",
"reason": "Pineapple and watermelon are key summer fruits, with popping pearls adding a fun twist."
},
{
"drink": "Riptide: Sprite + Cranberry + Raspberry Puree + Fresh Lime",
"reason": "Cranberries indicate winter to fall, but lime and raspberry shift it towards summer."
},
{
"drink": "Shark Attack: Sprite + Lemonade + Blue Raspberry + Gummy Shark",
"reason": "The blue raspberry gives a playful summer vibe alongside classic lemonade."
},
{
"drink": "Unlucky Ducky: Sprite + Lemonade + Strawberry + Gummy Shark",
"reason": "Strawberries paired with lemonade invite a refreshing summer image."
},
{
"drink": "Beach Bum: Lemonade + Guava + Grapefruit + Fresh Orange",
"reason": "Citrus and guava's refreshing notes herald sunny, summer days."
},
{
"drink": "The Tropic: Lemonade + Mango + Passion Fruit + Vanilla Cream",
"reason": "Mango and passion fruit scream summer island paradise."
},
{
"drink": "Buttery Beer: Root Beer + Butterscotch + Vanilla Creme",
"reason": "The rich and creamy notes are more typically associated with winter, offering a warming effect."
},
{
"drink": "Happy Camper: Root Beer + Toasted Marshmallow + Half & Half",
"reason": "Toasted marshmallow aligns with fall campfires and cooler weather traditions."
},
{
"drink": "Cinnamon Cider: Ginger Ale + Lemonade + Cinnamon + Apple + Cinnamon Stick",
"reason": "Cinnamon and apple make this a quintessential fall drink, reflecting traditional fall flavors like cider."
},
{
"drink": "Island Time: Fresca + Passion Fruit + Fresh Orange + Mango Puree + Coconut Cream",
"reason": "The tropical fruits signal a summery escape."
},
{
"drink": "Pink Bahama: Fresca + Peach + Strawberry+ Raspberry + Fresh Lemon",
"reason": "The berry and fruity mix with lemon suggest a spring to summer transition."
},
{
"drink": "Sleigh All Day: Fresca + Lemonade + Pomegranate + Peach + Strawberry Puree + Fresh Lemon",
"reason": "Blending pomegranate with peach suggests a winter drink with a bright spring twist."
},
{
"drink": "Drama Queen: Sugar Free Reviver Energy + Sugar Free Strawberry + Sugar Free Peach + Sugar Free Coconut + Light Lemonade",
"reason": "Peach and coconut ingredients indicate a summer preference."
},
{
"drink": "Mountain Man: Reviver Energy + Blackberry + Coconut + Fresh Lime + Half & Half + Mountain Dew",
"reason": "Despite coconut suggesting summer, blackberry can veer toward fall, providing versatility."
},
{
"drink": "P.O.G.: Reviver Energy + Passion Fruit + Guava + Fresh Orange",
"reason": "Passion fruit and guava designate a summer drink, reminiscent of tropical islands."
},
{
"drink": "Ride or Die: Reviver Energy + Peach + Pineapple + Coconut Cream",
"reason": "Peach and pineapple strongly support a summer alignment."
},
{
"drink": "Super Trooper: Reviver Energy + Lemonade + Mango + Strawberry Puree + Coconut Cream",
"reason": "Lemonade, mango, and strawberry are summer favorites, making this seasonally aligned."
},
{
"drink": "Surf's Up: Reviver Energy + Lemonade + Peach + Mango + Raspberry + Fresh Orange",
"reason": "The cocktail of spring/summer fruits places this drink firmly in summer."
},
{
"drink": "Weekender: Reviver + Strawberry + Coconut + Coconut Cream + Sprite",
"reason": "Strawberry and coconut epitomize summer freshness and leisure."
},
{
"drink": "All Star: Blended Reviver Energy + Lemonade + Guava + Strawberry + Coconut Cream",
"reason": "Featuring lemonade, guava, strawberry, and coconut - peak summer."
},
{
"drink": "Cloud 9: Blended Reviver Energy + Mountain Dew + Coconut + Pineapple + Blue Raspberry + Half & Half",
"reason": "Pineapple and coconut make this another summer-themed drink."
},
{
"drink": "Daisy Duke: Blended Reviver Energy + Mountain Dew + Pineapple + Strawberry Puree + Coconut Cream",
"reason": "The tropical pineapple and soothing coconut are made for summer sipping."
},
{
"drink": "Flirty Flamango: Blended Reviver Energy + Sprite + Grapefruit + Pineapple + Mango Puree + Coconut Cream",
"reason": "The balance of pineapple and mango hints strongly towards summer."
},
{
"drink": "Peaches n Cream: Blended Reviver Energy + Sprite + Peach Puree + Vanilla Cream",
"reason": "Peach puree creates a summery vibe, contrasting vanilla's winter warmth."
},
{
"drink": "Polar Punch: Blended Reviver Energy + Ginger Ale + Blackberry + Strawberry + Raspberry + Vanilla Cream",
"reason": "The mix of berries offers flexibility across the latter part of summer and into fall."
},
{
"drink": "Sucker Punch: Blended Reviver Energy + Lemonade + Grapefruit + Mango",
"reason": "The lemonade and mango dual are ideal for summer afternoons."
},
{
"drink": "Autumn Blush: Water + Apple + Raspberry + Mango Puree + Vanilla Cream",
"reason": "Apple and vanilla cream indicate fall, despite raspberry and mango's touches of summer."
},
{
"drink": "Berry Nice: Water + Sugar Free Strawberry + Fresh Lime",
"reason": "Strawberry aligns with late spring into summer due to its refreshing qualities."
},
{
"drink": "Berry Swigmas: Water + Cranberry + Sugar Free Vanilla + Fresh Orange",
"reason": "Cranberry and vanilla both suggest a winter theme, reminiscent of holiday flavors."
},
{
"drink": "Fruit Water: Water + Sugar Free Coconut + Sugar Free Vanilla + Frozen Strawberry + Frozen Mango",
"reason": "Strawberry, mango, and coconut signify summer."
},
{
"drink": "Mango Breeze: Water + Sugar Free Coconut + Sugar Free Vanilla + Mango Puree + Frozen Mango + Coconut Cream",
"reason": "Mango and coconut make it clearly summer oriented."
},
{
"drink": "Pretty in Pink: Water + Guava + Grapefruit + Fresh Orange",
"reason": "The summery fruit mix makes it ideal from late spring into summer."
},
{
"drink": "Sandy Cheeks: Water + Sugar Free Peach + Fresh Lemon",
"reason": "Peach and lemon are bright and suited for spring and summer."
},
{
"drink": "Strawberry Breeze: Water + Sugar Free Coconut + Sugar Free Vanilla + Strawberry Puree + Frozen Strawberry + Coconut Cream",
"reason": "Strawberries and coconut embody summer refreshment."
},
{
"drink": "Summer Splash: Water + Sugar Free Pineapple + Strawberry Puree + Fresh Lemon",
"reason": "Pineapple and strawberry define it as a burst of summer."
},
{
"drink": "Tiki Tiki: Water + Sugar Free Coconut + Fresh Orange",
"reason": "A light, refreshing mix aligned with summer."
},
{
"drink": "The Fighter: Water + Sugar Free Vanilla + Sugar Free Peach + Sugar Free Pineapple + Fresh Lime + Raspberry Puree",
"reason": "Peach, lime, and pineapple aim this towards summer tones."
},
{
"drink": "Unbreakable: Water + Grapefruit + Mango Puree + Fresh Lemon",
"reason": "Mango and lemon throwback to summer days."
}
]
Now that our drinks with their reasonings are printed out nicely, let's upload them into MongoDB Atlas so we can use Atlas Search and take a look at drinks based off their ingredients!
Step 3: Store into MongoDB and use Atlas Search
For this section a MongoDB Atlas cluster is required. Please make sure you have your connection string saved somewhere safe.
First install PyMongo to make things easier for ourselves.
Collecting pymongo Downloading pymongo-4.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (22 kB) Collecting dnspython<3.0.0,>=1.16.0 (from pymongo) Downloading dnspython-2.6.1-py3-none-any.whl.metadata (5.8 kB) Downloading pymongo-4.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 7.8 MB/s eta 0:00:00 Downloading dnspython-2.6.1-py3-none-any.whl (307 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 307.7/307.7 kB 24.3 MB/s eta 0:00:00 Installing collected packages: dnspython, pymongo Successfully installed dnspython-2.6.1 pymongo-4.9.1
Set up our MongoDB connection, name your database and collection, and insert your documents into your cluster.
Enter connection string WITH USER + PASS here··········
InsertManyResult([ObjectId('66f567a76d78f892e158abed'), ObjectId('66f567a76d78f892e158abee'), ObjectId('66f567a76d78f892e158abef'), ObjectId('66f567a76d78f892e158abf0'), ObjectId('66f567a76d78f892e158abf1'), ObjectId('66f567a76d78f892e158abf2'), ObjectId('66f567a76d78f892e158abf3'), ObjectId('66f567a76d78f892e158abf4'), ObjectId('66f567a76d78f892e158abf5'), ObjectId('66f567a76d78f892e158abf6'), ObjectId('66f567a76d78f892e158abf7'), ObjectId('66f567a76d78f892e158abf8'), ObjectId('66f567a76d78f892e158abf9'), ObjectId('66f567a76d78f892e158abfa'), ObjectId('66f567a76d78f892e158abfb'), ObjectId('66f567a76d78f892e158abfc'), ObjectId('66f567a76d78f892e158abfd'), ObjectId('66f567a76d78f892e158abfe'), ObjectId('66f567a76d78f892e158abff'), ObjectId('66f567a76d78f892e158ac00'), ObjectId('66f567a76d78f892e158ac01'), ObjectId('66f567a76d78f892e158ac02'), ObjectId('66f567a76d78f892e158ac03'), ObjectId('66f567a76d78f892e158ac04'), ObjectId('66f567a76d78f892e158ac05'), ObjectId('66f567a76d78f892e158ac06'), ObjectId('66f567a76d78f892e158ac07'), ObjectId('66f567a76d78f892e158ac08'), ObjectId('66f567a76d78f892e158ac09'), ObjectId('66f567a76d78f892e158ac0a'), ObjectId('66f567a76d78f892e158ac0b'), ObjectId('66f567a76d78f892e158ac0c'), ObjectId('66f567a76d78f892e158ac0d'), ObjectId('66f567a76d78f892e158ac0e'), ObjectId('66f567a76d78f892e158ac0f'), ObjectId('66f567a76d78f892e158ac10'), ObjectId('66f567a76d78f892e158ac11'), ObjectId('66f567a76d78f892e158ac12'), ObjectId('66f567a76d78f892e158ac13'), ObjectId('66f567a76d78f892e158ac14'), ObjectId('66f567a76d78f892e158ac15'), ObjectId('66f567a76d78f892e158ac16'), ObjectId('66f567a76d78f892e158ac17'), ObjectId('66f567a76d78f892e158ac18'), ObjectId('66f567a76d78f892e158ac19'), ObjectId('66f567a76d78f892e158ac1a'), ObjectId('66f567a76d78f892e158ac1b'), ObjectId('66f567a76d78f892e158ac1c'), ObjectId('66f567a76d78f892e158ac1d'), ObjectId('66f567a76d78f892e158ac1e'), ObjectId('66f567a76d78f892e158ac1f'), ObjectId('66f567a76d78f892e158ac20'), ObjectId('66f567a76d78f892e158ac21'), ObjectId('66f567a76d78f892e158ac22'), ObjectId('66f567a76d78f892e158ac23'), ObjectId('66f567a76d78f892e158ac24'), ObjectId('66f567a76d78f892e158ac25'), ObjectId('66f567a76d78f892e158ac26'), ObjectId('66f567a76d78f892e158ac27'), ObjectId('66f567a76d78f892e158ac28'), ObjectId('66f567a76d78f892e158ac29'), ObjectId('66f567a76d78f892e158ac2a'), ObjectId('66f567a76d78f892e158ac2b'), ObjectId('66f567a76d78f892e158ac2c'), ObjectId('66f567a76d78f892e158ac2d')], acknowledged=True) Create an Atlas Search index on your collection and create an aggregation pipeline. We are using the operator $search.
Do NOT run this part in your notebook. This is done in the Atlas UI.
This finds drinks that have "fall" in them
This finds drinks that are fall AND have apple as an ingredient
Now you can find drinks that are fall themed that are specific to any ingredients you want!