Issues using JS Node.js for ChatGPT plugins?

I am building a ChatGPT plugin using a local server-side applications with JavaScript Node.js and Express. Sometimes the plugin works , sometimes when I re-install the plugin I get errors - I find this weird because I am not making code changes. For example sometimes ChatGPT gives me the message “Error making localhost plugin HTTP call: TypeError: Load failed”

Or when I install the plugin i get “Failed to fetch localhost manifest. Check to ensure your localhost is running and your localhost server has CORS enabled.”

I’m not sure why sometimes it stops working. Would there be concerns using JS? Would this be something happening only locally and won’t have to worry about in production when the plugin is on a live server?

You need a valid domain name, instead of localhost.
Here is an Nodejs example:

Thank you! The repo is a great resource! I am still wondering why localhost does not work. OpenAI recommends localhost in the plugin input and also in their starter tutorial they use localhost, yet it seems to have issues.

2 Likes

I got a NodeJS plugin working on localhost:3000
(or rather, ChatGPT wrote it)

The repo is: GitHub - UCB-BioE-Anderson-Lab/C6-Node
It wrote an index.js that hosts the manifest and YAML files along with responding to API calls.

it is about cors settings. I fixed my error in python with this line:

app = quart_cors.cors(quart.Quart(name), allow_origin=““, allow_headers=””, allow_methods=“*”)

Keep in mind not to go to production with this.

1 Like