Este projeto é um assistente de chatbot no Telegram usando a API Openai e Langchain. Ele coleta informações dos usuários para sugerir hotéis com base em suas preferências.
Existem duas versões. No primeiro, usei um servidor de frasco. No segundo, implantei o bot usando a AWS Lambda, AWS ECR e AWS DynamoDB.


No vídeo, você notará o chatbot começando ao receber o usuário com o nome de usuário do Telegram. Então ele começa a perguntar sobre as preferências do usuário, como City, Check-in e Checkout .... Depois de coletar as informações necessárias, o sistema utilizará a API de reserva para apresentar as opções de hotéis.
servidor Falsk:
docker build --no-cache -f Dockerfile.flask -t BookingMate .docker run -p 5000:5000 BookingMateAWS Lambda sem servidor:
docker build --no-cache -f Dockerfile.lambda -t BookingMate .https://api.telegram.org/bot<Bot_token>/setWebhook?url=<API_GateWay_link> , seja você que você recebe a mensagem "webhook foi definido"Depois de instalar requisitos e preencher e executar api_keys.sh, você pode tentar escapar esses testes da pasta de testes.
- 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