# Healthcare AI Assistant A FastAPI-based AI assistant that handles healthcare appointment booking and queries in multiple languages. ## Features - Multi-language support (English and Arabic) - Appointment booking and cancellation - Sentiment analysis - Language detection - User-friendly responses ## Setup 1. Create a virtual environment: ```bash python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate ``` 2. Install dependencies: ```bash pip install -r requirements.txt ``` 3. Set up environment variables: Create a `.env` file in the root directory with the following variables: ``` API_BASE_URL=your_api_base_url API_KEY=your_api_key ``` ## Running the Application Start the FastAPI server: ```bash uvicorn main:app --reload ``` The API will be available at `http://localhost:8000` ## API Documentation Once the server is running, you can access: - Interactive API documentation: `http://localhost:8000/docs` - Alternative API documentation: `http://localhost:8000/redoc` ## API Endpoints ### POST /query Process a user query and return a response. Request body: ```json { "query": "string", "language": "string (optional)" } ``` Response: ```json { "routing_info": { "endpoint": "string", "method": "string", "parameters": {} }, "api_response": {}, "user_friendly_response": "string", "detected_language": "string", "sentiment": { "compound": float, "pos": float, "neu": float, "neg": float } } ``` ### GET /health Health check endpoint. Response: ```json { "status": "healthy", "service": "healthcare-ai-assistant" } ```