This project is an AI-driven vacation planner assistant that engages users in dynamic conversations to provide real-time hotel recommendations. Built using Google's Generative AI and integrated with SerpAPI, it seamlessly combines AI capabilities with live data to simplify vacation planning.
- Real-Time Hotel Search: Fetch live hotel recommendations tailored to the user's preferences (e.g., location, dates, price range, amenities).
- Intelligent Conversations: The assistant uses Google's
geminimodel to maintain a natural and interactive conversation flow. - Tool Integration: AI seamlessly triggers real-time hotel queries using SerpAPI.
- Timezone Awareness: Handles timezone differences explicitly to ensure accurate date handling for bookings.
- Error Handling: Provides clear feedback in case of invalid inputs or unexpected issues.
- Interactive Console: Users can engage directly via a clean and conversational command-line interface.
Ensure you have the following installed and set up:
- Python 3.8 or higher
- Environment Variables
GOOGLE_API_KEY: API key for Google Generative AI.SERP_API_KEY: API key for SerpAPI hotel data.
-
Clone the repository:
git clone https://github.com/401-Nick/AI-Travel-Bot cd AI-Travel-Bot -
Install required libraries:
pip install -r requirements.txt
-
Set up environment variables:
- Create a
.envfile in the project root directory. - Add the following keys:
GOOGLE_API_KEY="your_google_api_key" SERP_API_KEY="your_serpapi_key"
- Create a
To start the assistant, run:
python main.py- Launch the assistant and type your query (e.g., "Find hotels in New York for next weekend").
- Type
exitorquitto end the conversation.
- User Input: The assistant engages the user for details like destination, check-in/out dates, price range, etc.
- Hotel Search Trigger: The assistant identifies hotel-related queries and fetches data via SerpAPI.
- Live Results: Processed hotel data is displayed with ratings, price estimates, and direct booking links.
- Dynamic Follow-ups: AI ensures the conversation flows naturally while accommodating user preferences.
User: Find hotels in Los Angeles for December 16-20 under $300.
Assistant:
Fetching top-rated hotels in Los Angeles from Dec 16 to Dec 20 within a $300 budget...
Hotel 1: Sunset Inn
Price: $285/night
Rating: 4.6⭐
[Link to Hotel Booking]
Features: Free Wi-Fi, Parking, Outdoor Pool
If the AI encounters an issue:
- It retries the hotel search.
- If invalid data is provided, the assistant requests clarification.
- AI Model: Google Generative AI (
gemini-2.0-flash-exp) - Real-Time Data: SerpAPI for hotel search
- Language: Python 3
- Environment Management:
dotenvfor API keys - CLI Interaction: Console-based user input/output