A simple ChatGPT Plugin framework in Typescript
MIT License
A ChatGPT TypeScript Plugin Framework with automatic OpenAPI based on lukeautry/tsoa
Please leave a star if you like it!
Follow me on twitter for more updates castignolimarco
Just run
yarn install
You need to learn how ChatGPT plugins works in general by reading the ChatGPT plugin documentation here
Do not edit
public/ai-plugin.json
: The file is automatically generated, do not edit this filepublic/openapi.yaml
: The file is automatically generated, do not edit this fileEdit
public/logo.png
: Just a simple logo for your plugin./ai-plugin.json
: You can edit the information in this file but not the field description_for_model
./description_for_model.md
: You can use this md file to describe your plugin to ChatGPT, every functionality must be clear for ChatGPTBasically through the use of decorators and typescript analysis tsoa automatically generate an openAPI file for you. But you need to follow the tsoa's opinioned code structure.
Just read lukeautry/tsoa documentation, there is a simple example in src/controllers/ExampleTestController.ts
.
yarn start
Beta Feature
tab, open it and activate Plugins
.Develop your own plugin
paste your host and port for examplelocalhost:3333
Prompt:
Call the test plugin by passing my name: "Marco"
If you need to run the plugin on a different host you need to make a few manual fix.
src/server.ts
tsoa.json
: change the "host": "localhost:3333",
fixHost.yaml
, keep the /
at the end, this file is used to exactly fix the trailing /
.ai-plugin.json