<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Chatgpt on dwmkerr.com</title><link>https://dwmkerr.com/categories/chatgpt/</link><description>Recent content in Chatgpt on dwmkerr.com</description><generator>Hugo -- gohugo.io</generator><language>en-uk</language><managingEditor>Dave Kerr</managingEditor><copyright>Copright &amp;copy; Dave Kerr</copyright><lastBuildDate>Fri, 05 May 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://dwmkerr.com/categories/chatgpt/index.xml" rel="self" type="application/rss+xml"/><item><title>A ChatGPT Extension to Create Diagrams</title><link>https://dwmkerr.com/chatgpt-diagrams-extension/</link><pubDate>Fri, 05 May 2023 00:00:00 +0000</pubDate><guid>https://dwmkerr.com/chatgpt-diagrams-extension/</guid><description>&lt;p&gt;Quick Links: &lt;a href="https://chrome.google.com/webstore/detail/chatgpt-diagrams/gllophmfnbdpgfnbmbndlihdlcgohcpni"&gt;ChatGPT Diagrams on the Chrome Web Store&lt;/a&gt; | &lt;a href="https://github.com/dwmkerr/chatgpt-diagrams-extension"&gt;ChatGPT Diagrams on GitHub&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://chrome.google.com/webstore/detail/chatgpt-diagrams/gllophmfnbdpgfnbmbndlihdlcgohcpn"&gt;ChatGPT Diagrams&lt;/a&gt; browser extension makes it extremely easy to create diagrams with ChatGPT. Here&amp;rsquo;s how the extension looks in action:&lt;/p&gt;
&lt;p&gt;&lt;img src="images/apple-store.gif" alt="Video recording of the &amp;lsquo;Apple Store&amp;rsquo; prompt for ChatGPT Diagrams"&gt;&lt;/p&gt;
&lt;h2 id="how-to-create-diagrams"&gt;How to create diagrams&lt;/h2&gt;
&lt;p&gt;To create diagrams, just follow the steps below:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install the &lt;a href="https://chrome.google.com/webstore/detail/chatgpt-diagrams/gllophmfnbdpgfnbmbndlihdlcgohcpn"&gt;ChatGPT Diagrams&lt;/a&gt; from the Chrome Web Store&lt;/li&gt;
&lt;li&gt;Enter a prompt asking to draw a diagram - and make sure you include the text &amp;ldquo;use mermaid syntax&amp;rdquo;, for example: &lt;em&gt;Show the basic building blocks of a chrome extension using mermaid syntax&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;ChatGPT will output some code - press the &amp;ldquo;Show Diagram&amp;rdquo; button above the code block to render your diagram&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That&amp;rsquo;s it! We just need to prompt ChatGPT to use &lt;a href="https://mermaid.js.org/"&gt;Mermaid Syntax&lt;/a&gt;. Mermaid is a text-based language that can be used to describe flowcharts, sequence diagrams, and many of types of diagram.&lt;/p&gt;
&lt;p&gt;The extension searches for code blocks that look like they could be Mermaid diagrams, and then adds a little &amp;ldquo;Show Diagram&amp;rdquo; button to each one - pressing this will then attempt to render the diagram using Mermaid. It is not 100% fool-proof, sometimes ChatGPT gets the syntax wrong, but generally works pretty reliably.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s what a few prompts could look like - not that in each one we request that the output uses Mermaid syntax:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Show the basic building blocks of a chrome extension using mermaid syntax&lt;/li&gt;
&lt;li&gt;Show a flowchart of the steps I need to go through to create and publish a simple website, use Mermaid syntax&lt;/li&gt;
&lt;li&gt;What&amp;rsquo;s the sequence diagram for publishing an app in the apple store? Use Mermaid Syntax.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And here&amp;rsquo;s what each of the prompts would produce:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Show the basic building blocks of a chrome extension using mermaid syntax&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="images/chrome-extension.gif" alt="Video recording of the &amp;lsquo;Chrome Extension&amp;rsquo; prompt for ChatGPT Diagrams"&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Show a flowchart of the steps I need to go through to create and publish a simple website, use Mermaid syntax&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="images/simple-website.gif" alt="Video recording of the &amp;lsquo;Simple Website&amp;rsquo; prompt for ChatGPT Diagrams"&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What&amp;rsquo;s the sequence diagram for publishing an app in the apple store? Use Mermaid Syntax.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="images/apple-store.gif" alt="Video recording of the &amp;lsquo;Apple Store&amp;rsquo; prompt for ChatGPT Diagrams"&gt;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s really all there is to it! Raise any suggestions or bugs on the &lt;a href="https://github.com/dwmkerr/chatgpt-diagrams-extension/issues"&gt;issues page&lt;/a&gt; and if you find this extension useful please do &lt;a href="https://chrome.google.com/webstore/detail/chatgpt-diagrams/gllophmfnbdpgfnbmbndlihdlcgohcpn"&gt;rate it or leave a review&lt;/a&gt;!&lt;/p&gt;
&lt;h2 id="troubleshooting-and-common-issues"&gt;Troubleshooting and common issues&lt;/h2&gt;
&lt;p&gt;This project is something I&amp;rsquo;ve put together quite quickly and there are still some rough edges. Some issues you might face:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mermaid Syntax Error&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This normally happens if you haven&amp;rsquo;t told ChatGPT to use Mermaid Syntax. Try your prompt again but make sure to include the text &amp;ldquo;show output using Mermaid syntax&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Diagrams are empty&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Try refreshing the page and then choose &amp;ldquo;Show Diagram&amp;rdquo;.&lt;/p&gt;
&lt;h2 id="building-the-extension"&gt;Building the Extension&lt;/h2&gt;
&lt;p&gt;The extension is available on GitHub at:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/dwmkerr/chatgpt-diagrams-extension"&gt;https://github.com/dwmkerr/chatgpt-diagrams-extension&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just clone, then run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;npm install
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;npm start
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Open chrome at: &lt;code&gt;chrome://extensions&lt;/code&gt;, choose &amp;ldquo;Load Unpacked&amp;rdquo; and select the &lt;code&gt;./dist&lt;/code&gt; folder from your local copy of the &lt;code&gt;chatgpt-diagrams-extension&lt;/code&gt; repository. Everything else you need to know should be on the &lt;a href="https://github.com/dwmkerr/chatgpt-diagrams-extension"&gt;README&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="further-reading"&gt;Further Reading&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aruva.medium.com/using-chatgpt-to-build-system-diagrams-part-i-69efc7603926"&gt;Using ChatGPT to build System Diagrams&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><category>CodeProject</category></item></channel></rss>