An interactive conversational AI chatbot built using LangChain, Hugging Face LLMs, and Streamlit.
This project demonstrates the integration of open-source Large Language Models (LLMs) with a modern chat interface supporting multi-turn conversations and session-based memory handling.
- 💬 Interactive chatbot interface using Streamlit
- 🧠 Multi-turn conversation support
- 🔗 LangChain integration
- 🤗 Hugging Face LLM inference endpoint support
- ⚡ Real-time response generation
- 🧩 Modular code architecture
- 🔒 Environment variable support using
.env - 🛠 Beginner-friendly and extensible foundation for RAG and AI agents
- Python
- LangChain
- Hugging Face
- Streamlit
- Transformers
- PyTorch
- dotenv
├── app.py # Streamlit frontend and chat interface
├── chatbot.py # LLM loading and model orchestration
├── requirements.txt # Project dependencies
├── .env # API tokens (not uploaded to GitHub)
└── README.mdgit clone https://github.com/your-username/llm-chatbot.git
cd llm-chatbotpython -m venv venv
venv\Scripts\activatepython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root directory.
HUGGINGFACEHUB_API_TOKEN=your_huggingface_tokenYou can generate a Hugging Face token from:
https://huggingface.co/settings/tokens
streamlit run app.pyThe chatbot provides:
- User-friendly conversational interface
- Real-time AI responses
- Session-based message history
- Open-source LLM interaction
Current configuration uses:
- Meta Llama 3.1 8B Instruct
- Mistral 7B Instruct
via Hugging Face Inference API.
This project is developed for educational and learning purposes to explore:
- LLM applications
- LangChain orchestration
- Conversational AI systems
- Open-source model integration
- LinkedIn: https://www.linkedin.com/in/dewang-moghe
- GitHub: https://github.com/Devm2512