Skip to content

bhanmrinal/Query-Mind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-SQL ChatBot

License

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.

Features

  • 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.

Installation

  1. Clone the repository:

    git clone https://github.com/bhanmrinal/AI-SQL-ChatBot.git
  2. Navigate to the project directory:

    cd SQL-Chat
  3. 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
  4. Install the required dependencies:

    pip install -r requirements.txt
  5. Create a .env file in the root directory with your Groq Free API:

    GROQ_API_KEY = "groq api key"
    

Configuration

The project requires configuration for MySQL connection, by manually entering the connection details in the sidebar within the app.

Usage

  1. Launch the application:

    streamlit run app.py
  2. Connect to your MySQL database using the sidebar in the app.

  3. Start asking questions about your database in natural language using the chat input box.

  4. The application will provide SQL queries and natural language responses to your questions.

Future Additions

  1. Develope a query optimization system using machine learning to suggest more efficient SQL queries.

  2. Incorporate an AI-driven data visualization component to automatically generate relevant charts based on query results.

  3. Fine-Tune Mistral 7b for Text-to-SQL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published