SQL interpreter based on Auto-GPT to autonomously generate and run postgressql code based on natural language input.
- 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
- python 3.8.10
- pip
-
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
-
Install required libraries
pip install -r requirements.txt-
Maintain .env as per your configurations
i. Ubuntu
cp config/.env.example config/.envii. Windows
copy config\.env.example config\.enviii. Maintain PostgresSQL DB credentials and OpenAI API credentials in the .env file.
-
Run the code and have fun
python main.pyThis 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.
