<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Plugin on Antoine Boucher</title><link>https://antoineboucher.info/CV/blog/tags/plugin/</link><description>Recent content in Plugin on Antoine Boucher</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 01 Jun 2024 10:00:00 -0400</lastBuildDate><atom:link href="https://antoineboucher.info/CV/blog/tags/plugin/index.xml" rel="self" type="application/rss+xml"/><item><title>ChatGPT plugin with FastAPI — implementation outline</title><link>https://antoineboucher.info/CV/blog/posts/fastapi-chatgpt-plugin-overview/</link><pubDate>Sat, 01 Jun 2024 10:00:00 -0400</pubDate><guid>https://antoineboucher.info/CV/blog/posts/fastapi-chatgpt-plugin-overview/</guid><description>&lt;p&gt;OpenAI-style &lt;strong&gt;plugins&lt;/strong&gt; expose an HTTP API described by an &lt;strong&gt;OpenAPI&lt;/strong&gt; document so ChatGPT can call your tools safely. &lt;strong&gt;FastAPI&lt;/strong&gt; generates OpenAPI for you, which fits this model well.&lt;/p&gt;
&lt;h2 id="1-define-the-api-in-fastapi"&gt;1. Define the API in FastAPI&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Routes return &lt;strong&gt;JSON&lt;/strong&gt; with stable shapes (no ambiguous free text where structure matters).&lt;/li&gt;
&lt;li&gt;Add &lt;strong&gt;summaries and descriptions&lt;/strong&gt; on paths and fields — they help the model choose the right tool.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="2-publish-openapijson"&gt;2. Publish &lt;code&gt;openapi.json&lt;/code&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;FastAPI serves &lt;strong&gt;&lt;code&gt;/openapi.json&lt;/code&gt;&lt;/strong&gt; by default; the plugin manifest points at this URL (or a static copy you version).&lt;/li&gt;
&lt;li&gt;Keep schemas &lt;strong&gt;tight&lt;/strong&gt;: enums, required fields, and examples reduce bad calls.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="3-plugin-manifest"&gt;3. Plugin manifest&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Host &lt;strong&gt;&lt;code&gt;ai-plugin.json&lt;/code&gt;&lt;/strong&gt; (or the format required by the current OpenAI developer docs) over &lt;strong&gt;HTTPS&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Manifest references your API base URL and OpenAPI location.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="4-auth"&gt;4. Auth&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Prefer &lt;strong&gt;OAuth&lt;/strong&gt; or &lt;strong&gt;API keys&lt;/strong&gt; as documented for your integration; never commit secrets.&lt;/li&gt;
&lt;li&gt;Validate tokens inside FastAPI dependencies or middleware.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="5-deploy"&gt;5. Deploy&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;HTTPS&lt;/strong&gt; endpoint reachable from OpenAI’s servers.&lt;/li&gt;
&lt;li&gt;Logging and &lt;strong&gt;idempotency&lt;/strong&gt; for side-effecting routes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="6-test-manually"&gt;6. Test manually&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Call routes with &lt;code&gt;curl&lt;/code&gt; or HTTPie using the same payloads the model will send.&lt;/li&gt;
&lt;li&gt;Iterate on descriptions and constraints before exposing wide traffic.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Details change with OpenAI’s platform updates — always follow the latest &lt;strong&gt;plugin / tools / actions&lt;/strong&gt; documentation when wiring production apps.&lt;/p&gt;</description></item><item><title>D2C OpenAI plugin — diagrams with PlantUML, Mermaid, and D2</title><link>https://antoineboucher.info/CV/blog/posts/d2c-openai-diagram-plugin/</link><pubDate>Tue, 06 Sep 2022 10:00:00 -0400</pubDate><guid>https://antoineboucher.info/CV/blog/posts/d2c-openai-diagram-plugin/</guid><description>&lt;p&gt;Github: &lt;a href="https://lnkd.in/en3dSVuQ"&gt;https://lnkd.in/en3dSVuQ&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Plugin URL: &lt;a href="https://lnkd.in/exVNZMnT"&gt;https://lnkd.in/exVNZMnT&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;D2COpenAIPlugin is a plugin for ChatGPT that enables users to generate diagrams using PlantUML, Mermaid, D2. This plugin enhances the capabilities of ChatGPT by providing a seamless way to create diverse and creative diagrams.&lt;/p&gt;
&lt;p&gt;For a &lt;strong&gt;prompt-in-the-chat&lt;/strong&gt; workflow (AIPRM template, cache hit/miss sequence examples, and canvas-tool tips), see &lt;strong&gt;&lt;a href="https://antoineboucher.info/CV/blog/posts/chatgpt-airprm-sequence-diagrams/"&gt;Diagram prompts with ChatGPT and AIPRM&lt;/a&gt;&lt;/strong&gt; — complementary to this plugin-based approach.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://antoineboucher.info/CV/blog/posts/d2c-openai-diagram-plugin/images/1692387139389.jpeg" alt="1692387139389.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;🤖 ChatGPT UML Plugins - DEMO&lt;/p&gt;</description></item><item><title>D2COpenAIPlugin</title><link>https://antoineboucher.info/CV/blog/projects/d2copenaiplugin/</link><pubDate>Mon, 06 Sep 2021 22:42:23 +0800</pubDate><guid>https://antoineboucher.info/CV/blog/projects/d2copenaiplugin/</guid><description>&lt;h1 id="d2copenaiplugin"&gt;D2COpenAIPlugin&lt;/h1&gt;
&lt;p&gt;You can view the project &lt;a href="https://github.com/antoinebou12/D2COpenAIPlugin/tree/main"&gt;here&lt;/a&gt;
You can use the plugin &lt;a href="https://openai-uml-plugin.vercel.app"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Join the &lt;a href="https://openai.com/waitlist/plugins"&gt;ChatGPT plugins waitlist here&lt;/a&gt;!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;D2COpenAIPlugin is a plugin for ChatGPT that enables users to generate diagrams using PlantUML or Mermaid. This plugin enhances the capabilities of ChatGPT by providing a seamless way to create diverse and creative diagrams.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://raw.githubusercontent.com/antoinebou12/UMLOpenAIPlugin/main/docs/DiagramGeneratorPlugin.gif" alt="https://github.com/antoinebou12/UMLOpenAIPlugin/docs/DiagramGeneratorPlugin.gif"&gt;
&lt;img src="https://github.com/antoinebou12/D2COpenAIPlugin/assets/13888068/638e6ef6-b006-4f63-a7b8-b765fc0d8a41" alt="image"&gt;&lt;/p&gt;
&lt;h2 id="features"&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Generate diagrams using PlantUML or Mermaid&lt;/li&gt;
&lt;li&gt;Seamless integration with ChatGPT&lt;/li&gt;
&lt;li&gt;User-friendly interface for creating diagrams&lt;/li&gt;
&lt;li&gt;Enhances the versatility of ChatGPT&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;Before using the plugin, make sure to have the following prerequisites installed:&lt;/p&gt;</description></item></channel></rss>