Skip to content

SamsLogic/sql-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sql-interpreter

SQL interpreter based on Auto-GPT to autonomously generate and run postgressql code based on natural language input.

sample output

Functionalities

  • Automatic PostgresSQL code generation and execution in postgresSQL server
  • Automatic database understanding before initiating SQL development
  • Automatic Exit condition handled by chatgpt
  • Support for Azure OpenAI
  • Add logging
  • Handling repeated answers
  • Adding function calling support
  • Better Exit condition
  • Using simpler LLMs
  • UI for better engagement
  • Many more bug fixes

Requriements

  1. python 3.8.10
  2. pip

Setup

  1. Setup Virtual Environment

    i. Ubuntu

    pip3 install virtualenv
    python3 -m virtualenv venv
    source venv/bin/activate

    ii.Windows

    pip install virtualenv
    python -m virtualenv venv
    .\venv\Scripts\activate
  2. Install required libraries

pip install -r requirements.txt
  1. Maintain .env as per your configurations

    i. Ubuntu

    cp config/.env.example config/.env

    ii. Windows

    copy config\.env.example config\.env

    iii. Maintain PostgresSQL DB credentials and OpenAI API credentials in the .env file.

  2. Run the code and have fun

python main.py

Disclaimer

This repository is a basic version of an SQL Interpreter for PostgresSQL databases. This can generate SQL queries and uses LLMs to do so. Currently it only supports ChatGPT and OpenAI API calls. Would love to see the LLM community to build more on this public repo to make it more robust and useful.

About

SQL interpreter based on Auto-GPT to autonomously generate and run sql code based on natural language input.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages