Template for building ChatGPT Plugins in TypeScript that run on Supabase Edge Runtime.
For a full walk through, read the blog post: Building ChatGPT Plugins with Supabase Edge Runtime.
Or watch the video tutorial:
Note: This is a TypeScript port of OpenAI's official "[...] simple todo list plugin with no auth" Python example.
The chatgpt-plugin
function contains @openapi
JSDoc annotations which are used for swagger-jsdoc
to generate the openapi.json
file
deno run --allow-read --allow-write scripts/generate-openapi-spec.ts
- Build and start the container:
docker compose up --build
- Visit
File changes in the /functions
directory will automatically be detected, except for the /main/index.ts
function as it is a long running server.
- Clone this repository.
- Change
http://localhost:8000
to your Fly domain in the/main/ai-plugins.json
file - Open
fly.toml
and update the app name and optionally the region etc. - In your terminal, run
fly apps create
and specify the app name you just set in yourfly.toml
file. - Finally, run
fly deploy
.
Install the Plugin in the ChatGPT UI
- 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”.
- Either enter
localhost:8000
or your Fly domain and click "Find manifest file"