Shiny GPT Demo
I asked ChatGPT to make me a little Issue Management Shiny App. Here’s how it went! Some of the resulting code is in this repo.
Prompt 1: make me an R shiny app that implements a basic issue management system
Made an app that runs (code) but, didn’t actually populate the UI :(
Prompt 2: update the app so that i can edit existing issues
This triggered updates in the UI code!
And it added some javascript in datatables to make that table editable.
At this point we’ve got a functional little prototype. Let’s see if we can do more …
Prompt 3: implement a simple database store the issues
This one only gave a partial server function so I went with …
Prompt 4: The server function doesn’t have a closing curly bracket. fix that please.
Code still doesn’t run. Looks like the onStartup function has syntax issues.
Let’s see if it can fix it …
Prompt 5-8: Issues with executing code when the app starts …
Seems like it’s looking for some session functions here, but I’m not sure they actually exist. I just copied a few error messages in to chatGPT a few times to see if it could figure it out, but no luck. Then I tried googling a little which brought me to the onStart
parameter in shinyApp()
, so I tried to convince it to use that. After a few tries we got this Code which does run, but bombs when you click submit.
Seems like this is close, but it isn’t my area of exprtise (and I’m here to play with ChatGPT not debug it’s work) so going to leave it here for now.