Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 1.82 KB

File metadata and controls

65 lines (50 loc) · 1.82 KB

AI Chatbot Setup Guide

The chatbot now supports multiple AI providers with automatic fallback, so it will always work even without API keys!

How It Works

The chatbot tries AI providers in this order:

  1. Google Gemini (if GOOGLE_GEMINI_API_KEY is set)
  2. OpenAI GPT-3.5 (if OPENAI_API_KEY is set)
  3. Hugging Face (if HUGGINGFACE_API_KEY is set)
  4. Smart Travel Assistant (always works - no API key needed!)

Setup Options

Option 1: No API Keys (Recommended for Testing)

The chatbot will work immediately using the smart travel assistant fallback! No setup needed.

Option 2: Google Gemini (Free Tier Available)

  1. Get API key from: https://makersuite.google.com/app/apikey
  2. Add to backend/.env:
    GOOGLE_GEMINI_API_KEY=your_api_key_here
    

Option 3: OpenAI (Paid)

  1. Get API key from: https://platform.openai.com/api-keys
  2. Add to backend/.env:
    OPENAI_API_KEY=your_api_key_here
    

Option 4: Hugging Face (Free)

  1. Get API key from: https://huggingface.co/settings/tokens
  2. Add to backend/.env:
    HUGGINGFACE_API_KEY=your_api_key_here
    

Smart Travel Assistant Features

Even without API keys, the chatbot can answer:

  • ✅ Greetings and basic questions
  • ✅ Travel planning queries
  • ✅ Destination recommendations
  • ✅ Budget questions
  • ✅ Safety and weather information
  • ✅ Sustainability questions
  • ✅ Photo swipe discovery
  • ✅ General travel tips

Testing

  1. Start the backend: cd backend && npm start
  2. Open the frontend: cd frontend && npm start
  3. Click the chatbot button (💬) in the bottom right
  4. Try asking:
    • "Hello"
    • "Help me plan a trip"
    • "What destinations do you have?"
    • "Tell me about safety"
    • Any travel-related question!

The chatbot will automatically use the best available AI provider!