A sophisticated AI therapy chatbot application that provides empathetic conversational support with intelligent memory management.

- AI-Powered Therapy Chat: Conversations powered by OpenAI GPT-4
- Long-term Memory: Pinecone vector database for cross-session memory
- Intelligent Filtering: LLM-based conversation importance evaluation
- Beautiful UI: Modern, responsive interface with custom logo
- Session Management: Persistent conversation history
- Secure: Environment-based configuration for API keys
- FastAPI: Modern Python web framework
- MongoDB: Document database for session storage
- Pinecone: Vector database for long-term memory
- OpenAI GPT-4: AI conversation engine
- Motor: Async MongoDB driver
- React: Modern JavaScript framework
- Framer Motion: Smooth animations
- Tailwind CSS: Utility-first styling
- Axios: HTTP client for API calls
- Lucide Icons: Beautiful icon set
- Python 3.8+
- Node.js 16+
- MongoDB (local or cloud)
- OpenAI API key
- Pinecone API key
- Navigate to backend folder
cd backend - Install dependencies
pip install -r requirements.txt
- Configure environment
Edit
cp .env.example .env
.envwith your API keys:OPENAI_API_KEY=your_openai_api_key_here PINECONE_API_KEY=your_pinecone_api_key_here MONGO_URL=mongodb://localhost:27017/aitherapist - Start the server
python -m uvicorn server:app --reload
- Navigate to frontend folder
cd frontend - Install dependencies
npm install
- Configure environment
cp .env.example .env
- Start the frontend
npm start
- OpenAI API Key: Get from OpenAI Platform
- Pinecone API Key: Get from Pinecone Console
- MongoDB: Local installation or MongoDB Atlas
Backend (.env):
MONGO_URL=mongodb://localhost:27017/aitherapist
DB_NAME=aitherapist
CORS_ORIGINS=*
OPENAI_API_KEY=your_key_here
PINECONE_API_KEY=your_key_here
PINECONE_ENVIRONMENT=us-east-1
PINECONE_INDEX=mychatbotFrontend (.env):
REACT_APP_BACKEND_URL=http://localhost:8000
WDS_SOCKET_PORT=0cd backend
python -m uvicorn server:app --reload --host 0.0.0.0 --port 8000cd frontend
npm start- Update environment variables for production
- Use production MongoDB instance
- Configure CORS_ORIGINS for your domain
- Update REACT_APP_BACKEND_URL to your production backend URL
- Build:
npm run build - Deploy the
buildfolder to your hosting service
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
- OpenAI for the GPT-4 API
- Pinecone for vector database services
- React and FastAPI communities
Made with ❤️ by Jay