Welcome to SQL Chat! This is an interactive chat application that allows you to connect to your MySQL database and ask questions in natural language. It leverages the power of LangChain, ChatGroq, and Streamlit to provide a seamless conversational experience.
- Connect to a MySQL database using user-provided connection details.
- Chat with your MySQL database using natural language queries.
- Leverage LangChain's capabilities to generate SQL queries based on user questions.
- Convert SQL responses into natural language for easy understanding.
- Persistent conversation history throughout the chat session.
-
Clone the repository:
git clone https://github.com/Soumya-Kushwaha/SQL-Chat.git
-
Navigate to the project directory:
cd SQL-Chat
-
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate # For macOS/Linux # OR venv\Scripts\activate.bat # For Windows
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the root directory with your Groq Free API:GROQ_API_KEY = "groq api key"
The project requires configuration for MySQL connection, by manually entering the connection details in the sidebar within the app.
-
Launch the application:
streamlit run app.py
-
Connect to your MySQL database using the sidebar in the app.
-
Start asking questions about your database in natural language using the chat input box.
-
The application will provide SQL queries and natural language responses to your questions.
Contributions to the project are welcome! Please open an issue or submit a pull request if you find any bugs or have ideas for improvements.
This project is licensed under the MIT License.