Making a Conversational Bot

Till echo_bot ,everything was working fine but after including utils.py and conversational_bot.py and changing echo_text to reply_text ,Nothing is working I am not getting reply of anything .Also there is no error showing while running in cmd ,It is also showing hello!! in localhost:8443.
Plz help!!.

hey @Bhawna ,
can you please upload your code on github or drive and share me its link so that i am to debug your code.

Thank You :slightly_smiling_face:.

https://drive.google.com/drive/folders/10xtxWsRYJ-XQihX2F9qMc7RoHFMfpBRE?usp=sharing this is my code.

hey @Bhawna ,
i am really sorry to reply so late .
Can you please provide access to these files , i am unable to view them.

Sir ,I have added permission to see .Can you plz check now??

i am checking it.
will get back to you as soon as i found something in it.

hey @Bhawna , i just ran your code and it worked absolutely fine,
Did you checked you telegram by sending messages and receiving something as a reply, ?

I sent message but I am not getting any reply

after sending a message check your cmd where ngrok is running , what does it shows and along with it the cmd prompt where your code is running , what does it shows.
and let me know both the outputs.
You can also share images of both for more better understanding .


Sir I am confused I have run only conversational_bot.py means only one cmd output I can show you

you might be running an ngrok server cmd too ?

Sir ,Will you elaborate more ,I didn’t get

to make telegram work ,we need to add a webhook to it.
so for this , before running our python file , you need to run in a separate cmd
command ngrok 8443.
This will reserve your port 8443 on localhost to interact with you flask local server. and this ngrok server will work with telegram to interact with flask and return the output required.


Getting this Sir

did you run your flask server after this ?
and also confirm that this url is set in your webhook in app.py

remove those spaces in beginning of url.

Yes,It worked…

:slightly_smiling_face:

When I typed ,“show me sports news” then it showed correctly
But When I typed ,“show me sports news from india in hindi”
It showed news in hindi but it is not related to sports ,Why is this happening?