Giter VIP home page Giter VIP logo

somanathkshirsagar / nlp_to_sql Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 189 KB

Welcome to the GitHub repository for our tutorial on building a natural language SQL chatbot using GPT-4! In this project, we will guide you through creating a chatbot capable of interpreting and responding to user queries in natural language, generating SQL queries dynamically, and retrieving results from a MySQL database. The project features a u

Home Page: https://nlptosql-yrooh3gostfxtqqppqcmqs.streamlit.app/

License: MIT License

Python 100.00%
ai aws-rds-mysql gen-ai grock langchain nlp nlp-to-sql openai genarative-ai local-system-database-connaction

nlp_to_sql's Introduction

MySQL Python Chatbot with GPT-4 and Mistral AI

Welcome to the GitHub repository for our tutorial on building a natural language SQL chatbot using GPT-4! In this project, we will guide you through creating a chatbot capable of interpreting and responding to user queries in natural language, generating SQL queries dynamically, and retrieving results from a MySQL database. The project features a user-friendly interface powered by Streamlit, allowing users of all skill levels to engage effortlessly.

Table of Contents

Features

  • Natural Language Processing (GPT-4)
  • SQL Query Generation
  • MySQL Database Integration
  • User-Friendly Streamlit GUI
  • Python-Based Implementation

How It Works

Our chatbot takes a user's natural language query, translates it into a SQL query utilizing GPT-4, performs the query against a MySQL database, and returns the result back to the user in natural language format. Various stages of data handling and interactions with both OpenAI API and MySQL database occur smoothly within a Streamlit application.

Chatbot Architecture

Prerequisites

Before getting started, make sure you meet these prerequisites:

  • Python Installed

To verify if Python is already installed, open the terminal and type python --version. If not, download and install the latest version of Python from their official website: https://www.python.org/downloads/.

Installation

Ensure you have Python installed on your machine. Then clone this repository:

git clone [repository-link]
cd [repository-directory]

Install the required packages:

pip install -r requirements.txt

Create your own .env file with the necessary variables, including your OpenAI API key:

OPENAI_API_KEY=[your-openai-api-key]

Usage

To launch the Streamlit app and interact with the chatbot:

streamlit run app.py

License

This project is licensed under the MIT License - see the LICENSE file for details.

Note: This project is intended for educational and research purposes. Please ensure compliance with the terms of use and guidelines of any APIs or services used.

If you find this project helpful, please consider giving it a star!

Support

Have questions? Found bugs? Need help troubleshooting? Feel free to contact me at [email protected], or submit an issue here on GitHub.

Please remember that this project is meant for educational and research purposes, so kindly comply with the terms of service and guidelines when using any related APIs or services. Happy coding! ๐Ÿš€๐Ÿ‘จโ€๐Ÿ’ป๐Ÿค–

nlp_to_sql's People

Contributors

somanathkshirsagar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.