The ChatGPT Retrieval Plugin lets you easily search and find personal or work documents by asking questions in everyday language. Open AI made the plugin’s source code open source, meaning anyone is free to look at it, use it, and fork it for their own use. In this post, we’ll review in general what the plugin consists of so to gain a better understanding of what must be done to create a ChatGPT plugin.
The source code is stored on GitHub and can be found here. Looking at the language analyzer on GitHub, we see that the plugin is 99.5% Python, meaning the plugin is written in Python. If you’re a PHP, JavaScript, or C# person, you should still be able to follow along, but might need to study Python a bit to fully understand the code.
You can see an example of the plugin retrieving data from folders and using the data in its response in the below 40 second video.
Developers can create a plugin by exposing an API through their website and providing a standardized manifest file that describes the API. ChatGPT consumes these files and allows the AI models to make calls to the API defined by the developer.
In a nutshell, a plugin consists of:
To standup your plugin for use, you simply deploy your code on a server. Heroku us a great option, but it could literally be any server on any website running in any programming language. At the end of the day, the plugin is simply a setup of restful API endpoints that ChatGPT will call and return data from.
To install a developer plugin, follow the steps below:
After completing these steps, your developer plugin should be installed and ready to use in ChatGPT.
The linked source code in the beginning of this post has all the details for the ChatGPT retrieval plugin. As discussed above, a plugin is ultimately an API endpoint(s), API schema, and a manifest. You deploy these onto a webserver on your domain / website, and then install the plugin in ChatGPT. From a software development perspective, it’s very straightforward.