You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an example plugin showing how to build [ChatGPT plugins](https://platform.openai.com/docs/plugins/introduction) using [Cloudflare Workers](https://workers.dev). Using this example, you can deploy a plugin to Cloudflare Workers in just a few minutes.
4
+
5
+
The sample plugin allows ChatGPT users to search for repositories using GitHub's search API. The plugin is implemented in TypeScript and uses the [OpenAPI](https://www.openapis.org/) specification to define the plugin's API.
6
+
7
+

8
+
9
+
## Get started
10
+
11
+
0. Sign up for [Cloudflare Workers](https://workers.dev). The free tier is more than enough for most use cases.
12
+
1. Install [wrangler](https://developers.cloudflare.com/workers/cli-wrangler/install-update), the Cloudflare Workers CLI
13
+
2. Clone this project and install dependencies with `npm install`
14
+
3. Run `wrangler login` to login to your Cloudflare account in wrangler
15
+
4. Run `wrangler publish` to publish the plugin to Cloudflare Workers
16
+
17
+
## Usage
18
+
19
+
1. You can configure the `.well-known/ai-plugin.json` route in `index.ts`.
20
+
2. Update the OpenAPI schema in `openapi.ts`.
21
+
3. You can set up any new routes and the associated OpenAPI schema by defining new routes. See `search.ts` for an example.
22
+
23
+
## Deploying to OpenAI's API
24
+
25
+
Follow the instructions [in the ChatGPT documentation](https://platform.openai.com/docs/plugins/introduction/plugin-flow) to deploy your plugin and begin using it in ChatGPT.
0 commit comments