Medi-Mitra is a virtual medical assistant designed to provide friendly, knowledgeable responses to health-related inquiries. Acting as a supportive healthcare chatbot, it helps users understand symptoms, provides wellness tips, and explains basic medical concepts in an accessible, supportive way. This project is ideal for role-playing scenarios where users can get general health guidance.
- Medical Q&A: Answers questions on symptoms, wellness, and general healthcare.
- Doctor Roleplay: Responds with a knowledgeable, friendly tone similar to a doctor’s.
- Focused Topic Responses: Only answers medical questions, responding with a predefined message for other topics.
- Auto-Scroll: Chat auto-scrolls to the latest message, enhancing usability.
- React: For building the user interface.
- Axios: For making HTTP requests to the Generative Language model.
- React-Markdown: For displaying markdown-formatted responses.
- Tailwind CSS: For easy and responsive styling.
To run this project, add the following variables to your .env
file:
# API key for the Generative Language model
VITE_API_GENERATIVE_LANGUAGE_CLIENT
# Prompt to set the model’s behavior and tone
VITE_MEDICAL_ASSISTANT_PROMPT
-
Clone the Repository
git clone https://github.com/your-username/Medi-Mitra.git cd Medi-Mitra
-
Install Dependencies
npm install
-
Add Environment Variables
Create a
.env
file in the project root and add the variables as shown above. -
Run the App
npm run dev
-
Open in Browser
Go to
http://localhost:5173
to see Medi-Mitra in action!
- Type a health-related question in the input box.
- Medi-Mitra will respond with helpful information and wellness tips.
- For non-medical queries, Medi-Mitra will remind you that it is focused on healthcare topics.
- src/App.js: Main React component with the chat UI and API request handling.
- src/App.css: Custom styles for the app layout.
- public: Contains the favicon and any other static assets.
This project is licensed under the MIT License.