https://github.com/taherfattahi/langgraph-medical-ai-assistant
Conversational AI assistant for Good Health Clinic
https://github.com/taherfattahi/langgraph-medical-ai-assistant
agent gpt graph langchain langgraph openai
Last synced: 7 months ago
JSON representation
Conversational AI assistant for Good Health Clinic
- Host: GitHub
- URL: https://github.com/taherfattahi/langgraph-medical-ai-assistant
- Owner: taherfattahi
- License: mit
- Created: 2025-01-29T15:09:06.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-01-29T15:26:13.000Z (9 months ago)
- Last Synced: 2025-01-29T16:29:50.661Z (9 months ago)
- Topics: agent, gpt, graph, langchain, langgraph, openai
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Conversational AI assistant for Good Health Clinic
Using LangGraph, LangChain, and OpenAIโs GPT models, the system processes patient queries, updates their medical records, and provides intelligent responses based on their history.

## Features
- AI-powered Appointment Scheduling
- Patient Profile Management (tracks medical history, allergies, past treatments)
- Emergency Detection & Alert System
- Multi-turn Conversations with Memory
- Graph-based Conversational Flow with Decision Routing
## Code Overview
๐น ```check_condition()```
Routes the conversation:
- If the message contains ```"emergency"```, routes to ```handle_emergency()```
- Otherwise, routes to ```call_model()```
๐น ```call_model()```
Retrieves patient history and generates AI responses using OpenAI's GPT model.
๐น ```handle_emergency()```
Provides immediate emergency instructions.
๐น ```write_memory()```
Updates and stores patient medical records.
## Installation
1) Clone the Repository
```bash
git clone https://github.com/taherfattahi/langgraph-medical-ai-assistant
cd langgraph-medical-ai-assistant
```
2) Install Dependencies
Ensure you have Python 3.8+ and install the required dependencies:
```bash
pip install -r requirements.txt
```
3) Set Up Environment Variables
Create a .env file with your OpenAI API key:
```makefile
OPENAI_API_KEY=your-api-key-here
```
## Usage
Run the chatbot assistant:
```bash
python main.py
```
Example Conversation:
```plaintext
Hello Taher! Thank you for reaching out. I can help you schedule an appointment for your routine check-up. May I know your availability for the appointment?
```
For emergencies:
```plaintext
User: This is an emergency! I'm experiencing severe chest pain.
Assistant: Weโve detected an emergency. Please contact emergency services immediately or call our 24/7 urgent line: +43 00 00 00.
```
## Technologies Used
- LangGraph - Graph-based conversation routing
- LangChain - Memory and LLM integration
- OpenAI GPT - AI-powered responses
- Python - Core language
- InMemoryStore - Persistent patient data storage
## Contributors
๐จโ๐ป Taher Fattahi
๐ง Contact: taherfattahi11@gmail.com
Contributions are welcome! Feel free to fork the repo and submit pull requests. ๐
## License
This project is licensed under the MIT License.