How shashivardan-jarpati/askgenie-ai-chatbot works
AskGenie is a single-file Streamlit chatbot: a user message enters the chat UI, commands are handled directly, and other messages are combined with session history and sent to a locally loaded Phi-3 model. The generated text is cleaned, displayed, and retained in session state. The README also documents adjustable generation settings, GPU/CPU fallback, and graceful loading/inference errors. The excerpts omit parts of chatbot.py, so relationships beyond those explicitly shown or described in the README are documented rather than independently verified.
Main entry points: chatbot.py Streamlit chat UI
Components 11
Chat interface
- Streamlit chat UI
chatbot.py - Generation settings
chatbot.py - Displayed reply
chatbot.py
Conversation logic
- Session history
chatbot.py - Intent detection
chatbot.py - Command replies
chatbot.py - Prompt builder
chatbot.py - Response cleaning
chatbot.py
Local inference
- Model loader
chatbot.py - Phi-3 inference
chatbot.py
Other components
- User
Connections 16
- User → Streamlit chat UI: submits message
README.md - Streamlit chat UI → Intent detection: checks intent
README.md - Intent detection → Command replies: dispatches command
README.md - Streamlit chat UI → Session history: reads history
README.md - Streamlit chat UI → Session history: updates history
chatbot.py - Streamlit chat UI → Prompt builder: builds prompt
chatbot.py - Prompt builder → Session history: uses history
README.md - Streamlit chat UI → Model loader: loads model
chatbot.py - Streamlit chat UI → Generation settings: configures generation
README.md - Streamlit chat UI → Phi-3 inference: runs inference
chatbot.py - Prompt builder → Phi-3 inference: provides prompt
README.md - Generation settings → Phi-3 inference: sets parameters
README.md - Phi-3 inference → Response cleaning: returns generated text
chatbot.py - Response cleaning → Displayed reply: formats reply
chatbot.py - Command replies → Displayed reply: provides reply
README.md - Displayed reply → Session history: preserves conversation
README.md