https://github.com/utkarshg1/groq-chatbot-streamlit
LLM Chatbot with Groq
https://github.com/utkarshg1/groq-chatbot-streamlit
chatbot groq langchain-python llm streamlit
Last synced: about 1 month ago
JSON representation
LLM Chatbot with Groq
- Host: GitHub
- URL: https://github.com/utkarshg1/groq-chatbot-streamlit
- Owner: utkarshg1
- Created: 2025-07-31T08:08:31.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-31T08:18:27.000Z (11 months ago)
- Last Synced: 2025-07-31T11:58:26.769Z (11 months ago)
- Topics: chatbot, groq, langchain-python, llm, streamlit
- Language: Python
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ง Groq LLM Chat App
A simple interactive chatbot built with **Streamlit**, **LangChain**, and **Groq API**, allowing you to select LLM models and chat with them in real time.
---
### ๐ Features
- Chat with Groq-hosted LLMs (e.g., LLaMA3, Mixtral)
- Select from available models dynamically
- Real-time streaming responses
- Session-persistent chat history
- Containerized with Docker
---
### ๐ Project Structure
```
.
โโโ app.py # Main Streamlit app
โโโ models.py # Model API + response logic
โโโ Dockerfile # Container setup
โโโ docker-compose.yml # Optional: Docker orchestration
โโโ .env # Environment variables (not committed)
โโโ README.md # You're here!
```
---
### ๐ง Requirements
- Python 3.9+
- A valid [Groq API Key](https://console.groq.com/)
- A `MODELS_URL` endpoint (usually `https://api.groq.com/openai/v1/models`)
---
### ๐ฆ Installation (Local)
1. **Clone the repo:**
```bash
git clone https://github.com/your-username/groq-llm-chat.git
cd groq-llm-chat
```
2. **Create `.env` file:**
```env
GROQ_API_KEY=your_groq_api_key
MODELS_URL=https://api.groq.com/openai/v1/models
```
3. **Install dependencies:**
```bash
pip install -r requirements.txt
```
4. **Run the app:**
```bash
streamlit run app.py
```
---
### ๐ณ Docker Usage
#### 1. **Build and run with Docker Compose:**
```bash
docker-compose up --build
```
Make sure your `.env` file is in the same directory. It will be automatically loaded by Compose.
#### 2. **Access the app:**
Go to [http://localhost:8501](http://localhost:8501) in your browser.
---
### ๐งช Example `.env`
```env
GROQ_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxx
MODELS_URL=https://api.groq.com/openai/v1/models
```
---
### ๐ Notes
- Make sure your Groq API key is active and has access to the model endpoints.
- Model switching is persistent and won't reset your chat unless you manually clear session state.
---
### ๐ License
MIT โ free to use and modify.
---
### ๐จโ๐ป Author
Built by **Utkarsh Gaikwad**
Inspired by the power of LLMs and lightweight UIs.