Proyek ini adalah asisten chatbot di telegram menggunakan OpenAI API dan Langchain. Ini mengumpulkan informasi dari pengguna untuk menyarankan hotel berdasarkan preferensi mereka.
Ada dua versi. Yang pertama, saya menggunakan server Flask. Di yang kedua, saya menggunakan bot menggunakan AWS Lambda, AWS ECR, dan AWS DynamoDB.


Dalam video, Anda akan melihat chatbot yang dimulai dengan menyambut pengguna dengan nama pengguna Telegram mereka. Kemudian mulai bertanya tentang preferensi pengguna, seperti kota, check-in, dan checkout .... Setelah mengumpulkan informasi yang diperlukan, sistem akan memanfaatkan API pemesanan untuk menyajikan opsi hotel.
Server Falsk:
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> , jadilah Anda mendapatkan pesan "Webhook diatur"Setelah memasang persyaratan dan mengisi dan menjalankan API_Keys.sh, Anda dapat mencoba untuk ekskute tes ini dari folder tes.
- 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