EasyQuery is an advanced AI-powered SQL Query Builder designed to transform human language instructions into precise SQL queries. This tool is particularly valuable for users with limited SQL knowledge, making it easy to interact with databases using simple, natural language commands. By leveraging natural language processing (NLP) and artificial intelligence (AI), EasyQuery interprets user inputs, understands data structures, and generates the appropriate SQL queries.
Note: This is a hackathon project, and is meant to be a proof of concept. While functional, it is not yet production-ready. And some functionalities like updating ddl, etc. are missing and are hardcoded. If you wish to use it, and don't understand something, feel free to mail me at baxidhairya2312@gmail.com
- Natural Language Processing: Converts user-friendly natural language inputs into SQL queries.
- AI-Driven: Uses advanced AI algorithms to understand and generate queries.
- Easy to Use: Designed for users with minimal SQL knowledge.
- Web-Based Interface: Interact with the tool through a simple and intuitive web interface.
- Cross-Platform: Works on any platform with Python and Node.js environments.
EasyQuery/
├── index.js
├── package.json
├── package-lock.json
├── public/
│ ├── icon.png
│ ├── index.html
│ ├── script.js
│ ├── send.webp
│ ├── set-ddl/
│ │ └── index.html
│ ├── styles.css
│ └── usericon.png
├── __pycache__/
│ └── code.cpython-310.pyc
└── server-chatbot.py
- index.js: The main entry point for the Node.js server.
- package.json: Contains metadata about the Node.js project and its dependencies.
- package-lock.json: Describes the exact dependency tree generated by
npm
. - public/: Contains static assets for the web interface.
- icon.png: Icon used in the web interface.
- index.html: The main HTML file for the user interface.
- script.js: JavaScript file for client-side functionality.
- send.webp: An image asset.
- set-ddl/index.html: HTML for the set DDL interface.
- styles.css: CSS file for styling the web interface.
- usericon.png: User icon image.
- pycache/: Compiled Python files for faster execution.
- server-chatbot.py: The main Python script running the Flask server and AI model.
- Python: Ensure Python is installed. Python 3.10 or higher is recommended.
- Node.js: Ensure Node.js and npm are installed.
-
Clone the repository:
git clone https://github.com/yourusername/EasyQuery.git cd EasyQuery
-
Install Python dependencies: Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the required packages:
pip install -r requirements.txt
-
Install Node.js dependencies:
npm install
-
Start the Flask Server: Open a terminal and navigate to the project directory. Run the following command to start the Python server:
python server-chatbot.py
-
Start the Node.js Server: In another terminal window, navigate to the project directory and run:
node index.js
-
Access the Web Interface: Open your web browser and navigate to
http://localhost:3000
to interact with EasyQuery.
Update the Llama model path in server-chatbot.py
:
# Initialize Llama model
llm = Llama(model_path="your_model_path/mistral-7b.gguf")
Replace "your_model_path/mistral-7b.gguf"
with the path to your Llama model.
We welcome contributions! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and commit them.
- Push your changes to your fork.
- Submit a pull request to the main repository.
This project is licensed under the MIT License - see the LICENSE file for details.
Happy Querying with EasyQuery!