/pychat

A healthcare chatbot implemented using raw TCP sockets

Primary LanguagePython

PyChat

Healthcare Chatbot that advices patients for visiting clinics depending on patients complains. Repo. Demo.

Setup

  1. From the command line create a virtual environment and activate.
# Windows
> python -m venv .venv
> .venv\Scripts\activate

# Linux
> python3 -m venv .venv
> source .venv/bin/activate
  1. Install server dependencies.
> pip install -r server/requirements.txt
  1. Create an environment variables file and enter the database and email credentials for the server to use for tokens e.g.:
MONGO_URI=<mongodb connection>
EMAIL_HOST=<mail host>
SENDER_EMAIL=<sender email>
SENDER_PASSWORD=<sender password>

Instead of using your personal email, visit Ethereal. It creates a dummy account that simulates sending and recieving email. When running the client use the generated email to be able to view the token. Sometimes it doesn't catch emails or takes too long, in that case, just restart the server.

If you don't have a local MongoDB set up, you can create one for free on MongoDB.

  1. Run the server.
> python server/server.py <env-vars-file-path>
  1. Run the client.
> python client/cli.py