- Gradient Design: Modern gradient backgrounds and smooth animations
- Responsive Layout: Optimized for desktop and mobile devices
- Typing Animation: Real-time typing effect for AI responses
- Custom Styling: Hand-crafted CSS for premium look and feel
- Mixtral 8x7B: High-performance instruction-following model
- Llama 3 8B/70B: Meta's latest language models
- CodeLlama 34B: Specialized for code generation and assistance
- Temperature Control: Adjust creativity (0.0 - 2.0)
- Token Limit: Customize response length (50 - 4000 tokens)
- Real-time Settings: Change models and parameters on-the-fly
- Chat Statistics: Track message counts and conversation metrics
- Export Functionality: Download chat history as JSON
- Session Management: Persistent chat history during session
- Error Handling: Robust error handling with user-friendly messages
- Streaming Support: Fast response delivery
- Timeout Protection: 30-second request timeout
- API Integration: Seamless Together.ai API integration
- State Management: Efficient Streamlit session state handling
- Python 3.8+
- Together.ai API Key
- Streamlit
-
Clone the repository
git clone https://github.com/sohan2311/Sohan-s-GPT-AI-Chatbot-Assistant.git cd Sohan-s-GPT-AI-Chatbot-Assistant
-
Install dependencies
pip install -r requirements.txt
-
Set up environment
# Create .streamlit/secrets.toml mkdir .streamlit echo 'TOGETHERAI_API_KEY = "your-api-key-here"' > .streamlit/secrets.toml
-
Run the application
streamlit run streamlit_app.py
-
Open your browser
http://localhost:8501
Create a requirements.txt
file:
streamlit>=1.28.0
requests>=2.31.0
python-dateutil>=2.8.2
- Visit Together.ai
- Sign up for an account
- Navigate to API section
- Generate your API key
- Add it to your Streamlit secrets
Option 1: Streamlit Secrets (Recommended)
# .streamlit/secrets.toml
TOGETHERAI_API_KEY = "your-together-ai-api-key"
Option 2: Environment Variables
export TOGETHERAI_API_KEY="your-together-ai-api-key"
# Simply type your message and get AI responses
"Hello, how are you today?"
# Ask for programming help
"Write a Python function to calculate fibonacci numbers"
# Get creative assistance
"Write a short story about a robot learning to paint"
graph TD
A[User Input] --> B[Streamlit Frontend]
B --> C[Session State Management]
C --> D[Together.ai API]
D --> E[AI Model Processing]
E --> F[Response Generation]
F --> G[Typing Animation]
G --> H[Display to User]
model_options = {
"Your Model Name": "model-id-from-together-ai",
# Add more models here
}
Edit the CSS in the st.markdown()
section to customize:
- Colors and gradients
- Animations and transitions
- Layout and spacing
- Typography and fonts
The codebase is modular and extensible:
- Add new AI providers
- Implement conversation memory
- Add file upload capabilities
- Create custom chat themes
- Response Time: < 3 seconds average
- Concurrent Users: Supports multiple simultaneous sessions
- Memory Usage: Optimized session state management
- API Efficiency: Smart request batching and error handling
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Add tests if applicable
- Commit your changes
git commit -m "Add amazing feature"
- Push to your branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow PEP 8 style guide
- Add docstrings to functions
- Test your changes locally
- Update documentation as needed
- Together.ai - For providing excellent AI model APIs
- Streamlit - For the amazing web app framework
- Meta - For Llama models
- Mistral AI - For Mixtral models
- GitHub Issues: Report bugs or request features
- Email: sohan.maity2311@gmail.com
- LinkedIn: Connect with me on LinkedIn
- v1.0.0 - Initial release with core features
- v1.1.0 - Added multiple model support
- v1.2.0 - Enhanced UI/UX with animations
- v1.3.0 - Added export functionality and statistics
- Voice Chat: Add speech-to-text and text-to-speech
- File Upload: Support document and image uploads
- Custom Themes: Multiple UI themes
- Conversation Memory: Long-term chat history
- Multi-language: Support for multiple languages
- Mobile App: Native mobile application
Built with β€οΈ by Sohan Maity
β Star this repository if you found it helpful! β