This project is a chatbot application built with LangChain, Streamlit, and ChatGroq for interacting with SQL databases through a conversational interface. Users can query data from either a local SQLite database or a remote MySQL database.
Project Link: https://chatsqllangchain.streamlit.app/
- Database Choice: Users can choose between a local SQLite database (sample.db) or connect to a MySQL database.
- Conversational AI: The app uses the LangChain create_sql_agent to process natural language queries and retrieve data from the connected database.
- Streamlit UI: The chatbot is deployed using Streamlit, providing a simple yet powerful user interface for interaction.
- Chat History: Maintains a chat history for easy reference and context.
-
Clone the Repository: git clone https://github.com/yourusername/sql-db-chatbot.git
cd sql-db-chatbot
-
Install Required Packages: pip install -r requirements.txt
-
Set Up Environment Variables: Make sure to have your Groq API key ready.
-
Database Setup:
- For SQLite: Place sample.db in the root directory.
- For MySQL: Have the host, username, password, and database details ready.


