top of page
Writer's pictureThe Tech Platform

How to create your own ChatGPT Plugins

OpenAI plugins are like bridges that connect ChatGPT, the AI language model, to other applications created by third-party developers. These plugins expand the capabilities of ChatGPT by allowing it to interact with specific APIs (application programming interfaces) defined by those developers.


if you are new to ChatGPT and don't have much knowledge about ChatGPT Plugins then before going further read the article: ChatGPT Plugins: How to Add and Use ChatGPT Plugins


With the help of these plugins, ChatGPT can perform various actions and tasks. Here are some examples:

  1. Retrieve real-time information: ChatGPT can fetch up-to-date details like sports scores, stock prices, or the latest news from relevant sources.

  2. Retrieve knowledge-base information: ChatGPT can access specific databases or knowledge bases, such as company documents or personal notes, to retrieve relevant information for users.

  3. Assist users with actions: ChatGPT can help users with specific actions, such as booking a flight or ordering food, by interacting with the necessary APIs and performing the requested tasks.

OpenAI plugins enhance ChatGPT's abilities by enabling it to connect and interact with third-party applications through predefined APIs. This integration allows ChatGPT to retrieve real-time information, access knowledge bases, and assist users with various actions based on the capabilities provided by the connected applications.


Important:
Plugins are currently in a testing phase called "beta," and developer access may not be available to everyone at the moment. However, you can join a waitlist to get developer access when it becomes available.
During the beta phase, OpenAI will be actively working with users and developers to improve the plugin system. This means that the system may undergo significant changes based on the feedback and needs of those involved in the testing process.

Steps to create your own ChatGPT Plugins

Here we have an end-to-end flow to create your own plugins in ChatGPT:


Step 1: Create a manifest file and host it at yourdomain.com/.well-known/ai-plugin.json

The first step to creating your own ChatGPT plugin is to create a manifest file and host it at yourdomain.com/.well-known/ai-plugin.json. A manifest file is a JSON file that contains information about your plugin, such as its name, logo, description, version, etc. The manifest file also includes details about authentication required (type of auth, OAuth URLs, etc.), and an OpenAPI specification for the endpoints you want to expose. The OpenAPI specification defines the functionality and parameters of your API and provides natural language descriptions for the model to understand how to use it.


To create a manifest file for your plugin, you can use any text editor that supports JSON format. You can also use online tools and validators to create and check your manifest file. Some popular options are:

  • JSON Editor Online: A web-based tool that allows you to create and edit JSON files in a graphical or code view. It provides syntax highlighting, validation, formatting, and exporting features.

  • JSONLint: A web-based tool that allows you to validate and format JSON files. It provides syntax highlighting, error detection, and beautifying features.

  • JSON Schema Validator: A web-based tool that allows you to validate JSON files against a JSON schema. It provides syntax highlighting, error detection, and schema generation features.

You need to make sure that it follows some best practices and standards for writing JSON files. Some of these are:

  • Use clear and consistent naming conventions: Use meaningful and descriptive names for your properties and values. Use camelCase for naming conventions, and avoid using spaces or special characters.

  • Use double quotes for strings: Use double quotes (" ") for enclosing strings, such as names, descriptions, URLs, etc. Do not use single quotes (’ ') or no quotes for strings.

  • Use commas to separate values: Use commas (,) to separate values in an array or properties in an object. Do not use semicolons (;) or other characters to separate values.

  • Use brackets to enclose arrays and objects: Use square brackets ([ ]) to enclose arrays, which are collections of values. Use curly brackets ({ }) to enclose objects, which are collections of properties and values.

  • Do not include comments: Do not include comments in your JSON file, as they are not supported by the JSON format. Comments are lines or sections of text that are ignored by the parser and are used for documentation or explanation purposes.

For example,

{
    "name": "BookSearch",
    "logo": "https://example.com/booksearch.png",
    "description": "A plugin that allows ChatGPT to search for books on Amazon.",
    "version": "1.0.0",
    "apiUrl": "https://example.com/booksearch/api",
    "openApiUrl": "https://example.com/booksearch/openapi.yaml",
    "authentication": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
    }
}

