Chat Assistant is an AI-powered chatbot built using Groq and LangChain. It provides an interactive chat experience through Streamlit, allowing users to select AI models, manage conversation memory, and maintain chat history.
To use the Groq AI models, follow these steps:
- Visit Groq Console
- Sign In or Create an Account
- Navigate to API Keys in the console
- Generate a New API Key
- Copy the Key and store it safely
- Add the Key to a
.env
file in your project:GROQ_API_KEY=your_api_key_here STABILITY_API_KEY=your_api_key_here
- Python 3.8 or later installed
- Pip installed
Clone the repository and install the required dependencies:
git clone https://github.com/your-repo/chat-assistant.git
cd chat-assistant
pip install -r requirements.txt
Ensure your .env
file is correctly set up, then run the following command:
streamlit run app.py
This will start the chatbot on your local machine.
├── app.py # Main application script
├── requirements.txt # Dependencies
├── .env # API Key Storage
├── README.md # Documentation
Icon | Model Name | Description | Category | Token Limit | Best For |
---|---|---|---|---|---|
⚡ | llama-3.1-8b-instant |
Fast, efficient model for quick responses | General | 16,384 | Quick conversations, basic tasks |
🧠 | deepseek-r1-distill-llama-70b |
Advanced distilled model with excellent performance | Advanced | 32,768 | Complex reasoning, detailed explanations |
🎯 | qwen-2.5-32b |
High-quality model for detailed responses | Advanced | 32,768 | Longer conversations, nuanced responses |
🚀 | llama-3.3-70b-specdec |
Speculative decoding-enhanced Llama 3 for faster responses | Specialized | 16,384 | Fast English generation, coding assistance |
💻 | qwen-2.5-coder-32b |
Model optimized for coding tasks | Specialized | 32,768 | Programming assistance, technical docs |
🎨 | stable-diffusion-xl |
Stability AI's advanced image generation model | Image Generation | N/A | Generating images from text prompts |
- Start the app using
streamlit run app.py
- Select AI Model from the sidebar
- Set memory length to decide how many messages the AI remembers
- Chat with the AI by entering your queries
- Monitor API Status in the sidebar
The sidebar will indicate whether the API key is connected.
If not, check your .env
file to ensure the key is correctly set.