I have created a custom plugin to Node-Red Editor to add my tab to sidebar.
I have two files in plugin: testplugin.html
I have created a drop down list like this:
var x = document.createElement("SELECT");
var z = document.createElement("option");
var t = document.createTextNode("CSS");
In js I am having HTTP listener like this:
On getting any data on /chatgpt I want to update my drop-down list which I created in HTML file dynamically.
You already have the done callback in your call to the /chatgpt API endpoint, that is where you update your drop-down. You should also include a fail callback so that you can notify the Editor when the call fails for whatever reason.