I'm working with one of the chatbots from https://parl.ai/docs/index.html and have just managed to converse with my bot, initiating it in bash mode in my virtualenv at PythonAnywhere. Yay!
Now I'd like to move the whole interaction with the bot to a web page.
For this according to ParlAI docs, I need to have a chat server up and running and a client python script to run on the same machine and communicate thru a port. I have successfully created these two locally on my laptop and the client.py creates the interaction page at https://localhost:8080.
The name client.py is confusing as it is a client of the chat server, but it is also the web server for the interaction.
Once on that locally created and served page - the magic is on - a chatbot on a web page. And it can serve many pages simultaneously at localhost:8080.
At PythonAnywhere, I managed to create the chat server on port 8080, but once I tried to run the client, it mentioned that ports 8080 (or 80, 443) - connection refused.
First, I need a chat server to be able to talk with a client script via one of the ports on the same machine - is it possible at PA? How? Do I need to run everything within a web app or wsgi script (instead of bash) ?
In order to have a chat server and client at PythonAnywhere - I need some info:
-
Host - is this the address of a web page that was created in Flask, Web2Py, etc? Or is it just the raw wsgi page - if I pick the manual configuration of the web app ?
-
Port - for the chat server and client.py script to use ? (NOT the port to communicate with the world)
-
Where is the web page that the client app creates dynamically ? (used to be localhost:8080 on my laptop). is it the address of the web app ?
Here are the details for running a ParlAI chatbot https://parl.ai/docs/tutorial_chat_service.html#browser
Many thanks for your help