A modern, production-ready AI Chatbot built with LangChain (v0.3+), Google Gemini 3.5 Flash and Streamlit.
- Stateful Memory: Remembers past conversations and maintains context.
- Dynamic Configuration: Adjust AI Temperature (Creativity) in real-time.
- Sidebar Controls: Easy access to configuration and chat management.
- Clean UI: Professional chat interface built with Streamlit.
- Error Handling: Robust text extraction from Gemini responses.
- Python 3.8+
- Google Gemini API Key
-
Clone the repository: git clone https://github.com/mfpNahu07/Langchain-Chat cd Langchain-Chat
-
Set up the virtual environment: python -m venv .venv .venv\Scripts\Activate.ps1 # Windows
-
Install dependencies: pip install -r requirements.txt
-
Configure your API Key: Create a
.envfile in the root directory:GOOGLE_API_KEY=your_gemini_api_key_here
-
Run the application: python -m streamlit run app.py
The app includes a sidebar for configuration:
- AI Temperature: Controls the randomness/creativity of the AI. Lower is more deterministic, higher is more creative.