Once you have created your manifest file for your plugin, you need to host it at a publicly accessible URL under the /.well-known/ai-plugin.json path. For example,

https://example.com/.well-known/ai-plugin.json


This URL will be used by ChatGPT to discover and install your plugin.


Step 2: Register your plugin in the ChatGPT UI

The second step to creating your own ChatGPT plugin is to register your plugin in the ChatGPT UI. You need to select the plugin model from the top drop-down menu, then select “Plugins”, “Plugin Store”, and finally “Develop your own plugin”. If authentication is required, provide an OAuth 2 client_id and client_secret or an API key.


To register your plugin in the ChatGPT UI, you need to follow these steps:


STEP 1: Go to https://play.chatgpt.ai/ and log in with your account.


STEP 2: Select the plugin model from the top drop-down menu.


STEP 3: Click on the “Plugins” button on the left sidebar.


STEP 4: Click on the “Plugin Store” tab on the top bar.


STEP 5: Click on the “Develop your own plugin” button in the bottom right corner.


STEP 6: Enter the URL of your manifest file in the text box.


STEP 7: Click on the “Register” button.


STEP 8: If authentication is required, enter your OAuth 2 client_id and client_secret or your API key in the text boxes.


STEP 9: Click on the “Save” button.


You should see a confirmation message that says “Your plugin has been registered successfully”. You should also see your plugin listed under the “My Plugins” tab on the top bar.


STEP 3: Activate the Plugin

You have to manually activate the plugin in ChatGPT because ChatGPT will not use your plugin by default.


To activate the plugin, follow these steps:


STEP 1: Click on the “Plugins” button on the left sidebar.


STEP 2: Click on the “Plugin Store” tab on the top bar.


STEP 3: Find your plugin in the list and click on the “Activate” button next to it.


STEP 4: If authentication is required, enter your OAuth 2 client_id and client_secret or your API key in the text boxes.


STEP 5: Click on the “Save” button.


STEP 4: Users being a Conversation

OpenAI integrates ChatGPT with plugins using a concise plugin description, endpoints, and examples, hidden from end users. When a relevant question is asked by the user, the model may trigger an API call from your plugin, with POST requests requiring user confirmation to avoid destructive actions. The model incorporates API call results into its response, potentially including rich previews for links using OpenGraph protocol. Additionally, the model can format data from your API in markdown, automatically rendered in the ChatGPT UI.


Step 5: Share your plugin with other users

The third and final step to creating your own ChatGPT plugin is to share your plugin with other users. You can share your plugin with up to 15 additional users who are also developers.


To share your plugin with other users, you need to follow these steps:

  1. Select the plugin model from the top drop-down menu.

  2. Click on the “Plugins” button on the left sidebar.

  3. Click on the “My Plugins” tab on the top bar.

  4. Find your plugin in the list and click on the “Share” button next to it.

  5. Click on the “Send” button.

You should see a confirmation message that says “Your plugin has been shared successfully”. The users you shared with should receive an email invitation with a link to activate your plugin.


To submit your plugin for verification by OpenAI, you need to follow these steps:

  1. Find your plugin in the list "My Plugins" and click on the “Submit” button next to it.

  2. Fill out a form with some information about your plugin, such as its purpose, functionality, use cases, etc.

  3. Click on the “Submit” button.

You should see a confirmation message that says “Your plugin has been submitted successfully”. OpenAI will review your submission and notify you of their decision via email.


Conclusion

By following these steps, you can extend ChatGPT’s functionality and connect it to your own applications or data sources. You can also share your plugin with other users or developers who may find it useful or interesting.

0 comments

Recent Posts

See All

Hozzászólások


bottom of page