datasette / datasette-query-assistant

Query databases and tables with AI assistance
Apache License 2.0
16 stars 2 forks source link

On SQL query page do something useful if the query has an error #4

Open simonw opened 8 months ago

simonw commented 8 months ago

This would likely have to be a pure JavaScript feature. Any time we display an error on that page e.g. https://datasette.io/content?sql=select+*+from+assts we could provide a button for "Help from the AI assistant" which runs a prompt with the SQL and the error to try and suggest a fix.

CleanShot 2024-03-27 at 22 31 46@2x

simonw commented 8 months ago

This could include quite a bit of prose, and every ```sql...``` block could have a little "try this" button that copies the SQL out into the textarea and submits the form.