AI-powered chatbot integration for MindEase, a mental health and emotional well-being support platform for students.
This service provides an intelligent chatbot that helps students navigate academic stress and emotional challenges. It integrates with the main MindEase application via a REST API, offering multi-turn conversations with conversation history persistence.
Key Features:
- Empathetic AI Companion: Designed specifically to support students with academic stress, anxiety, time management, and emotional well-being
- Multi-turn Conversations: Maintains conversation history for contextual, natural discussions
- REST API: Easy integration with web and mobile clients
- Conversation Management: Create, retrieve, and manage user conversations
- Production-Ready: Deployed with Docker and health checks
- Backend: FastAPI REST API (port 8000)
- AI Model: Groq API with Llama 3.3 70B
- Database: SQLite with conversation and message persistence
- UI (Dev): Chainlit web interface (port 8001) for testing and development
- Docker and Docker Compose
- Groq API key (get one at console.groq.com)
- Clone the repository:
git clone https://github.com/DejusDevspace/MindEase-AI-Integration.git
cd MindEase-AI-Integration- Create
.envfile:
cp .env.example .env- Add your Groq API key to
.env:
GROQ_API_KEY=your_groq_api_key_here
GROQ_MODEL=llama-3.3-70b-versatile
MAX_TOKENS=500
TEMPERATURE=0.7
DEBUG=false
- Start the service:
docker-compose upThe API will be available at http://localhost:8000 with interactive docs at http://localhost:8000/docs.
- Python 3.13+
uvpackage manager (orpip)
- Clone the repository:
git clone https://github.com/DejusDevspace/MindEase-AI-Integration.git
cd MindEase-AI-Integration- Create
.envfile:
cp .env.example .env
# Add your Groq API key- Install dependencies:
uv sync- Run the FastAPI server:
python main.pyOr start the Chainlit interface for testing:
python main.py chainlitSend a message and get a response:
curl -X POST "http://localhost:8000/v1/chat" \
-H "Content-Type: application/json" \
-d '{
"user_id": "user123",
"content": "I am stressed about my exams",
"conversation_id": "conv-id-optional"
}'Response:
{
"message": "I hear you—exam stress is really tough...",
"conversation_id": "conv-uuid",
"tokens_used": 145
}Remove all messages from a conversation (keeps conversation record):
curl -X DELETE "http://localhost:8000/v1/conversations/{conversation_id}?user_id={user_id}"Delete a conversation and all its messages:
curl -X DELETE "http://localhost:8000/v1/conversations/{conversation_id}/delete?user_id={user_id}"curl http://localhost:8000/healthEnvironment variables in .env:
| Variable | Default | Description |
|---|---|---|
GROQ_API_KEY |
Required | Your Groq API key |
GROQ_MODEL |
llama-3.3-70b-versatile |
LLM model to use |
MAX_TOKENS |
500 |
Maximum response length |
TEMPERATURE |
0.7 |
Response creativity (0-1) |
DEBUG |
false |
Debug logging |
MindEase began as a capstone project during an internship at FlexiSAF Edusoft Limited, developed by a cross-functional team tasked with creating innovative solutions to support student well-being. The AI integration service was built to provide students with accessible, compassionate support for managing academic stress and emotional challenges.
For questions or issues, please open an issue on GitHub.