<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tutorial on Antoine Boucher</title><link>https://antoineboucher.info/CV/blog/tags/tutorial/</link><description>Recent content in Tutorial 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/tutorial/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>Kinectron + p5.js — sketch controls and GIF export</title><link>https://antoineboucher.info/CV/blog/posts/kinectron-p5-sketch-gif/</link><pubDate>Fri, 15 Mar 2024 10:00:00 -0400</pubDate><guid>https://antoineboucher.info/CV/blog/posts/kinectron-p5-sketch-gif/</guid><description>&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;
&lt;p&gt;This tutorial will guide you through setting up a Kinectron sketch in p5.js, which includes functionality for stopping and playing the sketch, as well as saving it as a GIF.&lt;/p&gt;
&lt;h3 id="prerequisites"&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Basic knowledge of JavaScript and p5.js.&lt;/li&gt;
&lt;li&gt;Kinectron library installed.&lt;/li&gt;
&lt;li&gt;p5.js library installed.&lt;/li&gt;
&lt;li&gt;Have a Kinect v2 or Azure Kinect DK.&lt;/li&gt;
&lt;li&gt;Have a Kinectron server running.&lt;/li&gt;
&lt;li&gt;Have a local or online environment that supports JavaScript and p5.js.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="step-1-set-up-your-environment"&gt;Step 1: Set Up Your Environment&lt;/h3&gt;
&lt;p&gt;Ensure you have the p5.js and Kinectron libraries included in your HTML file.&lt;/p&gt;</description></item><item><title>CodePen demos (collection)</title><link>https://antoineboucher.info/CV/blog/posts/codepen-demos-antoinebou13/</link><pubDate>Tue, 10 Jan 2017 10:00:00 -0400</pubDate><guid>https://antoineboucher.info/CV/blog/posts/codepen-demos-antoinebou13/</guid><description>&lt;p&gt;Small experiments on &lt;strong&gt;CodePen&lt;/strong&gt; (live embeds below) plus standalone write-ups that used to be separate posts—jQuery/CSS patterns, &lt;code&gt;getDisplayMedia&lt;/code&gt;, and other front-end notes—gathered here for one bookmark.&lt;/p&gt;
&lt;h2 id="small-pens"&gt;Small pens&lt;/h2&gt;
&lt;h3 id="bmdzwx"&gt;BMdzwx&lt;/h3&gt;
&lt;div class="not-prose my-6 w-full overflow-hidden rounded-lg border border-black/10 dark:border-white/10"&gt;
 &lt;iframe
 title="CodePen embed"
 src="https://codepen.io/antoinebou13/embed/BMdzwx?default-tab=result"
 style="width:100%; height: 420px;"
 loading="lazy"
 allowfullscreen="true"
 &gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://codepen.io/antoinebou13/pen/BMdzwx"&gt;Open on CodePen&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="details-view-xmxnyy"&gt;Details view (xMXNyy)&lt;/h3&gt;
&lt;div class="not-prose my-6 w-full overflow-hidden rounded-lg border border-black/10 dark:border-white/10"&gt;
 &lt;iframe
 title="CodePen embed"
 src="https://codepen.io/antoinebou13/embed/xMXNyy?default-tab=result"
 style="width:100%; height: 420px;"
 loading="lazy"
 allowfullscreen="true"
 &gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://codepen.io/antoinebou13/details/xMXNyy"&gt;Open on CodePen&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="jxrqqx"&gt;JxrqQx&lt;/h3&gt;
&lt;div class="not-prose my-6 w-full overflow-hidden rounded-lg border border-black/10 dark:border-white/10"&gt;
 &lt;iframe
 title="CodePen embed"
 src="https://codepen.io/antoinebou13/embed/JxrqQx?default-tab=result"
 style="width:100%; height: 420px;"
 loading="lazy"
 allowfullscreen="true"
 &gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://codepen.io/antoinebou13/pen/JxrqQx"&gt;Open on CodePen&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>