The Travel Agent application is designed to provide users with comprehensive travel itineraries and tips. Leveraging the power of OpenAI's GPT models, the application offers personalized travel advice, including event contexts, ticket prices, and relevant document retrieval to ensure a seamless travel planning experience.
- Chat-Based Interface: Utilizes OpenAI's ChatGPT for interactive travel queries.
- Research Agent: Employs various tools for fetching web-based travel information using LangChain framework and libraries.
- Document Retrieval: Gathers and processes relevant travel documents to enhance recommendations.
- Supervisor Agent: Integrates multiple data sources to generate comprehensive travel advice.
The application is structured around a serverless architecture, deployed on AWS Lambda for scalable and efficient request handling. It incorporates several components, including:
- LangChain OpenAI Integration: For accessing OpenAI's models.
- Web-Based Data Loaders: For scraping travel-related information from specified URLs.
- Vector Storage and Retrieval: Utilizes Chroma for document storage and retrieval based on query relevance.
The application is containerized using Docker, facilitating easy deployment to AWS. The provided Dockerfile outlines
the setup process, including environment preparation and dependency installation.
- AWS Account
- Docker installed on your local machine
- AWS CLI configured
- Build the Docker Image:
docker build --platform linux/x86_64 -t travel-agent-app . - Push the Image to Amazon ECR: Follow AWS documentation to create a repository and push the Docker image.
- Deploy to AWS Lambda: Use the AWS Management Console or AWS CLI to create a Lambda function with the uploaded Docker image.
The application requires an OpenAI API key for operation. This key should be set in a .env file in the project
root or configured as an environment variable in AWS Lambda.
Invoke the Lambda function with a JSON payload containing a question key for travel-related queries.
The application will process the request and return a comprehensive travel guide as a response.
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs, feature requests, or documentation improvements.
This project is licensed under the MIT License - see the LICENSE file for details.
- Diego de Miranda
- OpenAI for providing the GPT models.
- The LangChain community for the agent toolkits and integration libraries.