Deploy a plugin in Autocode
Autocode is a platform that allows you to deploy your plugins from a web-based IDE.
Benefits of using Autocode
- ✅ Pearl - Programming AI assistant integrated so you can catch and fix errors as you code.
Deploying a plugin in Autocode
Ok, let's get started!
Step 1: Create a New API
Start by navigating to your Autocode dashboard and clicking on 'New API'. This will prompt you to name your plugin. Once named, you'll be presented with various files and folders, including functions
, readme
, package.json
, payloads.json
, stdlib.json
, and env.json
. The functions
folder will contain the endpoints for your ChatGPT Plugin.
Step 2: Create the Plugin Manifest
Before proceeding to create the endpoints for your plugin, it's crucial to first create a manifest. The manifest will define the plugin's metadata and the plugin's expected behavior.
To do this, create a www
folder at the root of your Autocode project. Think of this www
folder as equivalent to a public
folder in a traditional web project. Inside this www
folder, create another folder named .well-known
. This is where the ai-plugin.json
manifest file will be placed. Use the ai-plugin.json
file to define your plugin's metadata.
Step 3: Define the OpenAPI Specification
Next, return to the www
folder and create an openapi.yaml
or openapi.json
file. This file will outline the OpenAPI specification for your ChatGPT Plugin. The specification will define the routes of your API and the responses it should return.
Step 4: Develop the API Endpoints
Finally, head back to the functions
folder and start creating the necessary endpoints for your plugin as defined in your OpenAPI specification. In Autocode, each JavaScript file in the functions
folder represents a different endpoint that your plugin can interact with.