From 6e85696f0eaf54b2c3d47ad7671885ec65e77fea Mon Sep 17 00:00:00 2001 From: Mark Sze Date: Thu, 5 Dec 2024 02:03:45 +0000 Subject: [PATCH] Notebook with execution Signed-off-by: Mark Sze --- ...gentchat_swarm_graphrag_trip_planner.ipynb | 463 +++++++++++++++++- 1 file changed, 446 insertions(+), 17 deletions(-) diff --git a/notebook/agentchat_swarm_graphrag_trip_planner.ipynb b/notebook/agentchat_swarm_graphrag_trip_planner.ipynb index 40a52018c9..5364d640ba 100644 --- a/notebook/agentchat_swarm_graphrag_trip_planner.ipynb +++ b/notebook/agentchat_swarm_graphrag_trip_planner.ipynb @@ -83,7 +83,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -91,7 +91,7 @@ "\n", "import autogen\n", "\n", - "config_list = autogen.config_list_from_json(env_or_file=\"../OAI_CONFIG_LIST\", filter_dict={\"model\": [\"gpt-4o-mini\"]})\n", + "config_list = autogen.config_list_from_json(env_or_file=\"OAI_CONFIG_LIST\", filter_dict={\"model\": [\"gpt-4o-mini\"]})\n", "llm_config = {\"config_list\": config_list, \"timeout\": 120}\n", "\n", "# Put the OpenAI API key into the environment\n", @@ -111,7 +111,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -139,7 +139,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -341,15 +341,15 @@ ")\n", "\n", "# Ingest data and initialize the database\n", - "# query_engine.init_db(input_doc=input_documents)\n", + "query_engine.init_db(input_doc=input_documents)\n", "\n", "# If you have already ingested and created the database, you can use this connect_db instead of init_db\n", - "query_engine.connect_db()" + "# query_engine.connect_db()" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -385,7 +385,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ @@ -415,7 +415,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ @@ -505,7 +505,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -531,7 +531,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ @@ -575,7 +575,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "metadata": {}, "outputs": [], "source": [ @@ -636,7 +636,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -676,9 +676,355 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 27, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[33mcustomer\u001b[0m (to chat_manager):\n", + "\n", + "I want to go to Rome for a couple of days. Can you help me plan my trip?\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: planner_agent\n", + "\u001b[0m\n", + "\u001b[33mplanner_agent\u001b[0m (to chat_manager):\n", + "\n", + "Of course! I'd love to help you plan your trip to Rome. \n", + "\n", + "To get started, could you please provide me with the following information:\n", + "1. How many days will you be staying in Rome?\n", + "2. What activities or attractions are you interested in? (e.g., historical sites, museums, shopping, dining, etc.)\n", + "3. Do you have any specific preferences for meals or restaurants? \n", + "\n", + "Once I have this information, I can start creating an itinerary for you!\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: customer\n", + "\u001b[0m\n", + "\u001b[33mcustomer\u001b[0m (to chat_manager):\n", + "\n", + "2 days please, I want lunch and dinner, with an attraction to see in the morning and after lunch.\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: planner_agent\n", + "\u001b[0m\n", + "\u001b[33mplanner_agent\u001b[0m (to chat_manager):\n", + "\n", + "\u001b[32m***** Suggested tool call (call_2dmMbckU5YjaCsL6Y8pWbrdK): transfer_to_graphrag_agent *****\u001b[0m\n", + "Arguments: \n", + "{}\n", + "\u001b[32m*******************************************************************************************\u001b[0m\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: Tool_Execution\n", + "\u001b[0m\n", + "\u001b[35m\n", + ">>>>>>>> EXECUTING FUNCTION transfer_to_graphrag_agent...\u001b[0m\n", + "\u001b[33mTool_Execution\u001b[0m (to chat_manager):\n", + "\n", + "\u001b[32m***** Response from calling tool (call_2dmMbckU5YjaCsL6Y8pWbrdK) *****\u001b[0m\n", + "SwarmAgent --> graphrag_agent\n", + "\u001b[32m**********************************************************************\u001b[0m\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: graphrag_agent\n", + "\u001b[0m\n", + "\u001b[33mgraphrag_agent\u001b[0m (to chat_manager):\n", + "\n", + "Restaurants in Rome:\n", + "1. Trattoria da Enzo - Italian, traditional Roman dishes, rating: 4.5\n", + "2. Il Pagliaccio - Italian, Michelin-starred, rating: 4.8\n", + "3. Tonnarello - Italian, traditional dishes, rating: 4.7\n", + "4. Osteria delle Commari - Italian, home-style Roman cuisine, rating: 4.3\n", + "5. Armando al Pantheon - Italian, traditional Roman cuisine, rating: 4.8\n", + "6. Salumeria Roscioli Ristorante - Italian, pasta and wine cellar, rating: 4.5\n", + "7. L'Arcangelo - Italian, known for supplì and gnocchi, rating: 4.8\n", + "\n", + "Attractions in Rome:\n", + "1. Colosseum - Historical site\n", + "2. Vatican Museums - Art museum\n", + "3. Trevi Fountain - Landmark\n", + "4. Basilica di Santa Maria Maggiore - Religious site\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: planner_agent\n", + "\u001b[0m\n", + "\u001b[33mplanner_agent\u001b[0m (to chat_manager):\n", + "\n", + "Great! Here’s a proposed 2-day itinerary for your trip to Rome:\n", + "\n", + "### Day 1:\n", + "- **Morning:**\n", + " - **Type:** Attraction \n", + " - **Location:** Colosseum \n", + " - **City:** Rome \n", + " - **Description:** Explore the iconic symbol of Rome, a magnificent ancient amphitheater where gladiators once battled.\n", + "\n", + "- **Lunch:**\n", + " - **Type:** Restaurant \n", + " - **Location:** Trattoria da Enzo \n", + " - **City:** Rome \n", + " - **Description:** Enjoy traditional Roman dishes in a charming setting with great ratings.\n", + "\n", + "- **Afternoon:**\n", + " - **Type:** Attraction \n", + " - **Location:** Trevi Fountain \n", + " - **City:** Rome \n", + " - **Description:** Visit the stunning baroque fountain and toss a coin to ensure your return to Rome.\n", + "\n", + "- **Dinner:**\n", + " - **Type:** Restaurant \n", + " - **Location:** Armando al Pantheon \n", + " - **City:** Rome \n", + " - **Description:** Savor authentic Roman cuisine in a restaurant that boasts a great atmosphere and top-notch dishes.\n", + "\n", + "### Day 2:\n", + "- **Morning:**\n", + " - **Type:** Attraction \n", + " - **Location:** Vatican Museums \n", + " - **City:** Rome \n", + " - **Description:** Discover a vast collection of art and historical artifacts, including the famous Sistine Chapel.\n", + "\n", + "- **Lunch:**\n", + " - **Type:** Restaurant \n", + " - **Location:** Osteria delle Commari \n", + " - **City:** Rome \n", + " - **Description:** Enjoy home-style Roman cuisine in a cozy, welcoming environment.\n", + "\n", + "- **Afternoon:**\n", + " - **Type:** Attraction \n", + " - **Location:** Basilica di Santa Maria Maggiore \n", + " - **City:** Rome \n", + " - **Description:** Explore one of the largest churches in Rome, known for its beautiful mosaics and rich history.\n", + "\n", + "- **Dinner:**\n", + " - **Type:** Restaurant \n", + " - **Location:** Il Pagliaccio \n", + " - **City:** Rome \n", + " - **Description:** Experience a Michelin-starred dining option with a unique menu and exquisite taste.\n", + "\n", + "Does this itinerary look good to you? Let me know if you would like any changes or adjustments!\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: customer\n", + "\u001b[0m\n", + "\u001b[33mcustomer\u001b[0m (to chat_manager):\n", + "\n", + "I'm not a fan of Il Pagliaccio, please select another restaurant.\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: planner_agent\n", + "\u001b[0m\n", + "\u001b[33mplanner_agent\u001b[0m (to chat_manager):\n", + "\n", + "\u001b[32m***** Suggested tool call (call_7aUs54WvG0A31PNTJnNyKUWE): transfer_to_graphrag_agent *****\u001b[0m\n", + "Arguments: \n", + "{}\n", + "\u001b[32m*******************************************************************************************\u001b[0m\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: Tool_Execution\n", + "\u001b[0m\n", + "\u001b[35m\n", + ">>>>>>>> EXECUTING FUNCTION transfer_to_graphrag_agent...\u001b[0m\n", + "\u001b[33mTool_Execution\u001b[0m (to chat_manager):\n", + "\n", + "\u001b[32m***** Response from calling tool (call_7aUs54WvG0A31PNTJnNyKUWE) *****\u001b[0m\n", + "SwarmAgent --> graphrag_agent\n", + "\u001b[32m**********************************************************************\u001b[0m\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: graphrag_agent\n", + "\u001b[0m\n", + "\u001b[33mgraphrag_agent\u001b[0m (to chat_manager):\n", + "\n", + "Restaurants in Rome:\n", + "1. Trattoria da Enzo - Italian, traditional Roman dishes, rating: 4.5\n", + "2. Il Pagliaccio - Italian, Michelin-starred, rating: 4.8\n", + "3. Tonnarello - Italian, traditional dishes, rating: 4.7\n", + "4. Osteria delle Commari - Italian, home-style Roman cuisine, rating: 4.3\n", + "5. Armando al Pantheon - Italian, traditional Roman cuisine, rating: 4.8\n", + "6. Salumeria Roscioli Ristorante - Italian, pasta and wine cellar, rating: 4.5\n", + "7. L'Arcangelo - Italian, known for supplì and gnocchi, rating: 4.8\n", + "\n", + "Attractions in Rome:\n", + "1. Colosseum - Historical site\n", + "2. Vatican Museums - Art museum\n", + "3. Trevi Fountain - Landmark\n", + "4. Basilica di Santa Maria Maggiore - Religious site\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: planner_agent\n", + "\u001b[0m\n", + "\u001b[33mplanner_agent\u001b[0m (to chat_manager):\n", + "\n", + "No problem! Let's replace Il Pagliaccio with another restaurant.\n", + "\n", + "### Updated Day 2 Itinerary:\n", + "- **Dinner:**\n", + " - **Type:** Restaurant \n", + " - **Location:** Tonnarello \n", + " - **City:** Rome \n", + " - **Description:** Enjoy traditional Italian dishes in a vibrant atmosphere, known for its great flavors and local feel.\n", + "\n", + "Here's the complete itinerary:\n", + "\n", + "### Day 1:\n", + "- **Morning:** \n", + " - **Type:** Attraction \n", + " - **Location:** Colosseum \n", + " - **City:** Rome \n", + " - **Description:** Explore the iconic symbol of Rome, a magnificent ancient amphitheater where gladiators once battled.\n", + "\n", + "- **Lunch:** \n", + " - **Type:** Restaurant \n", + " - **Location:** Trattoria da Enzo \n", + " - **City:** Rome \n", + " - **Description:** Enjoy traditional Roman dishes in a charming setting with great ratings.\n", + "\n", + "- **Afternoon:** \n", + " - **Type:** Attraction \n", + " - **Location:** Trevi Fountain \n", + " - **City:** Rome \n", + " - **Description:** Visit the stunning baroque fountain and toss a coin to ensure your return to Rome.\n", + "\n", + "- **Dinner:** \n", + " - **Type:** Restaurant \n", + " - **Location:** Armando al Pantheon \n", + " - **City:** Rome \n", + " - **Description:** Savor authentic Roman cuisine in a restaurant that boasts a great atmosphere and top-notch dishes.\n", + "\n", + "### Day 2:\n", + "- **Morning:** \n", + " - **Type:** Attraction \n", + " - **Location:** Vatican Museums \n", + " - **City:** Rome \n", + " - **Description:** Discover a vast collection of art and historical artifacts, including the famous Sistine Chapel.\n", + "\n", + "- **Lunch:** \n", + " - **Type:** Restaurant \n", + " - **Location:** Osteria delle Commari \n", + " - **City:** Rome \n", + " - **Description:** Enjoy home-style Roman cuisine in a cozy, welcoming environment.\n", + "\n", + "- **Afternoon:** \n", + " - **Type:** Attraction \n", + " - **Location:** Basilica di Santa Maria Maggiore \n", + " - **City:** Rome \n", + " - **Description:** Explore one of the largest churches in Rome, known for its beautiful mosaics and rich history.\n", + "\n", + "- **Dinner:** \n", + " - **Type:** Restaurant \n", + " - **Location:** Tonnarello \n", + " - **City:** Rome \n", + " - **Description:** Enjoy traditional Italian dishes in a vibrant atmosphere, known for its great flavors and local feel.\n", + "\n", + "Are you happy with this updated itinerary? Let me know if you want any more changes!\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: customer\n", + "\u001b[0m\n", + "\u001b[33mcustomer\u001b[0m (to chat_manager):\n", + "\n", + "Great, thank you, let's go!\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: planner_agent\n", + "\u001b[0m\n", + "\u001b[33mplanner_agent\u001b[0m (to chat_manager):\n", + "\n", + "\u001b[32m***** Suggested tool call (call_RibOtG2YA85QXVBaUzoSS2El): mark_itinerary_as_complete *****\u001b[0m\n", + "Arguments: \n", + "{\"final_itinerary\":\"### Day 1:\\n- **Morning:** \\n - **Type:** Attraction \\n - **Location:** Colosseum \\n - **City:** Rome \\n - **Description:** Explore the iconic symbol of Rome, a magnificent ancient amphitheater where gladiators once battled.\\n\\n- **Lunch:** \\n - **Type:** Restaurant \\n - **Location:** Trattoria da Enzo \\n - **City:** Rome \\n - **Description:** Enjoy traditional Roman dishes in a charming setting with great ratings.\\n\\n- **Afternoon:** \\n - **Type:** Attraction \\n - **Location:** Trevi Fountain \\n - **City:** Rome \\n - **Description:** Visit the stunning baroque fountain and toss a coin to ensure your return to Rome.\\n\\n- **Dinner:** \\n - **Type:** Restaurant \\n - **Location:** Armando al Pantheon \\n - **City:** Rome \\n - **Description:** Savor authentic Roman cuisine in a restaurant that boasts a great atmosphere and top-notch dishes.\\n\\n### Day 2:\\n- **Morning:** \\n - **Type:** Attraction \\n - **Location:** Vatican Museums \\n - **City:** Rome \\n - **Description:** Discover a vast collection of art and historical artifacts, including the famous Sistine Chapel.\\n\\n- **Lunch:** \\n - **Type:** Restaurant \\n - **Location:** Osteria delle Commari \\n - **City:** Rome \\n - **Description:** Enjoy home-style Roman cuisine in a cozy, welcoming environment.\\n\\n- **Afternoon:** \\n - **Type:** Attraction \\n - **Location:** Basilica di Santa Maria Maggiore \\n - **City:** Rome \\n - **Description:** Explore one of the largest churches in Rome, known for its beautiful mosaics and rich history.\\n\\n- **Dinner:** \\n - **Type:** Restaurant \\n - **Location:** Tonnarello \\n - **City:** Rome \\n - **Description:** Enjoy traditional Italian dishes in a vibrant atmosphere, known for its great flavors and local feel.\"}\n", + "\u001b[32m*******************************************************************************************\u001b[0m\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: Tool_Execution\n", + "\u001b[0m\n", + "\u001b[35m\n", + ">>>>>>>> EXECUTING FUNCTION mark_itinerary_as_complete...\u001b[0m\n", + "\u001b[33mTool_Execution\u001b[0m (to chat_manager):\n", + "\n", + "\u001b[32m***** Response from calling tool (call_RibOtG2YA85QXVBaUzoSS2El) *****\u001b[0m\n", + "Itinerary recorded and confirmed.\n", + "\u001b[32m**********************************************************************\u001b[0m\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: structured_output_agent\n", + "\u001b[0m\n", + "\u001b[33mstructured_output_agent\u001b[0m (to chat_manager):\n", + "\n", + "{\"days\":[{\"events\":[{\"type\":\"Attraction\",\"location\":\"Colosseum\",\"city\":\"Rome\",\"description\":\"Explore the iconic symbol of Rome, a magnificent ancient amphitheater where gladiators once battled.\"},{\"type\":\"Restaurant\",\"location\":\"Trattoria da Enzo\",\"city\":\"Rome\",\"description\":\"Enjoy traditional Roman dishes in a charming setting with great ratings.\"},{\"type\":\"Attraction\",\"location\":\"Trevi Fountain\",\"city\":\"Rome\",\"description\":\"Visit the stunning baroque fountain and toss a coin to ensure your return to Rome.\"},{\"type\":\"Restaurant\",\"location\":\"Armando al Pantheon\",\"city\":\"Rome\",\"description\":\"Savor authentic Roman cuisine in a restaurant that boasts a great atmosphere and top-notch dishes.\"}]},{\"events\":[{\"type\":\"Attraction\",\"location\":\"Vatican Museums\",\"city\":\"Rome\",\"description\":\"Discover a vast collection of art and historical artifacts, including the famous Sistine Chapel.\"},{\"type\":\"Restaurant\",\"location\":\"Osteria delle Commari\",\"city\":\"Rome\",\"description\":\"Enjoy home-style Roman cuisine in a cozy, welcoming environment.\"},{\"type\":\"Attraction\",\"location\":\"Basilica di Santa Maria Maggiore\",\"city\":\"Rome\",\"description\":\"Explore one of the largest churches in Rome, known for its beautiful mosaics and rich history.\"},{\"type\":\"Restaurant\",\"location\":\"Tonnarello\",\"city\":\"Rome\",\"description\":\"Enjoy traditional Italian dishes in a vibrant atmosphere, known for its great flavors and local feel.\"}]}]}\n", + "\u001b[32m***** Suggested tool call (call_ZZuv1U9iUcZZaDsa7hOGtaFY): create_structured_itinerary *****\u001b[0m\n", + "Arguments: \n", + "{\"structured_itinerary\":{\"days\":[{\"events\":[{\"type\":\"Attraction\",\"location\":\"Colosseum\",\"city\":\"Rome\",\"description\":\"Explore the iconic symbol of Rome, a magnificent ancient amphitheater where gladiators once battled.\"},{\"type\":\"Restaurant\",\"location\":\"Trattoria da Enzo\",\"city\":\"Rome\",\"description\":\"Enjoy traditional Roman dishes in a charming setting with great ratings.\"},{\"type\":\"Attraction\",\"location\":\"Trevi Fountain\",\"city\":\"Rome\",\"description\":\"Visit the stunning baroque fountain and toss a coin to ensure your return to Rome.\"},{\"type\":\"Restaurant\",\"location\":\"Armando al Pantheon\",\"city\":\"Rome\",\"description\":\"Savor authentic Roman cuisine in a restaurant that boasts a great atmosphere and top-notch dishes.\"}]},{\"events\":[{\"type\":\"Attraction\",\"location\":\"Vatican Museums\",\"city\":\"Rome\",\"description\":\"Discover a vast collection of art and historical artifacts, including the famous Sistine Chapel.\"},{\"type\":\"Restaurant\",\"location\":\"Osteria delle Commari\",\"city\":\"Rome\",\"description\":\"Enjoy home-style Roman cuisine in a cozy, welcoming environment.\"},{\"type\":\"Attraction\",\"location\":\"Basilica di Santa Maria Maggiore\",\"city\":\"Rome\",\"description\":\"Explore one of the largest churches in Rome, known for its beautiful mosaics and rich history.\"},{\"type\":\"Restaurant\",\"location\":\"Tonnarello\",\"city\":\"Rome\",\"description\":\"Enjoy traditional Italian dishes in a vibrant atmosphere, known for its great flavors and local feel.\"}]}]}}\n", + "\u001b[32m********************************************************************************************\u001b[0m\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: Tool_Execution\n", + "\u001b[0m\n", + "\u001b[35m\n", + ">>>>>>>> EXECUTING FUNCTION create_structured_itinerary...\u001b[0m\n", + "\u001b[33mTool_Execution\u001b[0m (to chat_manager):\n", + "\n", + "\u001b[32m***** Response from calling tool (call_ZZuv1U9iUcZZaDsa7hOGtaFY) *****\u001b[0m\n", + "Structured itinerary stored.\n", + "\u001b[32m**********************************************************************\u001b[0m\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: route_timing_agent\n", + "\u001b[0m\n", + "\u001b[33mroute_timing_agent\u001b[0m (to chat_manager):\n", + "\n", + "\u001b[32m***** Suggested tool call (call_H8U9HTdJTnY8kxU2QFiq1aCn): update_itinerary_with_travel_times *****\u001b[0m\n", + "Arguments: \n", + "{}\n", + "\u001b[32m***************************************************************************************************\u001b[0m\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: Tool_Execution\n", + "\u001b[0m\n", + "\u001b[35m\n", + ">>>>>>>> EXECUTING FUNCTION update_itinerary_with_travel_times...\u001b[0m\n", + "\u001b[33mTool_Execution\u001b[0m (to chat_manager):\n", + "\n", + "\u001b[32m***** Response from calling tool (call_H8U9HTdJTnY8kxU2QFiq1aCn) *****\u001b[0m\n", + "Timed itinerary added to context with travel times\n", + "\u001b[32m**********************************************************************\u001b[0m\n", + "\n", + "--------------------------------------------------------------------------------\n", + "\u001b[32m\n", + "Next speaker: route_timing_agent\n", + "\u001b[0m\n", + "\u001b[33mroute_timing_agent\u001b[0m (to chat_manager):\n", + "\n", + "Your itinerary is ready! Enjoy your trip to Rome, exploring the Colosseum, Vatican Museums, and delicious dining experiences at the recommended restaurants. If you have any further questions or need assistance while you're there, feel free to reach out! Safe travels!\n", + "\n", + "--------------------------------------------------------------------------------\n" + ] + } + ], "source": [ "# Start the conversation\n", "\n", @@ -702,9 +1048,92 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 28, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " █ █ \n", + " █ █ \n", + " █ █████ █ \n", + " ██ ██ \n", + " █ █ \n", + " █ ███████ █ \n", + " █ ██ ███ ██ █ \n", + " █████████ \n", + " \n", + " ██ ███ ███ \n", + " █ █ █ █ \n", + " ████ █ ██ ██ \n", + " █ █ █ █ █ \n", + " █ █ ██ ████ \n", + " \n", + " Itinerary for Rome \n", + "================================================================================\n", + " \n", + "Day 1 \n", + "--------------------------------------------------------------------------------\n", + "\n", + " 🏛️ Colosseum\n", + " Explore the iconic symbol of Rome, a magnificent ancient amphitheater \n", + " where gladiators once battled. \n", + "\n", + " 🚶 walking from Colosseum to Trattoria da Enzo\n", + " 24 mins, (1.8 km)\n", + "\n", + " 🍽️ Trattoria da Enzo\n", + " Enjoy traditional Roman dishes in a charming setting with great \n", + " ratings. \n", + "\n", + " 🚶 walking from Trattoria da Enzo to Trevi Fountain\n", + " 28 mins, (2.0 km)\n", + "\n", + " 🏛️ Trevi Fountain\n", + " Visit the stunning baroque fountain and toss a coin to ensure your \n", + " return to Rome. \n", + "\n", + " 🚶 walking from Trevi Fountain to Armando al Pantheon\n", + " 9 mins, (0.7 km)\n", + "\n", + " 🍽️ Armando al Pantheon\n", + " Savor authentic Roman cuisine in a restaurant that boasts a great \n", + " atmosphere and top-notch dishes. \n", + "\n", + "--------------------------------------------------------------------------------\n", + " \n", + "Day 2 \n", + "--------------------------------------------------------------------------------\n", + "\n", + " 🏛️ Vatican Museums\n", + " Discover a vast collection of art and historical artifacts, including \n", + " the famous Sistine Chapel. \n", + "\n", + " 🚶 walking from Vatican Museums to Osteria delle Commari\n", + " 2 mins, (0.2 km)\n", + "\n", + " 🍽️ Osteria delle Commari\n", + " Enjoy home-style Roman cuisine in a cozy, welcoming environment. \n", + "\n", + " 🚶 walking from Osteria delle Commari to Basilica di Santa Maria Maggiore\n", + " 1 hour 5 mins, (4.6 km)\n", + "\n", + " 🏛️ Basilica di Santa Maria Maggiore\n", + " Explore one of the largest churches in Rome, known for its beautiful \n", + " mosaics and rich history. \n", + "\n", + " 🚶 walking from Basilica di Santa Maria Maggiore to Tonnarello\n", + " 44 mins, (3.2 km)\n", + "\n", + " 🍽️ Tonnarello\n", + " Enjoy traditional Italian dishes in a vibrant atmosphere, known for its \n", + " great flavors and local feel. \n", + "\n", + "--------------------------------------------------------------------------------\n" + ] + } + ], "source": [ "def print_itinerary(itinerary_data):\n", " header = \"█ █\\n █ █ \\n █ █████ █ \\n ██ ██ \\n █ █ \\n █ ███████ █ \\n █ ██ ███ ██ █ \\n █████████ \\n\\n ██ ███ ███ \\n█ █ █ █ \\n████ █ ██ ██ \\n█ █ █ █ █ \\n█ █ ██ ████ \\n\"\n",