TravelMapper is a travel agent application that uses OpenAI, Google Gemini, and Google Maps APIs to create and map travel itineraries based on user input. It features a user-friendly interface hosted on Gradio for interactive experiences.
This project is an implementation of the Medium article by Martin Short: Building a Smart Travel Itinerary Suggester with Langchain, Google Maps API, and Gradio.
-
Travel Itinerary Generation: Enter a travel request, choose the model to use, and generate a detailed itinerary along with a map showing the suggested route.
-
Basic Error Handling: If an unrealistic request is entered, the application provides an explanation and may suggest alternatives.
-
Extended Trip Generation: Generate trips with more stops than the Google Maps API query limit (25 waypoints). The application handles this by breaking the route into segments and sending multiple requests.
Create a .env file in the top-level directory (i.e., travel_mapper) with the following content:
OPENAI_API_KEY={your_openai_key}
GOOGLE_MAPS_API_KEY={your_google_maps_api_key}
GOOGLE_PALM_API_KEY={your_google_palm_api_key}
- Make sure to install the required Python packages.
pip install -r requirements.txt
- To start the Gradio app, run the module for the user interface.
python -m travel_mapper.user_interface.driver - Alternatively, use the provided
runscript, ensuring it has execution permissions.travel_mapper/user_interface/run.sh
This project is licensed under the MIT License - see the LICENSE file for details.