This is the backend for Journeo, an advanced LLM-based travel itinerary planner. It leverages OpenAI's GPT models through LangGraph, Google Places API, and Mapbox GL JS to generate personalized, intelligent travel itineraries with precise geolocation details.
- Intelligent Itinerary Generation: Uses OpenAI's GPT to create personalized travel plans
- Preference Extraction: Advanced agent-based system to understand and extract user travel preferences
- Geocoding Services: Integrates Google's Geocoding and Places APIs to get precise location details
- Route Calculation: Uses Mapbox Directions API to calculate routes between destinations
Complementary frontend can be found in the Journeo Frontend Repository.
- Python
- FastAPI
- LangGraph
- OpenAI GPT-4o
- Google Places API
- Mapbox Geocoding API
Note: This is the backend component of Journeo. You must also set up the Journeo Frontend for a complete application experience.
-
Prerequisites:
- Python 3.8+
- OpenAI Account
- Google Cloud Platform Account
- Mapbox Account
-
Obtain necessary API keys:
-
Clone the repository:
git clone https://github.com/eugene-lok/journeo-backend.git cd journeo-backend
-
Create a virtual environment:
python3 -m venv env # Activate the environment # On Linux/Mac: source env/bin/activate # On Windows: \env\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
- Create a
.env
file in the root of your project - Add the following keys:
MAPBOX_ACCESS_TOKEN=your_mapbox_access_token OPENAI_API_KEY=your_openai_api_key GOOGLE_API_KEY=your_google_api_key
- Create a
-
Run the FastAPI server:
uvicorn app.main:app --reload
-
The API will be accessible on
http://localhost:8000
For the client-side implementation, visit the Journeo Frontend Repository.
- Uses LangGraph to create a state-based workflow for extracting travel preferences
- Handles complex, multi-turn conversations to gather trip details
- Ensures comprehensive information collection
- Leverages OpenAI's GPT-4o for intelligent itinerary creation
- Generates day-by-day travel plans with precise location details
- Calculates budget breakdowns and provides comprehensive travel guidance
- Uses Google Places API to get detailed location information
- Retrieves coordinates, place details, and photos
- Calculates routes between destinations using Mapbox Directions API