This project is a chatbot assistant on Telegram using OpenAI API and langchain. It collects information from users to suggest hotels based on their preferences.
There are two versions. In the first one, I used a Flask server. In the second one, I deployed the bot using AWS Lambda, AWS ECR, and AWS DynamoDB.


In the video, you will notice the chatbot starting by welcoming the user with their Telegram username.Then it begins to ask about user preferences, such as city, check-in, and checkout... . Once it has collected the required information, the system will utilize the Booking API to present hotel options.
falsk server :
docker build --no-cache -f Dockerfile.flask -t BookingMate .docker run -p 5000:5000 BookingMateaws lambda serverless:
docker build --no-cache -f Dockerfile.lambda -t BookingMate .https://api.telegram.org/bot<Bot_token>/setWebhook?url=<API_GateWay_link>, be sur that you get the message "webhook was set"After installing requirments and fill and execute api_keys.sh, you can try to excute this tests from tests folder.
- automated tests:
contains tests created using pytest to ensure each component from the application works as expected
To run it : `python -W ignore -m pytest tests/automated_tests/`
- manual tests : it has two files
- test_chatbot_manager : is a test for the bots perfomence with different scenarios, it helps to improve the prompt for Bots
to run it : `python -W ignore tests/manual_tests/test_chatbot_manager.py`
- test_telegram_bot : is a test for TelegramBot class if it has the ability to interact with user side
to use it :
- first : execute `python tests/manual_tests/test_telegram_bot.py`
- second : use telegram account to communicate with your bot