This project demonstrates an integration between Chainlit and phidata, leveraging the Claude AI model to create an interactive chat interface focused on health and fitness guidance.
- Real-time AI responses using Claude 3 Sonnet
- Seamless integration of Chainlit's UI with phidata's assistant capabilities
- Streaming responses for a smooth user experience
- Specialized knowledge in health and fitness topics
- Python 3.9+
- pip (Python package manager)
- Anthropic API key
-
Clone this repository:
git clone https://github.com/waveup/chainlit-phidata-health-assistant.git cd chainlit-phidata-health-assistant
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Create a
.env
file in the project root and add your Anthropic API key:ANTHROPIC_API_KEY=your_api_key_here
-
Run the Chainlit application:
chainlit run app.py -w
-
Open your web browser and navigate to
http://localhost:8000
(or the URL provided in the terminal). -
Start chatting with the AI assistant about your health and fitness questions!
app.py
: Main application file containing the Chainlit-phidata integration codephidata_assistant.py
: Contains the AssistantInterface class and initializationchainlit.md
: Markdown file for the Chainlit landing pagerequirements.txt
: List of Python dependenciesREADME.md
: This file, containing project information and instructions
The Health and Fitness Assistant can help with various topics, including:
- Workout routines
- Nutrition advice
- Weight management
- Fitness goal setting
- General health questions
Remember, while this AI can provide general advice, it's always best to consult with healthcare professionals for personalized medical guidance.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.