This post is for those who are sold on the opportunity of ChatGPT Plugins (I may post another on why I think the opportunity is important).
I am the creator of the first and only (currently) currency converter (with a Plugin of the same name which is kind of cool because I assume names in the Plugin store will be like domains and cannot have duplicates in the future, thus increase their resale value) in ChatGPT Plugins.
I also have another 5 Plugins submitted for approval:
1. NFT News Roundup
2. Aus Petrol Prices
3. Bitcoin Sentiment
4. SA Speed Cameras
5. Aus Surf Report
And several others in development.
So, in this post I’ll go through how to create a ChatGPT Plugin (one that does not need a user to login to an account outside of ChatGPT) because I found OpenAIs developer docs not very thorough and there is very little information on the web at the time I submitted my first Plugin– there were only 68 deployed at that time!
NOTE: You will eventually need ChatGPT Plus (the paid version) with access to Plugins as you will need the platform to test your Plugin before you submit it (more on both testing and submitting later).
1) CREATE A MANIFEST FILE
The manifest tells ChatGPT what the Plugin does and how to access it.
It must be hosted on a https (not http) domain or subdomain.
It needs to be hosted in a folder called /.well-known/ on that domain or subdomain:
For example, https://subdomain.domain.com/.well-known/ or https://domain.com/.well-known/
No special attribute is needed for that folder except its name, and you can host other files there if you wish.
You cannot host the manifest file in a folder in /.well-known/ such as /.well-known/NEXT-FOLDER.
Copy the example code template on this page exactly but add your Plugin information instead: https://platform.openai.com/docs/plugins/getting-started/plugin-manifest#:~:text=The%20minimal%20definition%20of%20the%20required
You need to follow this guidance too or your Plugin will be rejected (more on that later): https://platform.openai.com/docs/plugins/getting-started/plugin-manifest#:~:text=not%20be%20approved%20for%20the%20plugin%20store
In the manifest file, you will see “api: “url”.
That is the URL of an API (Application Programming Interface) you need to create (more on this later).
The location of that API doesn’t matter but needs to be on the same domain as the manifest.
Once a user selects your Plugin, submits a prompt (and OpenAI deems your Plugin to be the best way to address it [yes, your Plugin may not be used for each prompt even if the Plugin is installed and selected by the user]) ChatGPT will go to the Plugins’ manifest, read it for the API URL, access the API URL to understand what to do next with the users prompt.
2) CREATE AN API & FILE
That API URL needs to be in the format of YAML — a human-readable data-serialization language.
OpenAI has chosen OpenAPI for their standardization of API calls for their Plugins — notice the “P” difference in words!
Confusing if you skim-read it…
OpenAI has a OpenAPI example here: https://platform.openai.com/docs/plugins/getting-started/openapi-definition#:~:text=The%20OpenAPI%20specification%20is%20the%20wrapper%20that%20sits%20on%20top%20of%20your%20API.%20A%20basic%20OpenAPI%20specification%20will%20look%20like%20the%20following
Generally, you can get away with that example (obviously with your Plugin’s relevant details), however depending on how complex your Plugin is (we’ll get to the actual Plugin shortly), you may need both a GET and POST instruction in the API.
Full documentation is found here if you need to troubleshoot if your Plugin isn’t being called or responding to the test users as your want (more on testing later): https://swagger.io/specification/
Now, ChatGPT knows what to do next — get something from your Plugin!
ChatGPT will find that Plugin at the “servers” : “url” in the API YAML file you created.
3) CREATE THE PLUGIN (APP)
The Plugin needs to be hosted at the “servers” : “url”.
The Plugin can simply be a plain text sentence.
Or it could be as complex as a web application.
The choice is up to you.
But remember, ChatGPT will only select your Plugin if it deems it to be the best choice to deliver the action the user prompted.
ChatGPT will get this information to make a decision about being the best choice from the Manifest description and title, as opposed to the API file.
However, it’s important to note, that the more specific your instructions are in the API file, the more likely ChatGPT will return the Plugins output to the user unchanged.
On occasion, ChatGPT does reword the Plugins output to better address the prompt, despite what you write in your API or manifest file.
4) TEST THE PLUGIN
This is where having Plugin accessibility within ChatGPT Plus is important.
If you have it…
Select GPT-4 > Plugins> Plugin Menu > Scroll to bottom >Plugin Store > Develop your own plugin > Paste the domain or subdomain including https > Find the manifest file > Next > Install for me.
The plugin will be installed for you and available for installation for 15 other GPT-4 users.
If you have any issues on the Find the manifest file > Next > Install for me steps, it’s mostly because your lined URL is incorrect and don’t match, are on different servers, have trailing backslashes, or don’t use https.
Each call to or from your Plugin will allow you to see the response s JSON format.
Do all the testing you want then…
5) SUBMIT THE PLUGIN
My first plugin got rejected for a character limit, so follow the review questions correctly here: https://platform.openai.com/docs/plugins/review#:~:text=plugin%20submission%20bot
If you don’t and Plugin gets rejected, you’ll need to fix the errors and resubmit at that same link -going by current wait times for Plugins to get approved that could n take 7+ days, so you’ll be delayed getting into the Plugin Store if time is of the essence for you.
Good luck and I hope that helps some people!