Test & Deploy Your Plugin
Understand the final steps before production
When you're ready, to test your ChatGPT Plugin, select the plugin model from the top drop down, then select “Plugins”, “Plugin Store”, and finally “Install an unverified plugin” or “Develop your own plugin”.
At present, this allows you to interact with your plugin via ChatGPT. If you wish to make the plugin available to the public, you can submit it to OpenAI for review. You can find your link on the "ChatGPT Plugins Developer Early Access" email.
Lessons Learnt
The lessons below were encountered during the initial beta phase and some may no longer be valid.
Include Previous Conversation
It's possible to automatically send all the previous conversation to the API as part of the request. In the description_for_model we included the phase Always include the previous conversation in the request with the following parameter in the OpenAPI Spec.
"name": "previous_conversation",
"in": "query",
"description": " text",
"required": true,
As a result, now every time the Plugin is called, we have the complete context of the conversation with the user, including messages not previously seen by the API.
Track Conversations using HTTP Headers
You can track individual conversations and users using provided HTTP Headers in the request. The headers also include the language of the user for internationalization.
"openai-conversation-id": "5cab5038-fake-11ed-afa1-0242ac120002",
"openai-ephemeral-user-id": "62919174-fake-11ed-afa1-0242ac120002",
"openai-subdivision-1-iso-code": "GB-ENG",
ChatGPT User Agent
At time of writing, the user-agent provided by ChatGPT is:
"user-agent": "Python/3.9 aiohttp/3.8.0"
ChatGPT Parameter Assignment
Ensure you give the parameters a descriptive name to aid ChatGPT with assigning the users intent to the parameter. The description fields in the OpenAPI Spec can help give the LLM more context too.
ChatGPT falls back to other endpoints
We found that ChatGPT would fall back to other endpoints if the first one failed. This might lead to unexpected results. Ensure you have the correct validation in place to protect against this.
Sends Internals
Anything ChatGPT can generate as a message can be sent to the plugin API, for example, the internal prompt.
Lack of Rate Limiting
Be aware, a user can tell ChatGPT to call the API a number of times per chat message. Ensure you have the correct validation in place to protect against this.
Generates Dummy Data
Users can ask ChatGPT to send dummy data to your API. Ensure you have the correct validation in place to protect against this.
ChatGPT discusses API details
Even if you have restricted access to the ai-plugin.json file, a user can ask ChatGPT for more information about your API
Parameter named "text" fails
This might be a bug, but this appeared to fail consistently with our tests.