API¶
pridar_telegram_bot.py¶
Deployment of PRIDAR Chatbot from VoiceFlow to Telegram
This program makes https requests to VoiceFlow with the received messages using the VoiceFlow API key and extracts the response payload to forward back to Telegram.
Documented by Linta Rahman
- pridar_telegram_bot.handle_message(message)¶
forwards the payload extracted from all responses to the user after first message
- Parameters
message (str) – user message for payload to be extracted
- pridar_telegram_bot.launch(message)¶
implements the API calls to Voiceflow for first message
- Parameters
message (str) – User response
- Returns
response – API call to VoiceFlow
- Return type
JSON object
- pridar_telegram_bot.sendMsg(message)¶
implements the API calls to Voiceflow
- Parameters
message (str) – User response
- Returns
response – API call to VoiceFlow
- Return type
JSON object
- pridar_telegram_bot.start(message)¶
only implemented when “/start” command is received forwards the payload extracted from the response to the user
- Parameters
message (str) – User’s first message
pridar_telegram_bot.py |