How arya-io/groq-chatbot works
Groq Chatbot is a Streamlit conversational app. The user selects a model, persona, and memory window, submits a message, and receives a response from a Groq model through a LangChain conversation chain. Session state holds displayed chat history and timing; prior messages are replayed into the memory buffer on reruns. The README also documents model and persona choices, chat statistics, and clear/new-topic actions. All implementation is in app.py, so subsystem paths repeat; internal wiring reflects the sampled source.
Main entry points: app.py Conversation chain
Components 13
Chat interface
- Streamlit UI
app.py - Chat settings
app.py - Chat history
app.py - Session statistics
app.py - Clear all chats
app.py - New topic
app.py
Conversation runtime
- Send handling
app.py - Persona prompt
app.py - Window memory
app.py - Conversation chain
app.py - Groq model client
app.py
External services
- Groq AI
Other components
- Chat user
Connections 24
- Chat user → Streamlit UI: interacts
- Streamlit UI → Chat settings: selects options
- Streamlit UI → Send handling: submits message
- Chat settings → Persona prompt: selects persona
- Chat settings → Window memory: sets window
- Chat settings → Groq model client: selects model
- Send handling → Conversation chain: invokes
- Conversation chain → Persona prompt: uses prompt
- Conversation chain → Window memory: reads and updates
- Conversation chain → Groq model client: requests response
- Groq model client → Groq AI: sends prompt
- Groq AI → Groq model client: returns response
- Conversation chain → Send handling: returns response
- Send handling → Chat history: appends exchange
- Chat history → Window memory: replays exchanges
- Chat history → Streamlit UI: renders messages
- Send handling → Session statistics: starts timing
- Chat history → Session statistics: counts messages
- Session statistics → Streamlit UI: displays metrics
- Chat user → Clear all chats: requests reset
- Clear all chats → Chat history: clears history
- Clear all chats → Session statistics: resets start time
- Chat user → New topic: requests new topic
- New topic → Window memory: clears memory