Running ChatGPT queries on Postgres
gpt2pg Extension
The extension works with the chatGPT website. When a ChatGPT user asks about SQL, ChatGPT will generate SQL code as a response. The extension looks for SQL code blocks generated in the in the HTML of a ChatGPT conversation and adds a \"Run SQL\" button element below it. The user can press the \"Run SQL\" to test the SQL generated by ChatGPT on a real database.
When a user presses the \"Run SQL\", the extension sends an HTTP request to the API, that will run the query, then send the result.
Read more
When a user presses the \"Run SQL\", the extension sends an HTTP request to the API, that will run the query, then send the result.
Source Manifest.json
{"update_url": "https://clients2.google.com/service/update2/crx", "name": "gpt2pg", "version": "0.2.0", "description": "Running ChatGPT queries on Postgres", "permissions": ["tabs", "storage", "https://chat.openai.com/chat/*"], "host_permissions": ["https://chat.openai.com/chat/*"], "background": { "service_worker": "background.js" }, "content_scripts": [ { "matches": ["https://chat.openai.com/chat/*"], "js": ["contentScript.js"] } ], "web_accessible_resources": [ { "resources": ["assets/elephant-icon.png"], "matches": ["https://*.openai.com/*"] } ], "action": { "default_icon": { "16": "assets/elephant-icon.png", "24": "assets/elephant-icon.png", "32": "assets/elephant-icon.png" }, "default_title": "Postgres for ChatGPT", "default_popup": "popup.html" }, "manifest_version": 3}
Read more