<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>ChatGPT on Antoine Boucher</title><link>https://antoineboucher.info/CV/blog/tags/chatgpt/</link><description>Recent content in ChatGPT 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/chatgpt/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>GPT-4 vs GPT-3.5 — capabilities and API cost framing</title><link>https://antoineboucher.info/CV/blog/posts/gpt4-api-costs-overview/</link><pubDate>Mon, 10 Apr 2023 10:00:00 -0400</pubDate><guid>https://antoineboucher.info/CV/blog/posts/gpt4-api-costs-overview/</guid><description>&lt;p&gt;&lt;img src="https://media.licdn.com/dms/image/D5612AQHKus7rY_HvVQ/article-cover_image-shrink_720_1280/0/1681059889367?e=1709769600&amp;amp;v=beta&amp;amp;t=39LUP6caikwBW_QeEC7T-2peoci56x6v9xzNtCPdWxQ" alt="Article cover image" title="Cover Image for AI Article"&gt;&lt;/p&gt;
&lt;p&gt;As artificial intelligence continues to advance, more and more companies are incorporating AI-powered chatbots into their customer service systems. These chatbots can handle a wide range of customer inquiries, from simple questions to more complex issues. However, the cost of implementing and maintaining such chatbots is an important factor to consider. In this article, we will calculate the costs of using GPT-4 and GPT-3.5-turbo models with a message cap of 25 messages every 3 hours for one month of usage, considering the same average prompt sizes (50 to 200 tokens).&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>Diagram prompts with ChatGPT and AIPRM (PlantUML, Mermaid, and more)</title><link>https://antoineboucher.info/CV/blog/posts/chatgpt-airprm-sequence-diagrams/</link><pubDate>Tue, 06 Sep 2022 10:00:00 -0400</pubDate><guid>https://antoineboucher.info/CV/blog/posts/chatgpt-airprm-sequence-diagrams/</guid><description>&lt;p&gt;The &lt;a href="https://www.aiprm.com/"&gt;AIPRM&lt;/a&gt; browser extension gives you reusable prompt templates inside ChatGPT. Combined with a small &lt;strong&gt;structured prompt&lt;/strong&gt; (diagram type, what to draw, why, and which tool), you get consistent output whether you want text-first formats like &lt;strong&gt;PlantUML&lt;/strong&gt; or &lt;strong&gt;Mermaid&lt;/strong&gt;, or a recipe for redrawing the same flow in a canvas tool.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://antoineboucher.info/CV/blog/posts/chatgpt-airprm-sequence-diagrams/"&gt;Full article in French&lt;/a&gt;&lt;/strong&gt; (same slug — you can also switch to &lt;strong&gt;FR&lt;/strong&gt; in the site header).&lt;/p&gt;
&lt;h2 id="aiprm-prompt-template-copy-and-adapt"&gt;AIPRM prompt template (copy and adapt)&lt;/h2&gt;
&lt;p&gt;Fill one line per dimension. You can paste the block below into ChatGPT (with or without AIPRM) and edit the bracketed values.&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>