{"id":28581207,"url":"https://github.com/hormold/gpt-sql-box","last_synced_at":"2026-04-17T07:32:19.869Z","repository":{"id":137440953,"uuid":"597167684","full_name":"Hormold/gpt-sql-box","owner":"Hormold","description":"Text to SQL generator GPT-3 (Python + Vue) and also AI chart generator!","archived":false,"fork":false,"pushed_at":"2023-02-05T13:37:42.000Z","size":648,"stargazers_count":50,"open_issues_count":1,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-11T04:16:29.353Z","etag":null,"topics":["ai","charts","gpt-3","openai","postgres","python","sql","vue"],"latest_commit_sha":null,"homepage":"https://medium.com/@hormold/make-gpt-3-work-for-you-17a3bf744234","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hormold.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-03T19:23:04.000Z","updated_at":"2025-02-25T04:42:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"3cc0b8d2-8cea-422e-8e6f-d827359619d5","html_url":"https://github.com/Hormold/gpt-sql-box","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Hormold/gpt-sql-box","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hormold%2Fgpt-sql-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hormold%2Fgpt-sql-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hormold%2Fgpt-sql-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hormold%2Fgpt-sql-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hormold","download_url":"https://codeload.github.com/Hormold/gpt-sql-box/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hormold%2Fgpt-sql-box/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31919961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","charts","gpt-3","openai","postgres","python","sql","vue"],"created_at":"2025-06-11T04:16:19.745Z","updated_at":"2026-04-17T07:32:19.853Z","avatar_url":"https://github.com/Hormold.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPT-3 SQL Query Generator and UI (And AI Chart Generator)\n\nThis is simple python application to generate SQL Schema + prompt to ask GPT-3 to generate SQL queries.\n\nIt also has a simple UI to show results in a table. And yes, **you can try to generate a chart from the results of query**.\n\nGPT-3 self choose the chart type and prepare the data for it (it is not perfect, but it is a good start).\n\n**It can generate a prompt for you, if you don't know what to ask GPT-3.**\n\n![](https://github.com/Hormold/gpt-sql-box/blob/master/docs/demo.gif?raw=true)\n\n\n## How it works:\n1. Getting SQL schemas from PostgreSQL and compile prompt from SQL Schema\n3. Wait for user input\n4. Generate SQL query from prompt + user input\n5. Show SQL query and ask user to confirm or edit if it is correct before executing it\n6. Execute SQL query and show results in a table\n\n## Environment\n- DATABASE_URL: PostgreSQL database URL\n- OPENAI_TOKEN: OpenAI API token (Not nessessary, you can set it in the UI)\n- APP_PORT: Port to run the application (default: 5000)\n- OPENAI_ENGINE: OpenAI engine to use (default: text-davinci-003, not nessessary). You can set some free to use model: text-chat-davinci-002-20221122\n\n## How to run\n1. It better to create a virtual environment using `python3 -m venv venv`\n2. Install dependencies using `pip install -r requirements.txt`\n3. Set environment variables in `.env` file in project root or in your system\n4. Run the application using `python app.py` and open `http://localhost:5000` in your browser\n\n## Contact \nIf you have any questions, please contact me at [@define](https://t.me/define) in Telegram.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhormold%2Fgpt-sql-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhormold%2Fgpt-sql-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhormold%2Fgpt-sql-box/lists"}