This is a web-based chatbot application designed to provide general medical information. It uses the OpenAI API to generate responses to user questions. The chatbot is based on the GPT-3.5-turbo model and includes logic to filter out non-medical queries.
- Interactive chatbot embedded in a web interface
- Filters out irrelevant or non-medical queries
- Provides structured responses to general health-related questions
- API key management via
.envfile - Live chatbox interface with real-time conversation
- Backend: Python, Django, OpenAI API, spaCy, os, dotenv
- Frontend: HTML, CSS, JavaScript
User: "How to deal with frequent vomiting?"
Bot: (Provides a detailed answer based on general medical knowledge)
User: "When did World War II start?"
Bot: "I'm a medical chatbot and can only answer questions related to healthcare."
- Clone the repository to your local environment
- Create a
.envfile with the following content:
OPENAI_KEY='your-api-key-here'- Start the Django development server:
python manage.py runserver
-
Open your browser and go to: http://localhost:8000
-
You should see a chat interface titled βWIRTUALNA POMOC MEDYCZNA ONLINE 24/7β. In the bottom-right corner, click the chat icon to start asking questions.

This project was developed in collaboration with another team member as part of a university assignment.
The project was built jointly, and both contributors participated in the backend and frontend development, as well as OpenAI API integration.
This project is for educational purposes only. It should not be used to diagnose or treat real medical conditions. Always consult a healthcare professional.