#Code – 🔌Building Plugins for ChatGPT, Microsoft Bing and Edge
Tags: englishpost, chatgpt, codesample
Published: 2023-06-23 13:42:33

---
title: #Code – 🔌Building Plugins for ChatGPT, Microsoft Bing and Edge
published: true
date: 2023-06-22 13:00:00 UTC
tags: EnglishPost,ChatGPT,CodeSample,EnglishPost
canonical_url: 
---

Hi!

This one was in my top three announcements from Build 2023. We can now build Chat Plugins for Microsoft Bing and Edge. Look at this 10 min intro:

<iframe width="750" height="422" src="https://www.youtube.com/embed/Q-5M7EYjl6U?version=3&amp;rel=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;fs=1&amp;hl=en&amp;autohide=2&amp;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation"></iframe>

Video Summary:

- 🌍💬📚 Microsoft is bringing AI innovation to Bing Chat, including multimodal conversation, more languages, and chat history. 
- 🛠🔗 Developers can create plugins to connect their services with Bing Chat and other Microsoft platforms. 
- 🤝🌐 Plugins are compatible across ChatGPT, Bing Chat, and the Microsoft Copilot system, reaching a wide ecosystem of users. 
- 📝👍🛠 Developers need an OpenAPI Specification documenting their API and a manifest file to participate. Once approved, plugins can be added to Bing Chat in Edge. 

## Creating Plugins

> Microsoft is [adopting the same open plugin standard](https://news.microsoft.com/build-2023-book-of-news/#a-111-microsoft-is-growing-the-ai-plugin-ecosystem) that OpenAI introduced for ChatGPT, enabling interoperability across ChatGPT and the breadth of Microsoft’s copilot offerings. That means developers can now use one platform to build plugins that work across both business and consumer surfaces, including ChatGPT, Bing, Dynamics 365 Copilot, Microsoft 365 Copilot and Windows Copilot. Microsoft also [announced it is bringing Bing to ChatGPT](https://aka.ms/BingBuildBlog2023) as the default search experience.
> 
> <cite><a href="https://news.microsoft.com/source/features/ai/microsoft-outlines-framework-for-building-ai-apps-and-copilots-expands-ai-plugin-ecosystem/" target="_blank" rel="noreferrer noopener">Microsoft outlines framework for building AI apps and copilots; expands AI plugin ecosystem</a></cite>

This is cool because we can learn more about creating plugins for ChatGPT. And based on the [get started documentation](https://platform.openai.com/docs/plugins/getting-started), it’s easy. Creating a plugin takes three steps:

1. Build an API
2. Document the API in the OpenAPI yaml or JSON format
3. Create a JSON manifest file that will define relevant metadata for the plugin

During Build 2023 we share a sample Python FastApi app, on how to create a plugin. I cloned the original repo and created one ([here](https://github.com/elbruno/openai-plugin-fastapi)) with some updates:

- The Plugin now returns a list of pets.
- The pet information schema includes basic pet information, and the owner information.

Here is a sample:

```

    {
        "name": "Max",
        "type": "dog",
        "breed": "Golden Retriever",
        "age": 4,
        "color": "golden",
        "weight": 30,
        "owner": {
            "name": "John Doe",
            "email": "johndoe@example.com",
            "phone": "+1-555-123-4567"
        }
    }

```

## Testing the PlugIn in ChatGPT

Time to test in ChatGPT. Registering the plugin is super easy, and once registered and working in Dev mode, we can use natural language to interact with the plugin.

In example: We can ask **_which owners have a dog and a cat?_** Spoiler, it was me 😁

![chatgpt question about the ownere with 2 pets interacting with the custom plugin](https://brunocapuano.files.wordpress.com/2023/06/image-1.png?w=1024)

We can also ask for insights about the pets’ information. In example: **which is the oldest pet?**

![chatgpt question about the oldest pet interacting with the custom plugin](https://brunocapuano.files.wordpress.com/2023/06/image-2.png?w=1024)

Again, this is super cool!

## Next Steps: NET PlugIn sample

Now I’m creating simple plugin in NET, almost there! I’ll share the repo and instructions soon.

![net plugin api interface for chatgpt is almost done](https://brunocapuano.files.wordpress.com/2023/06/image-3.png?w=1024)

Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).

More info in [https://beacons.ai/elbruno](https://beacons.ai/elbruno)

* * *