{"componentChunkName":"component---src-templates-tags-js","path":"/tags/LLM/","result":{"data":{"allMarkdownRemark":{"totalCount":3,"edges":[{"node":{"id":"cb065704-0aec-5758-ba5c-0574cad52242","html":"<p>Are you a developer who wants to use AI in their day to day coding but don’t have access to tools like <a href=\"https://github.com/features/copilot\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">GitHub Copilot</a>, <a href=\"https://github.blog/2024-04-29-github-copilot-workspace/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">GitHub Copilot Workspace</a> or Cloud based services like <a href=\"https://azure.microsoft.com/en-au/products/ai-services/openai-service\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Azure OpenAI</a>? If yes, read on and you’re going to have super powers by the end of this post.</p>\n<!--more-->\n<h2 id=\"why-bother\" style=\"position:relative;\"><a href=\"#why-bother\" aria-label=\"why bother permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Why bother?</h2>\n<p>If you’re wondering what is all the fuss and why should I bother, I have to tell you AI is moving like a speed train and if you don’t jump in, you’ll be left behind and it would be very hard to catch on later. AI can help you enhance your coding skills, increase your productivity, and help you learn a great deal more than you do in your job.</p>\n<p>Here are some reasons why any developer needs to use AI:</p>\n<ul>\n<li><strong>Automated code generation</strong>: AI can generate code and save you time and effort. You can get suggestions with snippets of code and even get the rest of your code completed as soon as you have some of it written. This can speed up your coding and development process by a great deal.</li>\n<li><strong>Code review</strong>: AI can help to review code and identify potential issues, bugs, security vulnerabilities and code smells before they even become problems. This can improve the overall quality of your code and products and reduce time spent fixing bugs after go live.</li>\n<li><strong>Personalised learning</strong>: AI can provide personalised learning experience for you and help improve your skills and knowledge in a way which is tailored to your needs and learning style.</li>\n<li><strong>Natural language (NLP)</strong>: In addition to all of the previous points, you get to use your natural language to interact with AI using prompts, voice etc which makes the whole process even faster.</li>\n</ul>\n<h2 id=\"setup---lets-get-cracking\" style=\"position:relative;\"><a href=\"#setup---lets-get-cracking\" aria-label=\"setup   lets get cracking permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Setup - let’s get cracking</h2>\n<p>Enough talk, let’s get into the action. You will need these before you can leverage AI in your development environment:</p>\n<ul>\n<li><a href=\"https://ollama.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Ollama</a> which is an open source project allowing you to interact with LLMs locally. If you don’t have it setup, <a href=\"/blog/2024/05/28/local-llms/\">use my earlier post</a> to get setup. We also need to have a model installed which supports code generation.</li>\n<li><a href=\"https://code.visualstudio.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">VS Code</a> which is also an open source code editor which has billions of users globally. <em>You can use <a href=\"https://www.jetbrains.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">JetBrains</a> if you are using that already BTW</em>.</li>\n<li><a href=\"https://www.continue.dev/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Continue</a> which is an extension which allows you to leverage LLMs in your code editors using cloud or local hosted models.</li>\n</ul>\n<h3 id=\"install-the-code-generation-model\" style=\"position:relative;\"><a href=\"#install-the-code-generation-model\" aria-label=\"install the code generation model permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install the code generation model</h3>\n<p>Go into the environment which you have Ollama installed and install the <code class=\"language-text\">starcoder</code> model. You can get the 3b parameter version or if you’re adventurous like me, get the 7b version which is roughly 4GB.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"63456791684493100000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`ollama pull starcoder2:7b`, `63456791684493100000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">ollama pull starcoder2:7b</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>And you should see the model being pulled and installed.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/f80157b18b008a25f3bf964a2fb98e78/ab98c/pullmodel.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 20.740740740740744%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAABYlAAAWJQFJUiTwAAAA+klEQVR42j3P7UuDUBQGcD/Worex0pmZXl/urjZd6qblxojqSxCtFdXofwgGo1W46D9/Ol5iH36cBw48nKPEaYEo6YMHEaKzAeI0RxCl6FL2RATGT2F5Ag4PYfsB2qZDGEzGYblird7VlN5giGJ4iXJ8DVfEVJbhfb5A9fOL5VdFVvggy+/Vf64wX3wi7pfQ7Q5aRwwHhkNcSQmTc8TZBZJiBDfowWACN7cT3D28SPePr2uTpxmmz2+UZ/C7GRUKqKYP7aTG5VTy0RXycizfrDE/hGrY0Om1pnqMxp6GjZ1DbO6qaOxr2Grq2G4ZdJlDZR40i6NtdaS69A9FZIBrryy18wAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Pulling down the startcode model in Ollama\"\n        title=\"\"\n        src=\"/static/f80157b18b008a25f3bf964a2fb98e78/302a4/pullmodel.png\"\n        srcset=\"/static/f80157b18b008a25f3bf964a2fb98e78/01bf6/pullmodel.png 270w,\n/static/f80157b18b008a25f3bf964a2fb98e78/07484/pullmodel.png 540w,\n/static/f80157b18b008a25f3bf964a2fb98e78/302a4/pullmodel.png 1080w,\n/static/f80157b18b008a25f3bf964a2fb98e78/0d292/pullmodel.png 1620w,\n/static/f80157b18b008a25f3bf964a2fb98e78/b3608/pullmodel.png 2160w,\n/static/f80157b18b008a25f3bf964a2fb98e78/ab98c/pullmodel.png 2356w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h3 id=\"install-the-extension\" style=\"position:relative;\"><a href=\"#install-the-extension\" aria-label=\"install the extension permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install the extension</h3>\n<p>First you need to install <a href=\"https://marketplace.visualstudio.com/items?itemName=Continue.continue\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Continue extension</a> in VS Code. You can click on the link from here or go into your VS Code extensions and get it installed.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/2ec0daeea40fd60badd27bb93e4b4058/6114f/vscodeext.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 31.11111111111111%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAABYlAAAWJQFJUiTwAAABbElEQVR42k2RzUvjQBiH+3eYNMlkkjaJaTr90K2KSlUW9qiC4HXvHhT/Hi/Cssv+AQoLWvqBsAseBC8e9KQHK5hLLUrhcRL82IGHl5dhnnfmNwUhfYIoRvplpFfC07jSo9GcIUkShBBI3ZfLek8KXNfFtm0Mw/igWCziOE5eCwvtb6xu7VBpb6O+fkeGtfzg0dExu3v7+EGMUnVUtUpdxcSxHi4llmXl4kyU1fe+0GoqVlbaJLUmanaZUhjnkzbXN5hfWsOWEaYxhWmaGBrzjUyQybL6LsuFSVJlOgqRwsELKjiuh1fyOfhxSOf0JKfb7dHv9zU9Op0Og8GAn79/6dtWCMNQx+R9CucW2zRb89hWkVKkEK7ONAj4d3NJtsZPY25v7xgOH7i/H/Ly8sxkAhdX11RrNZ27n+f8IazPfEE1ZnFsC+FH2EJS9kPOzi8YjUekaaplw5xMmKaPPI2e+TP4S5jUsR39Sf89+RUAsOoevZeb5QAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Installing continue extension in VS Code\"\n        title=\"\"\n        src=\"/static/2ec0daeea40fd60badd27bb93e4b4058/302a4/vscodeext.png\"\n        srcset=\"/static/2ec0daeea40fd60badd27bb93e4b4058/01bf6/vscodeext.png 270w,\n/static/2ec0daeea40fd60badd27bb93e4b4058/07484/vscodeext.png 540w,\n/static/2ec0daeea40fd60badd27bb93e4b4058/302a4/vscodeext.png 1080w,\n/static/2ec0daeea40fd60badd27bb93e4b4058/0d292/vscodeext.png 1620w,\n/static/2ec0daeea40fd60badd27bb93e4b4058/b3608/vscodeext.png 2160w,\n/static/2ec0daeea40fd60badd27bb93e4b4058/6114f/vscodeext.png 3823w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h3 id=\"configuring-the-extension\" style=\"position:relative;\"><a href=\"#configuring-the-extension\" aria-label=\"configuring the extension permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Configuring the extension</h3>\n<p>Once you have both of those installed, you can go ahead and configure your extension to use your local Ollama instance. Open the <code class=\"language-text\">config.json</code> settings for Continue using <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>, then typing <code class=\"language-text\">> continue: open config.json</code>. Keep in mind that Continue supports a <a href=\"https://docs.continue.dev/setup/select-provider\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">whole host of providers</a> other than local ones. Go ahead and add the models you want to the config file. Do not forget to change the IP address to match your own instance if it is not available on <code class=\"language-text\">localhost</code>.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"53467439845902590000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`{\r\n  &quot;models&quot;: [\r\n    {\r\n      &quot;title&quot;: &quot;Llama 3&quot;,\r\n      &quot;provider&quot;: &quot;ollama&quot;,\r\n      &quot;model&quot;: &quot;llama3&quot;,\r\n      &quot;apiBase&quot;: &quot;http://localhost:11434/&quot;\r\n    },\r\n    {\r\n      &quot;title&quot;: &quot;Starcoder 7b&quot;,\r\n      &quot;provider&quot;: &quot;ollama&quot;,\r\n      &quot;model&quot;: &quot;starcoder2:7b&quot;,\r\n      &quot;apiBase&quot;: &quot;http://localhost:11434/&quot;\r\n    }\r\n  ],\r\n  &quot;customCommands&quot;: [\r\n    {\r\n      &quot;name&quot;: &quot;test&quot;,\r\n      &quot;prompt&quot;: &quot;{{{ input }}}\\n\\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.&quot;,\r\n      &quot;description&quot;: &quot;Write unit tests for highlighted code&quot;\r\n    }\r\n  ],\r\n  &quot;tabAutocompleteModel&quot;: {\r\n    &quot;title&quot;: &quot;Starcoder 7b&quot;,\r\n    &quot;provider&quot;: &quot;ollama&quot;,\r\n    &quot;model&quot;: &quot;starcoder2:7b&quot;,\r\n    &quot;apiBase&quot;: &quot;http://localhost:11434/&quot;\r\n  },\r\n  &quot;allowAnonymousTelemetry&quot;: true,\r\n  &quot;embeddingsProvider&quot;: {\r\n    &quot;provider&quot;: &quot;transformers.js&quot;\r\n  }\r\n}`, `53467439845902590000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"json\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-json line-numbers\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\r\n  <span class=\"token property\">\"models\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\r\n    <span class=\"token punctuation\">{</span>\r\n      <span class=\"token property\">\"title\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Llama 3\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"provider\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"ollama\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"model\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"llama3\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"apiBase\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"http://localhost:11434/\"</span>\r\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\r\n    <span class=\"token punctuation\">{</span>\r\n      <span class=\"token property\">\"title\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Starcoder 7b\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"provider\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"ollama\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"model\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"starcoder2:7b\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"apiBase\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"http://localhost:11434/\"</span>\r\n    <span class=\"token punctuation\">}</span>\r\n  <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"customCommands\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\r\n    <span class=\"token punctuation\">{</span>\r\n      <span class=\"token property\">\"name\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"test\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"prompt\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"{{{ input }}}\\n\\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"description\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Write unit tests for highlighted code\"</span>\r\n    <span class=\"token punctuation\">}</span>\r\n  <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"tabAutocompleteModel\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token property\">\"title\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Starcoder 7b\"</span><span class=\"token punctuation\">,</span>\r\n    <span class=\"token property\">\"provider\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"ollama\"</span><span class=\"token punctuation\">,</span>\r\n    <span class=\"token property\">\"model\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"starcoder2:7b\"</span><span class=\"token punctuation\">,</span>\r\n    <span class=\"token property\">\"apiBase\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"http://localhost:11434/\"</span>\r\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"allowAnonymousTelemetry\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"embeddingsProvider\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token property\">\"provider\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"transformers.js\"</span>\r\n  <span class=\"token punctuation\">}</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"testing\" style=\"position:relative;\"><a href=\"#testing\" aria-label=\"testing permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Testing</h2>\n<p>Let’s test our setup, go ahead and open a file in which you have any code written. Select a code block and press <kbd>Ctrl</kbd> + <kbd>L</kbd> which opens the chat window, type <code class=\"language-text\">Explain this code to me in a few sentences</code> and press enter. You should see the explanation getting generated in the chat window:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/90a091790edb4e4bfc9a3317d27a018d/38abd/explain.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 73.7037037037037%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAACXBIWXMAABYlAAAWJQFJUiTwAAACHElEQVR42p1UWa6jMBDkFtnY4hVjbCAhb6KR5v7Hqqk2eVE0X6P3UQLs7uqlKql6ZaC1Qtt2aJoGSilYa6GVhup7XM5nNHXN+/YNiXHOoef95/mZsZUcDmEsJNfrleQaxlgmeIQQMUwZfhzRdT3RoSUudYPL5YKahaQJQds2hbRS7GRdV6SUSlUhlg4E2gX4dMc4z5iWGcvGuCUheEs4aKPQs4m9066gknGXZXmTeu9fXRoobeHjjHT7wsiYtGas84jHMuFG5Byx5AlxHOBIrtUVlbED5pzweGxvYiHTeicclhXz7z+Y1lu5+7U9EGMssSlyAqPhrSlQQqiZvG0b7vd7SRi5LxlX9nglqWF1HSzs4GF8QK8szDCy88yVeJ6PEI76JVwle3s+n9gej0Iqlb0fyi6tk5ETFt7FG0dfE7Z7ZkxEThw1kpjCBYoq4jmuqxJlnSRzl4rvstiaCnonS6d9DLtgAUVyNzikKWAMns4IGAaec98irNa7mFVgYpbgvoPp6LFuJxRhFEfePbbbQuxR1/JsC76tsltnt1Al5rViEdkbSTS7FIPu3hLP1WU/7+fLf/XH9/F4fKOSCpZdLjnjNkUqFwvh4XAokKDP9+/v4+vs87wQSnKgsjeKsdCHEwkbFvk38H9RdRxtoiUynT9yZCvOF8IfkBVC+eEbkqQwILPTidLX7Pr4U8L+qor07uV0+RMQQU6n04/wFxOIojU4QUrfAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Local LLM being used in VS Code using the Continue extension\"\n        title=\"\"\n        src=\"/static/90a091790edb4e4bfc9a3317d27a018d/302a4/explain.png\"\n        srcset=\"/static/90a091790edb4e4bfc9a3317d27a018d/01bf6/explain.png 270w,\n/static/90a091790edb4e4bfc9a3317d27a018d/07484/explain.png 540w,\n/static/90a091790edb4e4bfc9a3317d27a018d/302a4/explain.png 1080w,\n/static/90a091790edb4e4bfc9a3317d27a018d/0d292/explain.png 1620w,\n/static/90a091790edb4e4bfc9a3317d27a018d/b3608/explain.png 2160w,\n/static/90a091790edb4e4bfc9a3317d27a018d/38abd/explain.png 2766w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"using-tab-for-auto-completion\" style=\"position:relative;\"><a href=\"#using-tab-for-auto-completion\" aria-label=\"using tab for auto completion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Using tab for auto completion</h2>\n<p>You can use tab to complete code in your code file. Create a new file called <code class=\"language-text\">index.js</code>, enter below comments:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"40358654305242080000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`// a function which calculates fibonacci sequence\r\n// and returns the nth number in the sequence`, `40358654305242080000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-javascript line-numbers\"><code class=\"language-javascript\"><span class=\"token comment\">// a function which calculates fibonacci sequence</span>\r\n<span class=\"token comment\">// and returns the nth number in the sequence</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span></span></pre></div>\n<p>Go to the next line and wait until your see the function name getting generated, if it didn’t type the function name and wait, it should generate the function and show you in highlighted grey text:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/944e3c4cc7a9ee991cfb44aef5fb39dc/8ae78/codecompletion.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 35.55555555555556%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAYAAAAIy204AAAACXBIWXMAABYlAAAWJQFJUiTwAAAA40lEQVR42o1R2W7DIBDkPxpzGLDNYRtI4tZR+/+fNQUalLSylD4Me2p2hyVfnyv8GmHWDZPz2PeA/SPgelnwvnmkMCLFEYJzMMZegsRoEc8p44w1zNiuM257ynbJRBPCouGsAhccnL8GYYxWxxoD5xy0HtH3Ct2J4i3j1FF0Gc9bPBPUmD22JyUppYT3Htba6nPOQCmtOJLVakc9pDxCCLhMWEi11nXTNsC5nyFSKYzjcB8+w+ceYyxstlL2ULk+DANICUpTI25Sil/B7zn2kNhqv2S3P7ykKa/N/nXBQ/l/rvwNPdDFs73BBzQAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Continue generating code from comment\"\n        title=\"\"\n        src=\"/static/944e3c4cc7a9ee991cfb44aef5fb39dc/302a4/codecompletion.png\"\n        srcset=\"/static/944e3c4cc7a9ee991cfb44aef5fb39dc/01bf6/codecompletion.png 270w,\n/static/944e3c4cc7a9ee991cfb44aef5fb39dc/07484/codecompletion.png 540w,\n/static/944e3c4cc7a9ee991cfb44aef5fb39dc/302a4/codecompletion.png 1080w,\n/static/944e3c4cc7a9ee991cfb44aef5fb39dc/8ae78/codecompletion.png 1096w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Press <kbd>Tab</kbd> and the code should be persisted.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/9478b770b792262cc21c73a5266cd384/cd536/compleetedcode.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 34.44444444444444%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAYAAAAIy204AAAACXBIWXMAABYlAAAWJQFJUiTwAAAA+0lEQVR42pVR7W6DMAzkQdZ8QTCkQJNSaAntD/b+73QzaZnGpknbj5OjO/lsXzJqB1TdgPoUQXWD+2PAfL9gHAPi5NH3Dq6SkPJvyKg6IrBpw+hCgA8tbmGEoxrWGhSFgTH/MNRagQrCzU+4+isbezYiiDeBw0FAML43CfGV2+uZzS2OJZ/aP3B2ZzavoHjI2qSUZGxv9WxiTqvfdd5QJ5MYZgzr6a7Gstwwxwti7OHHGUVJcG0Hci3apsb7MrHeY5peemFZP6U/yIjPs6ZME7Q2qeb5ml2e6pPTid+w6cawbsxOyyrSEFJ9ZrCtLsQ+N/WCVOpHplvPGsEH8F7IN0UNhFEAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Getting autocomplete on tab\"\n        title=\"\"\n        src=\"/static/9478b770b792262cc21c73a5266cd384/302a4/compleetedcode.png\"\n        srcset=\"/static/9478b770b792262cc21c73a5266cd384/01bf6/compleetedcode.png 270w,\n/static/9478b770b792262cc21c73a5266cd384/07484/compleetedcode.png 540w,\n/static/9478b770b792262cc21c73a5266cd384/302a4/compleetedcode.png 1080w,\n/static/9478b770b792262cc21c73a5266cd384/cd536/compleetedcode.png 1114w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"refactor-code\" style=\"position:relative;\"><a href=\"#refactor-code\" aria-label=\"refactor code permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Refactor code</h2>\n<p>When you’re writing code, you could ask AI to refactor the code for you. Go ahead and clear the content of the file and replace it with below:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"20751653364029600000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`function calculateTotal(items) {\r\n  let total = 0;\r\n  for (let i = 0; i < items.length; i++) {\r\n    total += items[i];\r\n  }\r\n  return total;\r\n}`, `20751653364029600000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-javascript line-numbers\"><code class=\"language-javascript\"><span class=\"token keyword\">function</span> <span class=\"token function\">calculateTotal</span><span class=\"token punctuation\">(</span><span class=\"token parameter\">items</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\r\n  <span class=\"token keyword\">let</span> total <span class=\"token operator\">=</span> <span class=\"token number\">0</span><span class=\"token punctuation\">;</span>\r\n  <span class=\"token keyword\">for</span> <span class=\"token punctuation\">(</span><span class=\"token keyword\">let</span> i <span class=\"token operator\">=</span> <span class=\"token number\">0</span><span class=\"token punctuation\">;</span> i <span class=\"token operator\">&lt;</span> items<span class=\"token punctuation\">.</span>length<span class=\"token punctuation\">;</span> i<span class=\"token operator\">++</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\r\n    total <span class=\"token operator\">+=</span> items<span class=\"token punctuation\">[</span>i<span class=\"token punctuation\">]</span><span class=\"token punctuation\">;</span>\r\n  <span class=\"token punctuation\">}</span>\r\n  <span class=\"token keyword\">return</span> total<span class=\"token punctuation\">;</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>Now press <kbd>Ctrl</kbd> + <kbd>I</kbd> and type refactor this code in the prompt and press <kbd>Enter</kbd>. Wait for the model to do its thing and you should see the result which you can accept or reject:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/e7877870f4f16f7ba767c9e1abc90f81/082c8/refactor.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 27.40740740740741%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAYAAABFA8wzAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAwklEQVR42o3O206DUBCFYV5ECvsEe1eIRNNCBam2VAgl8f1f5ncwva3pxZeszExWJlIqpSm2tOUq0BaeTvIhOJrcUmeaOjc03vJmEl715q5KJ0QqTRmfHT8vnqXMuRaO69YwB82UJYw2fsgkTiZeCxVfwTJJybdXXNyGQZztk4gfNoh+LdTG8HncM44ty3JgmRumuWO47Oj7SnYVp/OO40dJ+x7u6tpAvfdERgozr8nkyyyYG/vHSXa3vM6d3P3H5opfYo2Z7MBe/BUAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Code refactoring using local LLMs\"\n        title=\"\"\n        src=\"/static/e7877870f4f16f7ba767c9e1abc90f81/302a4/refactor.png\"\n        srcset=\"/static/e7877870f4f16f7ba767c9e1abc90f81/01bf6/refactor.png 270w,\n/static/e7877870f4f16f7ba767c9e1abc90f81/07484/refactor.png 540w,\n/static/e7877870f4f16f7ba767c9e1abc90f81/302a4/refactor.png 1080w,\n/static/e7877870f4f16f7ba767c9e1abc90f81/0d292/refactor.png 1620w,\n/static/e7877870f4f16f7ba767c9e1abc90f81/b3608/refactor.png 2160w,\n/static/e7877870f4f16f7ba767c9e1abc90f81/082c8/refactor.png 2734w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"ask-questions-about-your-codebase\" style=\"position:relative;\"><a href=\"#ask-questions-about-your-codebase\" aria-label=\"ask questions about your codebase permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Ask questions about your codebase</h2>\n<p>You can also ask questions about your codebase by pressing <kbd>Ctrl</kbd> + <kbd>L</kbd> and typing <code class=\"language-text\">@codebase</code> and then your question.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 829px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/6eb6420cf2603c3e0a390bcdd9c65f8b/9d76a/codebase.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 192.962962962963%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAnCAYAAAAPZ2gOAAAACXBIWXMAABYlAAAWJQFJUiTwAAAE1UlEQVR42oWW2VbjSAyG/Q4QCCGbs4fYsePsCWFNoLnkDbjlnsPra/Qpkcfd05y50KkqVZXWX6oKepOd9JOl9Ltt6XS6MhqNdOzIcDjM575ut9vS7Xal1+sZwb+5uTFijzFo3UwlHCTSabckbLXsUKPRkH6/b0JYt5Q/GAwkDENbu2DWCGbebDbtTNCoV2XQ68rF5aUJHMdjScZjqVarcnFxIeVy2ehS930OsReGTVM8n89MWK1WkwANLLhQqVwbE7q85FLJ+E4IKc4RjGI8qOud6+trCWBeXV3ZIk1TmU6nRlk2kTiO8xhBxLS4jqLIeFgJEaoA32Ei+OPjQ76/v+Xr60s+Pz/l7e1NXl5e5Pn5WQ6Hg7y+vtoIwXfabrdqQGaxDSqVipRKJTN9t9vZ5SRJcppMJmZ5kX7i4XpApiDihqtsoA06uv7feZHn/NlsdhToeCKOrRNsMB1yZUUiRD8RXgaetWJyIEJxfn5uREiK82K2i8SdAFCSMbeQbDFiOcBmjdVAy4Fer9dNKXecMMgE4gamukAyjrtcRBk8iLmvi9YXwW8CSQb4QSDusEHWPMME3DPOnL35fC7L5VI2m41hFYNyl3GFQ66Fzfv7+xx3wOjx8VH2+72Rz29vby2z3CUEuUCfYCFzBN7d3cnT05MBdrVa2RwFCGHv4eFBFotFDpnfBBJoXHML2QTgWIEgiDXuoQCh6/XaiDPwfhPo+EIYMcRSjx+xglAKzkjIv3gMNfZNnWuSNOO5QNJfO3UKb6JFEIfNhrS0TXU6mvl2aOu2jr2uFkCLcw1LKtnGmMC7MdK99Ah0RnymmuFsIeNsJd1hLOOpZlXnUbqQZLqWdL41XhTF1hutH3qzZOH1icDZJJN5mkg8WUm8+iXR8iDj9atEi73E618SL/cyWhx0/irZbGFN1mqZKsEqsmtFr4K6WiWJgng10r6nrmaTVAZ9rahBX6KbgcTRUNIklqHyWE/Vk1rtmJgA/719A9Kxtv+2ajpXq0t0Zu3cJZ3zRDDa/ELnpeMIUTEIs46NZV563hR8hO/N4ideMakmEFjgMnGkpbMGtICXcBAGygzcAWr2wSK4JNYAn8RyBg8DLEMY0r2vARngQzh8DTkOvWGwxzkf2csbLNmmVRFDNP0fcY7zVAkCUc7cgI1k4gMzNCtaf+3WRbKnUwVwz8li6G0fRqxaI4XLNhpJqpb3T50Ia4gn3hBn1pQn3YaRNXwrPVrV+/u7xRFXZgBbDzFPNVkcHusagbFegj86vdEkMzrxcJuwBW4qRJVwkItJkkrU78lcwR3rmNB0lfBioKXKWUoWYYwoNgv97UAgwlyzuaWCZ1p+2cnKTNeLcSzLOJI0jo7u4okq8pfTmoN/I9AKzsAY74e9K6qwraNBSZMw1A4z4B1XgDsfo7DOXPZK8U+Pf9nKvDGFJ9RGpbPTSMzhOeXtCxfJFrWIlU4OVEeBE9b4R8BfRz9jOCxfVUwY0skYwnGbMvPngVBQjpQca0JCyRFD+AjkHsYF292DvnJ3KrCSl56jvrh2XtELiFAx0iDsK7La7PSh2ZiVuONALdKfPy3/bdH2UOKKrGOXtJ+dnZ3ZwmNiJXh6U3AHzf73+ZOK32RLSrV6BDVaiKET8SCGWOM/g+LlvxEC/wHidWhQmGvB8wAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"using context to ask question about the codebase\"\n        title=\"\"\n        src=\"/static/6eb6420cf2603c3e0a390bcdd9c65f8b/9d76a/codebase.png\"\n        srcset=\"/static/6eb6420cf2603c3e0a390bcdd9c65f8b/01bf6/codebase.png 270w,\n/static/6eb6420cf2603c3e0a390bcdd9c65f8b/07484/codebase.png 540w,\n/static/6eb6420cf2603c3e0a390bcdd9c65f8b/9d76a/codebase.png 829w\"\n        sizes=\"(max-width: 829px) 100vw, 829px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"use-documentation-as-context-for-your-questions\" style=\"position:relative;\"><a href=\"#use-documentation-as-context-for-your-questions\" aria-label=\"use documentation as context for your questions permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Use documentation as context for your questions</h2>\n<p>You can use documentation when interacting with AI which adds more accuracy to the response. The team have done a fantastic job and have pretty much any language or framework you can think of linked. You can use the <code class=\"language-text\">@docs</code> and then select your preferred documentation, or just simply type the doc name if you know it.</p>\n<p>Let’s open the chat window using <kbd>Ctrl</kbd> + <kbd>L</kbd>, then type <code class=\"language-text\">@react</code> and then <code class=\"language-text\">How do I update the page based on a parameter?</code> then press <kbd>Enter</kbd>.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 784px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/7c25b147c7111cd502e4fd4fede99b5c/4971b/docs.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 135.92592592592595%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAbCAYAAAB836/YAAAACXBIWXMAABYlAAAWJQFJUiTwAAADYUlEQVR42oWVyU7jQBCG/QwsWQjZnDibY8fZE7IAAiQkDtwQF8Qj8P6nmvqKlGXQjObwu7qrq/+urdtBs9mUdrst1WpVWq2W9Ho9Q73RMN3V1dU/cX19Lc1mQ8bjWDG2fQGD0WgkpVJJwrAjSZIqEmko4eXlpZTL5b8Ce0ixi+ORDIdD6YShBLVaTSqVii3iUelEwukYg3q9bnPkb7CffUjmASF3u11TvL+/y9fXl3x8fMjt7a08PDzI3d2d3N/fy8vLi83B4+OjPD095UB3PBxkPp9LQP4gxYPX11f5/PyUt7c3eX5+loMarddrubm5kePxKNvt1oB+v9/LbrczbDYbw3Q6lQB3CRFS3+CGGGRZZphMJj/GPneJ7Ww2+y5Kv9+3kBnHcWxFAhQnTdP/wu2QAa3ihcHLUCuFzvXFNiGaYisV5z4OvDquKILWoHWQFxcX+dzB3HU4BAJi9yrjMv1EgxIyqSANg8HAQkICbIohkybqYIRUlwleLpdLA4mmBcBisbBNq9XK5p58iseYFOFMToh3AGKIfINXzz3AU8bofIwNe4nEHQsIjzBQeFsQOpuclAPwDsmBxepiQ1SdTsfyGcBKASAkPAebfaPnEkBCfllHkk9IccwIWcAIUgw8FEjOz8+tulQRWcTZ2VmudzsLGVe9bfwhQNKT/jj8hvcptkh0XGGk9SHwopAzckLOKIZfK9ZIhReNdSLz60cXYB/wIQ+U3MP1yroxc7+ipKWYS3LHIVEUWdiBP5Z4SG9BgAd4iUccBopechivEICYq5ffFD+tWq3kZGCop1sf6hoESyXiEPOa6qt+TugK8pc3tl8rTsnwQjFUHQmu8SLzWtc16XojGhRKwf8GNCmIztlLlEbIJw9ZyRbkUfMS6c9n0G7JKGxLTzcxj3jdG98y1INAX0k7QLsF4oCXN9a/VkVd3hCGhrpJxrJOE9lnE9kptnrIYZqZbqG220kq09FQ56nZjrltmmd7vug378Mk1aRrnlLypOhGPUlpJc1TNtM2Gicy5YbwCCvmahtp5cungljINKa9Nhry6vTaUADagDB6KrNTdSkI/YZkPj/dMr+qRuj3EQ95ORhTVSpefCBcsgYJje09Chl6I/THgbD5c7EIkfchIAr/L/utKs6tI06/kT/9TBQXoJ8adgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Using documentation when interacting with AI\"\n        title=\"\"\n        src=\"/static/7c25b147c7111cd502e4fd4fede99b5c/4971b/docs.png\"\n        srcset=\"/static/7c25b147c7111cd502e4fd4fede99b5c/01bf6/docs.png 270w,\n/static/7c25b147c7111cd502e4fd4fede99b5c/07484/docs.png 540w,\n/static/7c25b147c7111cd502e4fd4fede99b5c/4971b/docs.png 784w\"\n        sizes=\"(max-width: 784px) 100vw, 784px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"perform-actions-with-slash\" style=\"position:relative;\"><a href=\"#perform-actions-with-slash\" aria-label=\"perform actions with slash permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Perform actions with slash</h2>\n<p>You can kick off an action using the slash in the chat window, this could be edit, comment, share, commit, test (which I had in the config and shows you how to do custom ones) or any predefined custom command.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 703px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/b00b9ec1b0c6178195d8bc356933be1e/242e2/slash.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 77.77777777777777%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAACXBIWXMAABYlAAAWJQFJUiTwAAAB9klEQVR42qVUXW8SURDlN0jLfl8WlkB3Yb93KWzpUiVEoVCMaaqJNqkf0fTF+KA+1EQb+8OPM9diTB9U8OHkzsydOXNmZ3crQgjYto16vQ7DMKBp2l+hqiqEZcEidDodNBoNCa6vxFGCJE2RJgkazSZqtZos+BM4p9VqwXFamE4n2HP30O160HUdFUVRZMK/EP0OrlvXrmNSYa/XI/buf8N1XZimicpwOEQcx8iyDCmPvgW4Nooi+UwrnueBVXIH7sT+JuBa3/elLQnDMEQQBBiPx8jzXMrmra83twkkIUtlQpae0Ka5AXflhCZtfRNIQiZjAlbHz5OV9vt9qXIrQp6fVRVFgbIs5YvKF47jbEfIIzN4U4PBAO12e2OiO4QxbSkgsiEyGtuiT7HZdLbALWEah0gjH2kcYFTs46gsYAsDwtRgWwbqlv4Ld31hUkyQLU8TQvBSDhboFifIJ6eIj57ASR/BLxaIyhU6+zP0yPYPfsIbzil3gXC0REAID0/gDuZ0t0Qnm8C0BP0c5peIF+8xPf+C/PEHVJNnKE4/4vj1NUZnn3D/+RUeXnzF7OU3GX/w4gqrdzdYvb3B8s13HD79jNmra2THl9ANUqgZJlTdxL1dFbuKDo2C1ZpGvkK+hh2yq3RXranYYf82xuc6h/P5NA0DPwD0uNZ9K6j/wQAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Slash actions in using continued\"\n        title=\"\"\n        src=\"/static/b00b9ec1b0c6178195d8bc356933be1e/242e2/slash.png\"\n        srcset=\"/static/b00b9ec1b0c6178195d8bc356933be1e/01bf6/slash.png 270w,\n/static/b00b9ec1b0c6178195d8bc356933be1e/07484/slash.png 540w,\n/static/b00b9ec1b0c6178195d8bc356933be1e/242e2/slash.png 703w\"\n        sizes=\"(max-width: 703px) 100vw, 703px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>I will use the test command, select the code in your file and press <kbd>Ctrl</kbd> + <kbd>I</kbd>, then <code class=\"language-text\">/test</code> and finally <kbd>Enter</kbd>.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/03718092b6ae83d66dbc3f9bb03f008a/5df5d/test.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 55.55555555555556%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAABYlAAAWJQFJUiTwAAAB70lEQVR42o2T2ZKaUBCGeYmMC7sLCWcTBEsWRcEAOhljKsm8/6P86YMzk6kkF7n46L+76IU+B4NxhnWyQRAwuI4Dy5xiMnrA6OEDxq+MRhiPx5hMp5gSk8mEuOs3Jve4EQQ+lBLgYg2mYogogdjswNKS2IOvtwi5QMg+wvdMONTUdWyyhK2x7lbHXReG63pYLudIkhWSqMQqzpD3N+y7R5weL8jrM9LigDQvsN5mCFiEIJQIhaJGEqs0B1cr8JDB8zwY+rFYLDDzqJN172pbGhOefY/ZtkO+A8+f0xQ+HBrCpTyd6/kz0j70YDblDgV934dQEut0DRVJRDF1JssFg1xxSMWhtJXhb02W8U8QQ4wNvtZU0B8mLE4Vum8tup9XtE8lukuMqlEoKoHyqAaKoyQrX3yJ4vDqy7d3hgln8zkOdYn+VqP52uHy/IT2esDxesKJilc1R7YXyKu/yf7whwmXesKdQH0psa9jHM8FDl2G7Y69KyQHvd3xAa3/heHTUoMgoFOt0FwbtN97+uwL6luLllZw/tGiv+7QfslQfY7Q9wku5xT7JkLTxuj6FGV9X4fG8GczLKmgogNJyxybPEa2SxHlOaJCX5WIDiYAk8sBoYIBrfkL7B2Gvox6j/oPMacac8AirTFNC5a+Nv/JL9Q8T4bUI1i1AAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Using commands to perform an action\"\n        title=\"\"\n        src=\"/static/03718092b6ae83d66dbc3f9bb03f008a/302a4/test.png\"\n        srcset=\"/static/03718092b6ae83d66dbc3f9bb03f008a/01bf6/test.png 270w,\n/static/03718092b6ae83d66dbc3f9bb03f008a/07484/test.png 540w,\n/static/03718092b6ae83d66dbc3f9bb03f008a/302a4/test.png 1080w,\n/static/03718092b6ae83d66dbc3f9bb03f008a/5df5d/test.png 1572w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"use-files-as-context\" style=\"position:relative;\"><a href=\"#use-files-as-context\" aria-label=\"use files as context permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Use files as context</h2>\n<p>You can use files in your context by using the <code class=\"language-text\">@files</code> tag. Simply type that in the search box and you will get prompted to select a file, or you can type the file name directly. Then type your question and press <kbd>Enter</kbd>.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 814px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/651042de665bf6ed228b76a388626396/a4262/file.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 158.14814814814815%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAgCAYAAAASYli2AAAACXBIWXMAABYlAAAWJQFJUiTwAAAEfUlEQVR42m2W2XbiRhCG9Qg+XgEJAxJoA4FYBAzYYx/b8ULmzm+QuZpcJXn/cyr1ldTE48lFUdXb37X81cLLti8Sj0vJs1Si4VCKopBhoyeTiYxGI4njWMbjsURRJEmS2FyWZTZ2+zjDHm+QLWQwTGQYhXJ9fS1hOJBut3sECsNQBoOBHUAD4sa9Xs/Gbg+2N4xYjOTy8lIBEpnNSpmVM/ED3+ZaVy25uroyabUarXOXF5fmQKaRbTYbSdNU+v2+eKm6zm1sCjq+XAdd6aq0W+0GDGk30pJWu32Uju9LV0EHg1CCbk98PxCvzWKrJcN+T76sKtlVG9ks11IWc5lOkIUUKmO1i+lC8slUcs3beFaYzsaFJNlEPZ1KFJbixZorPIw1D398/y5//fO3/Pjzh3z79rscDm/y8vIsT08P8vj4YPZiPv9VFnNZLvWydCdep9OxXOXRSNbLlSznC1ktVCPLSnWlBxp7pVqjWFaqq6q2EV1brdYKuBePypDcnsafKmgSxRKrjMJEwn5sMhiohGrrfKgRRfHIdDjU+aheY0+vm4gHdyg5SR6EdemNCkqjQCsddINaB432G/snXYsftMWDBoTMIrwbNTkFFI2MRvGRl0g9V++D6FAGgY/mIQuOa4Sf57lJOaeyUwPhIB3BfjTrU12DIScnJ3J6emrnPTbiHQtoPJuVpUz0wCxNZJpC9pms12tN/lLmVlUtnBaIeeYYY3Pe44dWc3zEZnGinuR6WdF4Q8+WehHe4hljwsQmKodhISOA4TILHORWFzYXMIdXAGAz54BdugwQIF8rxYBJbDYDyIvC7a4gpAPbadKFzbmLiwtzysNtFhggvCAOEA9dSmraBEIjcAmCzRpnoB62R8UYcAsbeDFcKISGVNoVFANhnvF2u5VpkwpLjWqjDV4RrgsZUAA5zGUIm4ca4rTJG3NJmslUwQmdcI8hs0h+7O1rqMMhQgYUWsDFuaalyjPJtINWqiuePQ015XVv+GhFoQifiwKIqybA5rHaeFSSX72o0orPm5TAUZwyYlMU3HZlJ4cOEDA2EwXhVmqTO3LFXucMaXJp81zyyYFrIb9pfOe5SwcHmXOc/SwG6B4HKr3f72W321kl8ZDq4ZFVVMes4TEeuks+igEC4r5or6+v8vb2Jg8PvNCPdsH7+7u+1C82fn5+tj10FhG5dv0JEDBIysTZ2ZmF7Ghwfn5+nPuoOQiJXWo+igfLXfvRauTTFYTPI2HXvVy/LO4bzDkK+FGY8wCh0txK7ngA7u/v5ebmxnL29e5e7lSefns2XqZK6KL4j6eu9Zx4hOUqBMfW+gH6okXY72/s8Gq9lcV6I/uvd/Z1i0eRRpJY/+O9+wdxBDwcDuYRwHP96j2+HGS1wbNbub3ZqcdLLciterxW2cjt7VYrXRo4KYGj9pFzgLhOqPzNiLOxFPqRz6dz/bDn6m39FiL8TbGXSSXQfxbuUf0IZoBUpmZ9/Uz5nbZ+yTrNU+Ufu4G1bjf4JWdOKArgRw8hqmsfx6//G38m82f5F50ImtN4ShJhAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Using files as context\"\n        title=\"\"\n        src=\"/static/651042de665bf6ed228b76a388626396/a4262/file.png\"\n        srcset=\"/static/651042de665bf6ed228b76a388626396/01bf6/file.png 270w,\n/static/651042de665bf6ed228b76a388626396/07484/file.png 540w,\n/static/651042de665bf6ed228b76a388626396/a4262/file.png 814w\"\n        sizes=\"(max-width: 814px) 100vw, 814px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"understand-errors-in-terminal\" style=\"position:relative;\"><a href=\"#understand-errors-in-terminal\" aria-label=\"understand errors in terminal permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Understand errors in terminal</h2>\n<p>When you get any errors or issues in your terminal, select the error text and press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>R</kbd> and you will get an explanation:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/821cb30d4dd42dfbf54bfb70b1814401/2bfae/terminalerror.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 48.888888888888886%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAABuElEQVR42mVS7Y6jMAzkHVY0pYWEkITwWaBbtqraql2pf/r+DzRrB3Hau/sxMnHweMZO5LxHVVVwzoVYOh++pVLI85ygoLWGMSbEJZcjy7K/UBQF5TWiz+MRz+cTl8sFp3mGpcKy6eHaAb5pUbUNtHFQRCJlRpD/I5N0r9A0FtFMJO/3G6/XC+fzGZo62bpDM5zQTp9E3sGUJXWnIlL9Gyvhei60QjRNEx6PB263WyAsTAFXkbJ+Qj0QDiOsK/9YZev8D1u01gZwLg8OJKIjWWZ11+sVrNZaA1838N2Icf7C6XKG9TWRUJGSYY6/wcQcV5VRXdcYhgFt24al5HRpfYu6PwZ1VT/C+SoQLkuhZakF/9oPhLzR1c5qyZQe2vqgzDAZbb6wvHmNNN1jv1+QpmnAShYss0KeIyvk9feNxzweMJLtjp6U2u2QCgGZJAEq2SHnHH1vt1vCEhM+EyJPRUzYd91il7ocCnp3iYDeCiJIAgFDig2UiKHiOOTFJsYm/oCghoLuGBHbZNs8XEkK86rE9PWgZ3NH1YxhEVyw3yWYxhPmw51exJ2sZlB2gum+IbVFVtBIcosfkCgcf+5wqSkAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Getting terminal errors explained\"\n        title=\"\"\n        src=\"/static/821cb30d4dd42dfbf54bfb70b1814401/302a4/terminalerror.png\"\n        srcset=\"/static/821cb30d4dd42dfbf54bfb70b1814401/01bf6/terminalerror.png 270w,\n/static/821cb30d4dd42dfbf54bfb70b1814401/07484/terminalerror.png 540w,\n/static/821cb30d4dd42dfbf54bfb70b1814401/302a4/terminalerror.png 1080w,\n/static/821cb30d4dd42dfbf54bfb70b1814401/0d292/terminalerror.png 1620w,\n/static/821cb30d4dd42dfbf54bfb70b1814401/b3608/terminalerror.png 2160w,\n/static/821cb30d4dd42dfbf54bfb70b1814401/2bfae/terminalerror.png 3804w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"summary\" style=\"position:relative;\"><a href=\"#summary\" aria-label=\"summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Summary</h2>\n<p>This was another exciting step towards enabling everyone around the world to use AI in their day to day tasks without having to pay any fees or be dependant to any cloud provider. I hope you enjoyed and could get the setup up and running, and stay tuned for more AI content.</p>","timeToRead":5,"frontmatter":{"title":"🖥️ Use local AI to supercharge your coding skills","unformattedDate":"2024-06-07T00:00:00.000Z","date":"Jun 07, 2024","path":"/ollama-continue/","author":"Yaser Adel Mehraban","tags":["AI","LLM","GenerativeAI","Ollama","Continue"],"thumbnail":{"childImageSharp":{"gatsbyImageData":{"layout":"constrained","placeholder":{"fallback":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAQDBf/EABYBAQEBAAAAAAAAAAAAAAAAAAECAP/aAAwDAQACEAMQAAABjtyqTouezfgTW4Z//8QAHBAAAwACAwEAAAAAAAAAAAAAAQIDAAQRFCEj/9oACAEBAAEFAmrVW1bUcz5IrD6Sior3ElhimBfV15KP/8QAFREBAQAAAAAAAAAAAAAAAAAAARD/2gAIAQMBAT8BIT//xAAYEQACAwAAAAAAAAAAAAAAAAAAAhARMf/aAAgBAgEBPwFsKn//xAAfEAABBAICAwAAAAAAAAAAAAABAAIREjFBIWFxkaH/2gAIAQEABj8CID3e0blzoxCJJ2i6+9IutPGFWpKnB6UfVFAfK//EABsQAQACAwEBAAAAAAAAAAAAAAEAETFRYSFB/9oACAEBAAE/IfG0YSg8FM9hV1uGuRgRLdaSvI+XqHwQ5I5oO5QX2bxtKE6BbP/aAAwDAQACAAMAAAAQnBiC/8QAGBEAAgMAAAAAAAAAAAAAAAAAAAEQITH/2gAIAQMBAT8QuxmI/8QAFxEAAwEAAAAAAAAAAAAAAAAAAAERQf/aAAgBAgEBPxBJRWGlZ//EAB4QAQACAgIDAQAAAAAAAAAAAAEAESExQVFhcZGh/9oACAEBAAE/EANryrPLxFRCUho7de8XLlNoHBoD8fbnaG4Nlc04hsZVgvTNmE6YU3bWoG/MZVpwNR7ni9i57m4ittT5Wf/Z"},"backgroundColor":"transparent","images":{"fallback":{"src":"/static/6c270bf0842922bfe21f7a9ea04967db/5efc9/localaivscode.jpg","srcSet":"/static/6c270bf0842922bfe21f7a9ea04967db/e4d02/localaivscode.jpg 750w,\n/static/6c270bf0842922bfe21f7a9ea04967db/5efc9/localaivscode.jpg 1024w","sizes":"(min-width: 1024px) 1024px, 100vw"},"sources":[{"srcSet":"/static/6c270bf0842922bfe21f7a9ea04967db/cd166/localaivscode.webp 750w,\n/static/6c270bf0842922bfe21f7a9ea04967db/402a0/localaivscode.webp 1024w","type":"image/webp","sizes":"(min-width: 1024px) 1024px, 100vw"}]},"width":1024,"height":1024}}}}}},{"node":{"id":"e5eabf9f-bc7e-5e6f-9888-abd1e8ac7b4c","html":"<p>If you have worked with <a href=\"https://openai.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">OpenAI</a> or any other <a href=\"https://en.wikipedia.org/wiki/Generative_artificial_intelligence\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Generative AI</a> model aka <em>LLMs</em>, you would know that writing a good <strong>prompt</strong> is a very key part of how we interact with those models. However, it’s often ignored which most probably means people are not getting the most out of these super capable models.</p>\n<!--more-->\n<h2 id=\"the-why\" style=\"position:relative;\"><a href=\"#the-why\" aria-label=\"the why permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>The why</h2>\n<p>The most important part of interacting with LLMs is writing a good prompt, and that’s why it is important to make sure not only you know how to write a good prompt, but also are aware of what tools are available which might help you do just that. I wrote this post to introduce <a href=\"https://github.com/danielmiessler/fabric\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">fabric</a> to you all since it has changed the way I personally use my local models and I can’t believe how did I not know about it before.</p>\n<h2 id=\"introducing-fabric\" style=\"position:relative;\"><a href=\"#introducing-fabric\" aria-label=\"introducing fabric permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Introducing fabric</h2>\n<p><strong>fabric</strong> is an open source tool which augments humans using AI. I know it sounds a little fancy, but believe me when you get to know its features and usefulness, you would totally be onboard with the definition.</p>\n<p>In short, fabric is a tool which not only has many patterns (a comprehensive prompt for a specific purpose) already baked in, but also allows you to use them with LLMs like OpenAI or even local LLMs (<a href=\"/blog/2024/05/28/local-llms/\">read my last post on how to install Ollama</a>) if you have them handy. Furthermore, you can add your own patterns if you like to the mix too and contribute back to the community if your pattern deemed useful to others.</p>\n<p>Enough talking, let’s get it installed and show you some cool features.</p>\n<h2 id=\"prerequisites\" style=\"position:relative;\"><a href=\"#prerequisites\" aria-label=\"prerequisites permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Prerequisites</h2>\n<p>You would need a few things installed to be able to seamlessly install fabric. I am using WSL to install it, but you can install it in a <em>linux</em> distro of your choice.</p>\n<ul>\n<li><strong>pipx</strong>: fabric uses pipx to install itself, so get it installed by running:\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"52350335434698960000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`sudo apt install pipx`, `52350335434698960000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">sudo</span> <span class=\"token function\">apt</span> <span class=\"token function\">install</span> pipx</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n</li>\n<li><strong>python3-dev</strong>: Since it is using Python extensions, you would need to install the header files:\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"84848266583696880000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`sudo apt-get install python3-dev`, `84848266583696880000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">sudo</span> <span class=\"token function\">apt-get</span> <span class=\"token function\">install</span> python3-dev</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n</li>\n<li><strong>ffmpeg</strong>: Fabric depends on this library and <strong>libavcodec-extra</strong> when handling multimedia:\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"42464079872131236000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`sudo apt-get install ffmpeg libavcodec-extra`, `42464079872131236000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">sudo</span> <span class=\"token function\">apt-get</span> <span class=\"token function\">install</span> ffmpeg libavcodec-extra</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n</li>\n</ul>\n<h2 id=\"installing-fabric\" style=\"position:relative;\"><a href=\"#installing-fabric\" aria-label=\"installing fabric permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Installing fabric</h2>\n<p>You wouldn’t believe how simple the installation process is. First navigate to a folder where you intend to clone the repository, clone the repo and then navigate into the fabric folder:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"40146348777761820000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`cd /where/you/keep/code\r\n# if the path is a mounted drive you might have to run this with sudo\r\ngit clone https://github.com/danielmiessler/fabric.git\r\ncd fabric`, `40146348777761820000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token builtin class-name\">cd</span> /where/you/keep/code\r\n<span class=\"token comment\"># if the path is a mounted drive you might have to run this with sudo</span>\r\n<span class=\"token function\">git</span> clone https://github.com/danielmiessler/fabric.git\r\n<span class=\"token builtin class-name\">cd</span> fabric</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span></span></pre></div>\n<p>Now use <em>pipx</em> to install fabric:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"69694634903882195000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`pipx install .`, `69694634903882195000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">pipx <span class=\"token function\">install</span> <span class=\"token builtin class-name\">.</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>Once installed, call the setup function where you have provide four API keys for OpenAI, Claude APIs, Google and YouTube APIs which you can get them from their respective consoles.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"11620495145812427000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`fabric --setup`, `11620495145812427000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">fabric <span class=\"token parameter variable\">--setup</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>When you are finished, you need to exit bash and go back in to have access to fabric:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"14187771618667067000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`exit`, `14187771618667067000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token builtin class-name\">exit</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>And in your terminal:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"34683470481779980000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`bash`, `34683470481779980000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"powershell\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-powershell line-numbers\"><code class=\"language-powershell\">bash</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>Now you can run fabric and see the list of available patterns:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"53761064504367350000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`fabric --list`, `53761064504367350000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">fabric <span class=\"token parameter variable\">--list</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>Which should show you the list of available patterns.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/35df9457c4ff4bceaf77c02c94cf0afe/6edca/fabric-list.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 75.18518518518519%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAACXBIWXMAABYlAAAWJQFJUiTwAAABgUlEQVR42p1T2W7CMBDMF/QAUaClIRDClZA4zuE4IQEK5aWq1P//manXhapIVG3yMFpblkezM7tGtXvF2/sHdvsjsryEUPB5gjAR8HwOxlOEsQCLvmoYCcj1Rr2FsGcuxnMfo+kKj9YUo9kKRpiu4SwZJgqOG6LzNEa7N0S7b6Glaut0PqPVs66+6bOCkeQbMEUaJAVkdUDPnOCua35/+In77mW9BiOIcxD8SCKWG5j2Un0wf/3wFwymlLETKc9K9E0HN51Bc0JZ7ZEWO1Cllv1YwlZGN1WpPYyyClyUuk49jmd70ZzQC4X2b8Uz0NllAtbUU8ldJv1vwlhWCMUaND6kMi22WAaJHp/bBl4aWak8zLfax6x8gVT3SBEPRnMMxnOttBYhqSJ1lDZV8pFUEhZ+jIeBXd9Dl6V6dHwu9cbQLFqOB3Oy1CtVJyCD2hOqXVJKZEPHRX/onDbCrJ22Qa3RDHIVTLE9It8cNM7B1CYMklx7R2Oj91p5SRZQKE1m8RMKKaJKvrPzSQAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Getting the list of available patterns from fabric\"\n        title=\"\"\n        src=\"/static/35df9457c4ff4bceaf77c02c94cf0afe/302a4/fabric-list.png\"\n        srcset=\"/static/35df9457c4ff4bceaf77c02c94cf0afe/01bf6/fabric-list.png 270w,\n/static/35df9457c4ff4bceaf77c02c94cf0afe/07484/fabric-list.png 540w,\n/static/35df9457c4ff4bceaf77c02c94cf0afe/302a4/fabric-list.png 1080w,\n/static/35df9457c4ff4bceaf77c02c94cf0afe/6edca/fabric-list.png 1351w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"features\" style=\"position:relative;\"><a href=\"#features\" aria-label=\"features permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Features</h2>\n<p>Now let’s explore some cool features that will change they way you use LLMs forever. But first, we need to set our default model to make sure we are not charged by OpenAI or other available online models:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"11658558840659427000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`ollama list\r\n# replace the name of the model with whatever you have available\r\nfabric --setDefaultModel llama3:latest`, `11658558840659427000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">ollama list\r\n<span class=\"token comment\"># replace the name of the model with whatever you have available</span>\r\nfabric <span class=\"token parameter variable\">--setDefaultModel</span> llama3:latest</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<p>Now we’re ready to go. First off, let’s use one of the features which I use almost every day. I have subscribed to many YouTube channels be it tech or not, and many of those post long videos on a daily basis. You can summarise the whole video using one command:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"27326009494619476000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`yt --transcript https://youtube.com/watch?v=uXs-zPc63kM | fabric --stream --pattern extract_wisdom`, `27326009494619476000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">yt <span class=\"token parameter variable\">--transcript</span> https://youtube.com/watch?v<span class=\"token operator\">=</span>uXs-zPc63kM <span class=\"token operator\">|</span> fabric <span class=\"token parameter variable\">--stream</span> <span class=\"token parameter variable\">--pattern</span> extract_wisdom</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>We’re using the <code class=\"language-text\">extract_wisdom</code> pattern here, but you can use any other pattern you want. The API key you provided for YouTube is used here to get the transcript and pass it to the LLM using the pattern you have chosen. Super cool and fast response makes this a really great setup.</p>\n<p>Let’s try something different:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"96074577321918320000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`echo &quot;An idea that coding is like speaking with rules.&quot; | fabric -sp write_essay`, `96074577321918320000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token builtin class-name\">echo</span> <span class=\"token string\">\"An idea that coding is like speaking with rules.\"</span> <span class=\"token operator\">|</span> fabric <span class=\"token parameter variable\">-sp</span> write_essay</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>Here we’re passing an idea and ask fabric to call our model and ask for an essay. The result will truly amaze you.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/4e68d6bbc83aa0b72e598ada2b89ab6a/f1f01/fabric-essay.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 44.44444444444444%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAABYlAAAWJQFJUiTwAAABm0lEQVR42jWS3XKbMBCFeZLWiTEgQBLi3wa7buOpO81FOrnITN7/QU7PEfHFeiVZnP32rJLb/RXr9Yb1xwum5QLb9LBhhO8mtOMJoZ+RGoddZrE3HlndorA9DlWHwg+owgzjR+Rc73KH5Ik/aRl4sUPOy4eKof1XfqbIY59TyPDDut1E6va4RXdCxbznvaRqRigK28G4Hq6bUYeJZxMLdNwfUao6CUUnSglnjEJkbohitl94NiDJKZRFshA/1Do1DakaUoWY068QZclClkSGWYISc8MKP55Rch0JC5JJLAb3ypZtRb/439biEIUUzXSOAs10QTNfMKwvMfx4QSIKRf4wmz7sCx/b15kKSixXUVph+80vP65wFFWrw/oL3eknTCChPBKNqB5riRl6o6x9DJFRRIKBVO3pGgnn+x+0H+9o7n8RjlckEtJAvqUlnguH72mF3aHGU263dVbz3EOvQS9AQ5B/hs+lalj89hvZ5weWt3/08oxEFAe2JmG1uNFthLJAQ9Mg/LAgpTUKiWrKuYbSLSjZriN13Z/xH0lDGTrscRk5AAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"writing an essay based on a prompt via fabric\"\n        title=\"\"\n        src=\"/static/4e68d6bbc83aa0b72e598ada2b89ab6a/302a4/fabric-essay.png\"\n        srcset=\"/static/4e68d6bbc83aa0b72e598ada2b89ab6a/01bf6/fabric-essay.png 270w,\n/static/4e68d6bbc83aa0b72e598ada2b89ab6a/07484/fabric-essay.png 540w,\n/static/4e68d6bbc83aa0b72e598ada2b89ab6a/302a4/fabric-essay.png 1080w,\n/static/4e68d6bbc83aa0b72e598ada2b89ab6a/0d292/fabric-essay.png 1620w,\n/static/4e68d6bbc83aa0b72e598ada2b89ab6a/b3608/fabric-essay.png 2160w,\n/static/4e68d6bbc83aa0b72e598ada2b89ab6a/f1f01/fabric-essay.png 2212w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"taking-it-to-next-level\" style=\"position:relative;\"><a href=\"#taking-it-to-next-level\" aria-label=\"taking it to next level permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Taking it to next level</h2>\n<p>There are two library in macOS called <code class=\"language-text\">pbcopy</code> and <code class=\"language-text\">pbpaste</code> which allow you to copy text from and paste text into your terminal, but at large. Fortunately we can leverage a library which allows us to do exactly that in WSL or any other linux distro called <code class=\"language-text\">xclip</code>. Let’s get it installed and running:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"67851091814654984000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`sudo apt install xclip\r\n\r\nnano ~/.bashrc`, `67851091814654984000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">sudo</span> <span class=\"token function\">apt</span> <span class=\"token function\">install</span> xclip\r\n\r\n<span class=\"token function\">nano</span> ~/.bashrc</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<p>Now paste these two lines at the end of the file:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"37387826260222214000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`alias pbcopy='xclip -selection clipboard'\r\nalias pbpaste='xclip -selection clipboard -o'`, `37387826260222214000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token builtin class-name\">alias</span> <span class=\"token assign-left variable\">pbcopy</span><span class=\"token operator\">=</span><span class=\"token string\">'xclip -selection clipboard'</span>\r\n<span class=\"token builtin class-name\">alias</span> <span class=\"token assign-left variable\">pbpaste</span><span class=\"token operator\">=</span><span class=\"token string\">'xclip -selection clipboard -o'</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span></span></pre></div>\n<p>Exit nano with <kbd>Ctrl</kbd> + <kbd>X</kbd>, then enter Y and press <kbd>Enter</kbd>. Last we need to refresh our terminal:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"661618160155108600\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`source ~/.bashrc`, `661618160155108600`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token builtin class-name\">source</span> ~/.bashrc</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>We’re good to go. Navigate to any site which has a long article, I use <a href=\"https://www.abc.net.au/news/2024-05-30/rba-should-hike-interest-rates-in-june-but-will-it/103909992\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">this one talking about interest rates in Australia and what might happen in June</a>. Copy all the text in that page and then type this in your terminal:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"98334808914564350000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`pbpaste | fabric -sp extract_insights`, `98334808914564350000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">pbpaste <span class=\"token operator\">|</span> fabric <span class=\"token parameter variable\">-sp</span> extract_insights</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/cb088eba0d396238922477c8812e1fe5/e1190/pbpaste.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 26.666666666666668%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAYAAABFA8wzAAAACXBIWXMAABYlAAAWJQFJUiTwAAAA/UlEQVR42j2P2U7DMBBF8xEIBI3akjhestjOYmdpAlRC/P8fXWYM6sPRjCfj45tsXHa4cUk0PuAiDArZolSE7iCI/F0hLwxOV4W3q0z9WTSJV5q9nCs85wJPpxKZ7iZ0w0osqGpPEgdBtdCWcKianuZ9+iapl+1AswHaBhgfUfsZLd2V3Yi8bJAN84E+7o9Lf1ILYfy/zEPTsiKRbEcYF6EoBEu7cYN2IVVD4ou0yOy4wk0b2n4G9+kcbvAE94aScGr+E0GPGhLUtMuwhGWMiweUjciW7Qv75zfCcqCmZUVpGlpkAafis3ykCylRvN1x3H8Q1g9MxDDvqdppxS9sE5k7BtHZ4AAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"using pbpaste to get an entire article in the terminal and pass it to fabric\"\n        title=\"\"\n        src=\"/static/cb088eba0d396238922477c8812e1fe5/302a4/pbpaste.png\"\n        srcset=\"/static/cb088eba0d396238922477c8812e1fe5/01bf6/pbpaste.png 270w,\n/static/cb088eba0d396238922477c8812e1fe5/07484/pbpaste.png 540w,\n/static/cb088eba0d396238922477c8812e1fe5/302a4/pbpaste.png 1080w,\n/static/cb088eba0d396238922477c8812e1fe5/0d292/pbpaste.png 1620w,\n/static/cb088eba0d396238922477c8812e1fe5/b3608/pbpaste.png 2160w,\n/static/cb088eba0d396238922477c8812e1fe5/e1190/pbpaste.png 2203w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"what-next\" style=\"position:relative;\"><a href=\"#what-next\" aria-label=\"what next permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What next</h2>\n<p>There are many cool features you might be interested in, but I just highlight two more which I think are the most practical. Setting a <em>context</em>, and adding <em>custom patters</em>. Setting a context is done by adding a markdown file called <code class=\"language-text\">context.md</code> in the <code class=\"language-text\">./config/fabric/</code> directory to add context to your pattern. This could be anything you like, for example you might add your goals or the essence of your existence and why you do what you do day to day.</p>\n<p>From the custom patterns perspective you can always add your custom patterns which you do not want to upload to fabric in the <code class=\"language-text\">~/.config/custom-fabric-patterns</code> directory. However, whenever you want to use them with fabric you need to move them into the <code class=\"language-text\">~/.config/fabric/patterns</code> directory. Just beware that any time you update fabric, the folder get updated and every custom pattern will be deleted, so you need to copy them from the custom folder before using them.</p>\n<h2 id=\"summary\" style=\"position:relative;\"><a href=\"#summary\" aria-label=\"summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Summary</h2>\n<p>Hope you now have a good cause to go setup fabric and spend a little bit more time with your local LLMs and get better at writing prompts and extracting information or getting what you need faster and more effectively. Stay tuned for more AI content 👋🏽.</p>","timeToRead":4,"frontmatter":{"title":"🔮 fabric, augmenting humans using AI","unformattedDate":"2024-06-01T00:00:00.000Z","date":"Jun 01, 2024","path":"/fabric/","author":"Yaser Adel Mehraban","tags":["AI","LLM","GenerativeAI","fabric","promptengineering"],"thumbnail":{"childImageSharp":{"gatsbyImageData":{"layout":"constrained","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAA7BAAAOwQG4kWvtAAACwUlEQVR42m2Sa0ySURiA0axV648/bG1t/ehnv9qqtaYTJ6n7DAOcJGlETqfTFQUrChd9xtSlhpKQaJOZE7zNlBpe8AZq6cDLHHnLVPCaGCqJQ0K+700warbO9m7nvDvv856z9yEQ/lmAgj+6F559SUJf4LR8JWirbSt/vsG6bq5YW+7OMSd77wH4/a7w06IQQKfXHzoA0WohYGgIDnvPGvtJs9wiGyowz+gLTUsj4u94I28G+rPXoCd3Fe8Qz3LACqfnG2xnoR+O+TgoivoT9shHUALqD4T9jq+SeoOMktUek9wFE2Wb2ECBBa/jftlVC2cwo9KKLaq23ZOVVmxEsrDTm2PeVmXOGbVlmylSqenUnxca1bZAg3KNOFq3IZisdsxOVe2CvnzD1Ve2jhmq7Nhw7Q7oKmwwoPgBzaJFyEvTuQWsLqjJXcLbqt1QmDuP0yhNNgSp5BJS7jRnqkosc+3yHWiUOaHm9QZUSBYw1bttaFLaQSGzgFQ4Afx7emBnDAOPbQTu/UnIEVlxWf1PnC0YxcKjFM4IRAVIdKWGEEluWrmZoIW09MHdhBSdg8X+5HqQNQ7PXkzDQ74BOE8NICw2QnbRIHCeG4D38ivwpd/gcckyMDgfISyyyhlH1wCNoZZ4v0uKKueGkEpLSddqp5L5Y/Ck2IQ/yvuMC8TjoNDYQd7phNvcVqAyazFqstpNSWvH6Hd1GDmpFQsj17iQ2A6IYbT2oSzWUd9svIokJraci6Y2KmNZ75d4ommsuBMgS2mDYPIbPJiixG/xx4HJG4MbnGGISdICQm/Do+M8sBY9k1l/Zn/KXt08QE/4vCIGhIa/FdLSe+E8qcgdSqsDamqXg0gulV8KyedeIUpFxKtyRdT1agklvik+NfXDcZ+PB4T2OOSTMyNDe+Li5YLuCyFiB8Jo0EcghcH/LfLl4G/+F9J4nFtMefroAAAAAElFTkSuQmCC"},"backgroundColor":"transparent","images":{"fallback":{"src":"/static/64bf948aba70b827b708605fff9f762b/1cdee/fabric-logo.png","srcSet":"/static/64bf948aba70b827b708605fff9f762b/7440e/fabric-logo.png 750w,\n/static/64bf948aba70b827b708605fff9f762b/1cdee/fabric-logo.png 753w","sizes":"(min-width: 753px) 753px, 100vw"},"sources":[{"srcSet":"/static/64bf948aba70b827b708605fff9f762b/6abb8/fabric-logo.webp 750w,\n/static/64bf948aba70b827b708605fff9f762b/e748a/fabric-logo.webp 753w","type":"image/webp","sizes":"(min-width: 753px) 753px, 100vw"}]},"width":753,"height":392}}}}}},{"node":{"id":"4f4f7548-6059-5cdd-9666-b25628bb1cd8","html":"<p>Many learners ask me how they can get access to <a href=\"https://azure.microsoft.com/en-au/products/ai-services/openai-service\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Azure OpenAI</a> and <a href=\"https://en.wikipedia.org/wiki/Generative_artificial_intelligence\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Generative AI</a> since they don’t have access to an enabled subscription. I knew there are open source tools which allow people to work with these models, but I never had a use case to go and try this out.</p>\n<!--more-->\n<h2 id=\"-the-need\" style=\"position:relative;\"><a href=\"#-the-need\" aria-label=\" the need permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>🩺 The need</h2>\n<p>I have a kid in high school and she wanted to give <a href=\"https://chat.openai.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">ChatGPT</a> a try for a task she was working on, I was afraid she would use it to get the answer right away instead of figuring out how to solve the problem. This forced me to look into how I can have a better control over how she could use LLMs without “cheating”.</p>\n<p>That’s when I stumbled upon <a href=\"https://ollama.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Ollama</a>, a great cross-platform, open source project which happens to be the easiest way you can get an engine running with many available models. Although their Windows version is experimental and in development, you can install it on <a href=\"https://learn.microsoft.com/en-us/windows/wsl/about\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Windows Subsystem for Linux aka WSL</a>.</p>\n<h2 id=\"️-prerequisites\" style=\"position:relative;\"><a href=\"#%EF%B8%8F-prerequisites\" aria-label=\"️ prerequisites permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>🖥️ Prerequisites</h2>\n<p>Before we start our process, you need to know that you will need a system which has a decent GPU since running AI locally demands that. This could even be your laptop which has a graphic card, or even better your gaming PC with that crazy spec you spent that much money on.</p>\n<p>You most likely need docker installed as well since I will use it to run the web UI, but this is not mandatory.</p>\n<h2 id=\"️-installation\" style=\"position:relative;\"><a href=\"#%EF%B8%8F-installation\" aria-label=\"️ installation permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>⚙️ Installation</h2>\n<p>Of course you need WSL enabled and a distro installed, but don’t worry as soon as you enable <strong>Virtual Machine Platform</strong> and <strong>Windows Subsystem for Linux</strong> in your windows features, all it takes is a few commands:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"15196369316265267000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`wsl -- install -d ubuntu\r\nwsl --update\r\nwsl --set-default-version 2`, `15196369316265267000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">wsl -- <span class=\"token function\">install</span> <span class=\"token parameter variable\">-d</span> ubuntu\r\nwsl <span class=\"token parameter variable\">--update</span>\r\nwsl --set-default-version <span class=\"token number\">2</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<p>Before we install any packages, it’s always a good idea to update the current ones, this becomes more important if you have had WSL enabled for a while.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"85946761095945650000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`sudo apt update && sudo apt upgrade`, `85946761095945650000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">sudo</span> <span class=\"token function\">apt</span> update <span class=\"token operator\">&amp;&amp;</span> <span class=\"token function\">sudo</span> <span class=\"token function\">apt</span> upgrade</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>Now it’s time to install Ollama:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"57172958959863160000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`curl -fsSL https://ollama.com/install.sh | sh`, `57172958959863160000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">curl</span> <span class=\"token parameter variable\">-fsSL</span> https://ollama.com/install.sh <span class=\"token operator\">|</span> <span class=\"token function\">sh</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>This will take a while to finish, so get a coffee and be patient. Once it is installed it will start the Ollama engine and shows you it’s running. To test it you can open a browser and navigate to <code class=\"language-text\">http://localhost:11434</code> which should show you it’s running:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 487px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/a1ef1bb866740823f28c1122cc093f34/7b439/ollama-running.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 34.44444444444444%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAYAAAAIy204AAAACXBIWXMAABYlAAAWJQFJUiTwAAABa0lEQVR42o2OWU/bUBCF/UwdZ6NCJSAUoqQxDkGNs1wHsUbgBMeBbDSYkAXMvrV9qvjzH9dUrcRD1T58OnPmjDRHsepHCLtFZa/5i30Xc7eB2G9Rqh1gbtcxdxoUtmwK27b0NkWZF+WutHtAuea8Q+ldPtI8u6LuXeBIbZz6TL/9pNYf0Z7c0B5fYXc8umc+naGPOxixd/SVes9jy2ljyRJVWeI3yvHtDw7P72mOb2hN73And0y+v2B7Pv3LJ/r+A+7JlOH1MwN5153IB70hrjel1h6w4XTYbHb/oOiFMnqhQqBG0Xoj8Dmpn9eKZNZMsl9K6JIVeRMQZIYpyJUsVsvVdyipZJJsJo2uZ1mY/8RiIsHcx1mSS0tk0mlSqWUWFxJoqko4FHpDC6l/Rcnn81REBbvhkMutYBgGy/KJEAJRXUdYAsuyiEajxOPxf6JomkZIfv0wM0Mwh8MakUgEVe5U2SrIAh+Lxf6LV8no4FvZ7msgAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Ollama running in WSL\"\n        title=\"\"\n        src=\"/static/a1ef1bb866740823f28c1122cc093f34/7b439/ollama-running.png\"\n        srcset=\"/static/a1ef1bb866740823f28c1122cc093f34/01bf6/ollama-running.png 270w,\n/static/a1ef1bb866740823f28c1122cc093f34/7b439/ollama-running.png 487w\"\n        sizes=\"(max-width: 487px) 100vw, 487px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Now you can pull down a model and interact with it:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"38857199863488920000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`ollama run llama3`, `38857199863488920000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">ollama run llama3</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>Once it’s done, it will wait for you to enter your prompt:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/898b49ba227947039dc7028e714f2526/b4904/ollama-waiting.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 5.185185185185186%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAABCAYAAADeko4lAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAU0lEQVR42h3DMQqAIBiA0S7RUg0WIhGmqZQODeX+n6Kh+5/gC3rwGhGh3pVSCjlnQoiklPDeY63FOUc8ds554+0vnsUha0vsBsZpQmv9N8aglOIDD9wfYloWc+AAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Ollama waiting for a prompt\"\n        title=\"\"\n        src=\"/static/898b49ba227947039dc7028e714f2526/302a4/ollama-waiting.png\"\n        srcset=\"/static/898b49ba227947039dc7028e714f2526/01bf6/ollama-waiting.png 270w,\n/static/898b49ba227947039dc7028e714f2526/07484/ollama-waiting.png 540w,\n/static/898b49ba227947039dc7028e714f2526/302a4/ollama-waiting.png 1080w,\n/static/898b49ba227947039dc7028e714f2526/0d292/ollama-waiting.png 1620w,\n/static/898b49ba227947039dc7028e714f2526/b4904/ollama-waiting.png 1768w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>And upon <kbd>Enter<kbd> it shows you the response:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/508037ed321b1d8cdc8a23680350a727/54421/pentagons-area.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 32.96296296296297%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAYAAAAIy204AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAz0lEQVR42nWRSxKEIAxEuYXAKF9F3Ize/3IZOiCl1rjoSgzy0iFi3790HEdXSomC87QURe/I2SLnKARP1lpSSpGU8lUixkjLstA8z4Qcl40xZMplADhvwnc9r3Xk0FlHFOu6Us6ZEMdxfHXwr47aUwzcto1yERwCOk0Td+PO3rMb1K8ufanjv2EY7iNjXEBDCDw6IgT42VWquyOtNQs5gFeowBLWVICxgAokNgEKF6f62zaXz3fFBAAzMM51MXUUx7C62dDBWn+6s6c+7QwOf/ssvVdPUOA3AAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Ollama answering to prompts using Llama3 model\"\n        title=\"\"\n        src=\"/static/508037ed321b1d8cdc8a23680350a727/302a4/pentagons-area.png\"\n        srcset=\"/static/508037ed321b1d8cdc8a23680350a727/01bf6/pentagons-area.png 270w,\n/static/508037ed321b1d8cdc8a23680350a727/07484/pentagons-area.png 540w,\n/static/508037ed321b1d8cdc8a23680350a727/302a4/pentagons-area.png 1080w,\n/static/508037ed321b1d8cdc8a23680350a727/0d292/pentagons-area.png 1620w,\n/static/508037ed321b1d8cdc8a23680350a727/b3608/pentagons-area.png 2160w,\n/static/508037ed321b1d8cdc8a23680350a727/54421/pentagons-area.png 3009w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"running-as-service\" style=\"position:relative;\"><a href=\"#running-as-service\" aria-label=\"running as service permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Running as service</h2>\n<p>Another issue I was facing now was that I didn’t want to keep my terminal running, so a better way would be to run Ollama as a service. Since WSL does not use the <code class=\"language-text\">systemd</code>, you can’t run services by default. So we have to first enable it:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"27059587294950950000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`nano /etc/wsl.conf`, `27059587294950950000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">nano</span> /etc/wsl.conf</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>Then enter these lines anywhere in the file:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"29521744590599664000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`[boot]\r\nsystemd=true`, `29521744590599664000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token punctuation\">[</span>boot<span class=\"token punctuation\">]</span>\r\n<span class=\"token assign-left variable\">systemd</span><span class=\"token operator\">=</span>true</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span></span></pre></div>\n<p>And finally exit the nano with <kbd>Ctrl</kbd> + <kbd>X</kbd>, select Y to save your changes. Now we have to restart our WSL. Exit our of WSL by typing exit, and then run:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"2875793424427431000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`wsl --shutdown\r\nwsl -l\r\nwsl run Ubuntu-22.04`, `2875793424427431000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">wsl <span class=\"token parameter variable\">--shutdown</span>\r\nwsl <span class=\"token parameter variable\">-l</span>\r\nwsl run Ubuntu-22.04</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<div class=\"custom-block info\"><div class=\"custom-block-body\"> <strong>Note:</strong> Replace the name of the distro with whatever you have which is shown from the list command.</div></div>\n<p>And finally start the service:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"17098467379844618000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`sudo systemctl enable ollama\r\nsudo systemctl start ollama`, `17098467379844618000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">sudo</span> systemctl <span class=\"token builtin class-name\">enable</span> ollama\r\n<span class=\"token function\">sudo</span> systemctl start ollama</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span></span></pre></div>\n<h2 id=\"-user-interface\" style=\"position:relative;\"><a href=\"#-user-interface\" aria-label=\" user interface permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>📱 User interface</h2>\n<p>This is great, but my kiddo can’t use my terminal to interact with these models. So I went on a hunt to find a user interface which can use Ollama, and not long after I found <a href=\"https://openwebui.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Open WebUI</a> which allows you to leverage Ollama and interact with it via a user friendly UI. Plus it has the benefit of persisting your conversation history.</p>\n<p>You can install it directly on the WSL, but I’d much prefer to use the docker version of it, but first you need to enable the WSL integration on the Docker Desktop app:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/a2008c9803a34cfc3f3665c7f0630bc6/99375/wsl-docker.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 68.88888888888889%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAABYlAAAWJQFJUiTwAAABj0lEQVR42pWT6W7jMBCD/Q7bnLYlH5Is+U7SAn3/F+NyxmmALbZo8uODZDgmSM4kW94/0cYBf44FdmfzD2+nUs99bp8m8/2EblzRdIMKC5VPqEkbR5zKGrtXBE13o+CiRAqHYSa8TytcGl9yp4JVN6OJE2o6bOKCOowwbSARR7p7WdC6COsSY/bImx6lo3BIrKB/ub/NYbphWD/Upe9n+DThZBod0oEOD4VQPS94rrzGNXRahZ6R5b45zesAeS88K5qdbQvrt8iWlH7G0UYcTGBk+1ih/beV2v/n3OcGWdkETvjCuAvXhCs0XXXCQk3HJ9PeaZTjF+W3O5F6MhO4KhR07K4lsoM5I2pc6/SDhyiftwqcvnvc78hvs9JN6Jd3pPmG8fLBHVw1vnRZCemCsk0oVKTB7v7v+YnsUFgOZVR3EtlzqR3jyykLLnUImmK40oXTrn7+p3C6+oF+vKrDyB5F/NxOyIl0s8s55WLr6ZcpO+7gTJfT/Rwfz1Ugeo4omg5F7RXptyC5Pm9dfwn+BWwVgBd9ZWaVAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Enabling WSL integration in Docker Desktop\"\n        title=\"\"\n        src=\"/static/a2008c9803a34cfc3f3665c7f0630bc6/302a4/wsl-docker.png\"\n        srcset=\"/static/a2008c9803a34cfc3f3665c7f0630bc6/01bf6/wsl-docker.png 270w,\n/static/a2008c9803a34cfc3f3665c7f0630bc6/07484/wsl-docker.png 540w,\n/static/a2008c9803a34cfc3f3665c7f0630bc6/302a4/wsl-docker.png 1080w,\n/static/a2008c9803a34cfc3f3665c7f0630bc6/99375/wsl-docker.png 1525w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Once you have that done, simply run the docker command:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"24490440737839040000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`docker run -d -p 3005:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main`, `24490440737839040000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">docker</span> run <span class=\"token parameter variable\">-d</span> <span class=\"token parameter variable\">-p</span> <span class=\"token number\">3005</span>:8080 --add-host<span class=\"token operator\">=</span>host.docker.internal:host-gateway <span class=\"token parameter variable\">-v</span> open-webui:/app/backend/data <span class=\"token parameter variable\">--name</span> open-webui <span class=\"token parameter variable\">--restart</span> always ghcr.io/open-webui/open-webui:main</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>Note I changed the default port to 3005 since I have a few other apps running on port 3000 in development. Once the container is up and running all you need to do is to open a browser and navigate to <code class=\"language-text\">http://localhost:3005</code>:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/368ee4ee03bfeba427f8f1cea9a080e0/32ac3/openwebuilogin.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 78.51851851851852%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAACXBIWXMAABYlAAAWJQFJUiTwAAACB0lEQVR42oVU2W7iQBBE4r7MbQMLRmAMxg4iCogshwDBAwjxwv9/TGWqlSHGm00eStMz7qme6sOxYrEIDcMwkMlkEI/HkUwmxU6lUmJrpNNp+Z5IJGSfz+cR5oiFybLZLGazGa7XK7bbLabTKVarFTabDQ6Hg6zL5RL3+x3n8xmXywWDwQC5XE7ufxEWCnLI6I7j4Ha7YbfbYTweC8FiscB+vxcwyOl0wvF4lCC2bT8TFhRZpVJBz+6h2+3KKymHUmlzDcvWKdGSSVb8JHsQlstlBEEAb+LBKJVkT5SUzWBEtVoVhG2irPYlRVgKSyZprVbDaDSGp2ROJhOR66u12Wz+CMs0MZwv0O71UFAFiumC1Ot1cTCVQ7vVQotQe57/Bkv51tT6lMO3tzn+vr9j9voqcrMqV8xPtC2+Q175Fj79Hm1jWib6/YFUrdPtSIFsu4tOpwPLstBoNL4FX/hHdUZDqWG3PAh5iXlj24xGI7iuK7mk3W63v3Km/MJgivrBC5oq8BMh8xiFPmdatHRWPgpDfTeik8KnMxplcNVg9R1niMAPpFfDfhrip4uiCfkhLIOgTcIXGcG1GjNHEdZghoLqO7z/zyxrsOokksYtV6B7ld/0q3TjR1MUi7YALzKi53lwh65M0JAF8n34/kSKtVqv1XzPVa82//+3iZLSUSO654zr8+jdD0cPkQWTUrV7AAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Open WebUI login page\"\n        title=\"\"\n        src=\"/static/368ee4ee03bfeba427f8f1cea9a080e0/302a4/openwebuilogin.png\"\n        srcset=\"/static/368ee4ee03bfeba427f8f1cea9a080e0/01bf6/openwebuilogin.png 270w,\n/static/368ee4ee03bfeba427f8f1cea9a080e0/07484/openwebuilogin.png 540w,\n/static/368ee4ee03bfeba427f8f1cea9a080e0/302a4/openwebuilogin.png 1080w,\n/static/368ee4ee03bfeba427f8f1cea9a080e0/32ac3/openwebuilogin.png 1249w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Click on sign up and add your user, don’t worry the password is only stored locally inside the docker container volume. Once you signed up, you will need to add the Ollama address in the settings:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/26b12b6d378269593fe0ceae46f386af/e1190/openwebuiollama.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 70%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAABYlAAAWJQFJUiTwAAABR0lEQVR42q2TyW6DQBBE5wsidrOJzSwGjEEWueYUyYdw5P9/pUK1ReQslrCcQ8FAd9e8bgZlmiZ834dt2+CaMgxDtD5vla7rUEEQoO97pGkqpq7rwvM82YTrraLPbreDYuHxeES23yMMQwnkeY6iKCThKvdm/V2EiOMYwzBA0zSopmkwzzM+pgmXywXjOKKqKvB9UZayu+M4UnyPjh0RxLIsKG8h7E8naZkBisQ0Pp/PEuu6DofDQXKyLPsldsaupGVeSJQkieCThoVMoBjrTt11LEvxOt9brYSs/zIsl/Y4i7W9W63ka/s/xRzexZCJNCQ2C+4Nf4toqmhS1w2iKPqT7mFDzqBtWyH8N8O6rp8m5OhkhnKwl2PxDKFjOzBfNJi6AUWTZz6Is1CFWYzX+R1Rm0Pxh+YJp4j8qCzTgheHGKY3BGWCT95vbgT39NUgAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Adding Ollama URL in the Open WebUI settings\"\n        title=\"\"\n        src=\"/static/26b12b6d378269593fe0ceae46f386af/302a4/openwebuiollama.png\"\n        srcset=\"/static/26b12b6d378269593fe0ceae46f386af/01bf6/openwebuiollama.png 270w,\n/static/26b12b6d378269593fe0ceae46f386af/07484/openwebuiollama.png 540w,\n/static/26b12b6d378269593fe0ceae46f386af/302a4/openwebuiollama.png 1080w,\n/static/26b12b6d378269593fe0ceae46f386af/0d292/openwebuiollama.png 1620w,\n/static/26b12b6d378269593fe0ceae46f386af/b3608/openwebuiollama.png 2160w,\n/static/26b12b6d378269593fe0ceae46f386af/e1190/openwebuiollama.png 2203w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Click <strong>Save</strong> and you’re ready to select a model and start chatting.</p>\n<h2 id=\"-custom-model\" style=\"position:relative;\"><a href=\"#-custom-model\" aria-label=\" custom model permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>🤖 Custom model</h2>\n<p>That got me through the initial setup and everything was great, but I still had the problem of how to prevent the model to give direct answers to my kid. Fortunately Open WebUI has the ability to create custom model files which basically allows you to set a system message for an existing model. This is exactly what I needed.</p>\n<p>Navigate to <strong>Workspace</strong> and select create a new model file, I named it Debra, and added the following custom prompt:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"43904237685403705000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`FROM llama3\r\nPARAMETER temperature 0\r\nSYSTEM &quot;&quot;&quot;\r\nYou are an AI assistant designed to help my daughter which is in high school learn and solve problems. You will guide her through the process of finding solutions, but you won’t provide direct answers. This is to ensure that she is actively learning and understanding the concepts. Remember, the goal is not just to get the right answer, but to understand how to arrive at that answer. I want her on this journey of learning together in a safe and supportive environment. \r\n&quot;&quot;&quot;`, `43904237685403705000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"txt\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-txt line-numbers\"><code class=\"language-txt\">FROM llama3\r\nPARAMETER temperature 0\r\nSYSTEM \"\"\"\r\nYou are an AI assistant designed to help my daughter which is in high school learn and solve problems. You will guide her through the process of finding solutions, but you won’t provide direct answers. This is to ensure that she is actively learning and understanding the concepts. Remember, the goal is not just to get the right answer, but to understand how to arrive at that answer. I want her on this journey of learning together in a safe and supportive environment. \r\n\"\"\"</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>I also checked the assistant and education boxes and saved my model.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/66f56828465d28441d6c66df1c46b7f1/87629/debra.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 73.33333333333334%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAACXBIWXMAABYlAAAWJQFJUiTwAAABjElEQVR42n2TWZKCYAyEOYTivoMbKAzulve/VsYvVlMMAz50hYT8WTvBarWyoihsMBhYv9//h16vZ6PRyPI8t9Pp5L6TycTtTb4BgeI4tuFw6EHbMJ1ObblcenAeN/lgD+bzuWVZZtvt1sIw9Cx1VO1NXfypkIxpmtrxeLT9fm+73c6SJPFvkoDD4WBRFLVWBujQK1wsFna/3w2JgR9NUAVtKCsk0Pl8ttls5g+puArZxuNxKetgSfiVLTPDy+XigZG3280lW0XSAf/w06blj45MktRbD0QJPVLQ6/XqEjweD9dlw0ffyDzP3vh5zz2xgHKpiEdAGUnwfD7LClkUnGU50AeJDuUYVxTF78VmHx6CKj3aKMH/brfrUkDvdDoG/UgQEB3K0LauoM7Hb9wTPksJPzNcr9e22WycgwAd0A6t4fPtinRJvhQqYnvQh/IxqhWgdmlLOqj7lDzkEl6vlw+f4DhwOSyIa+EhY0EnsWZJJ6IV7WpMHpBt8lPzY4tqV2eFztAVEF9tujrvX6yonnZe2dFXAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Adding a custom model file in Open WebUI\"\n        title=\"\"\n        src=\"/static/66f56828465d28441d6c66df1c46b7f1/302a4/debra.png\"\n        srcset=\"/static/66f56828465d28441d6c66df1c46b7f1/01bf6/debra.png 270w,\n/static/66f56828465d28441d6c66df1c46b7f1/07484/debra.png 540w,\n/static/66f56828465d28441d6c66df1c46b7f1/302a4/debra.png 1080w,\n/static/66f56828465d28441d6c66df1c46b7f1/0d292/debra.png 1620w,\n/static/66f56828465d28441d6c66df1c46b7f1/87629/debra.png 2076w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>And last we need to make sure her user can only use this model and can’t delete their chat history which can be done in the admin settings:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1080px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/c6063cefe87ddb1f2b5ddef872c725b3/b5c8e/lockuserdown.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 52.222222222222214%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAABIklEQVR42pVSSW6EQBDjCUmAZh32HYFGMHMhpwiJYyR+kP9/wqkqCZREMNEcTNFN22UXrfmXC5IkQZGnUk3ThK7rO3j9HwzDgGVZUjXP91AUBYmlCKNIPlyoSRiGCIIAjuPAtu1T8HmlFBx656oxeRgGlGWBiEQiEm3bVvb6vt9JR2AB3/eR57nw2K1W1zXWdcWyLJjnGeM4ijOOz5WJj9yxIKfhKoIcqSzLvQOvb7c7pmlC13Xi4szh5nLjKUWCPEje/EmsqkoiV9QojmNxe4Ysy5CmqcxdHPLjb1fP8yhGINV13VNwzKZp0dDMKxqd/JQjwS3G5vwRZJ7EMV/omr2+HQs+A2XSlQnI6ccdXh79nuHTsCiJbsBNArx/fSK6VvgG5KMIFIS+eBgAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Locking user down to a custom model in Open WebUI\"\n        title=\"\"\n        src=\"/static/c6063cefe87ddb1f2b5ddef872c725b3/302a4/lockuserdown.png\"\n        srcset=\"/static/c6063cefe87ddb1f2b5ddef872c725b3/01bf6/lockuserdown.png 270w,\n/static/c6063cefe87ddb1f2b5ddef872c725b3/07484/lockuserdown.png 540w,\n/static/c6063cefe87ddb1f2b5ddef872c725b3/302a4/lockuserdown.png 1080w,\n/static/c6063cefe87ddb1f2b5ddef872c725b3/0d292/lockuserdown.png 1620w,\n/static/c6063cefe87ddb1f2b5ddef872c725b3/b3608/lockuserdown.png 2160w,\n/static/c6063cefe87ddb1f2b5ddef872c725b3/b5c8e/lockuserdown.png 2194w\"\n        sizes=\"(max-width: 1080px) 100vw, 1080px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>And we’re done. This gave my daughter a perfect tool which she can use with her homework without me worrying about how she uses AI for education purposes.</p>\n<h2 id=\"-summary\" style=\"position:relative;\"><a href=\"#-summary\" aria-label=\" summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>✍🏽 Summary</h2>\n<p>I hope you have enjoyed this guide and could setup your local LLM and use it to increase your productivity and others around you. Remember there are many more models you can leverage including CodeGemma and Phi3 from Microsoft. And last, you can use this with Semantic Kernel which is even cooler since I just finished my series on it.</p>","timeToRead":4,"frontmatter":{"title":"🥇 Run your generative AI model locally 🥇","unformattedDate":"2024-05-28T00:00:00.000Z","date":"May 28, 2024","path":"/local-llms/","author":"Yaser Adel Mehraban","tags":["AI","OpenAI","LLM","GenerativeAI"],"thumbnail":{"childImageSharp":{"gatsbyImageData":{"layout":"constrained","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAACXBIWXMAAAsTAAALEwEAmpwYAAAEYklEQVR42kWUiVMaZxjG+Uvamc6kk54xbTQSqyYVvC3xqEfEmJp4BaOJxlStiRcCC6hcu4KySBXPIEaUjIgaYHc5PEBNjQderSZGa1pbrY6mI91Fne48s7uz+/72feb9vmdJUr61nosR4nnExWQ8i7DaKGGbQQ4KARb8hl/2HOKgnrfoaTFRbyHhF4iLQsRTz5mHiqtRZWO3QqxvqnM01lglbANiMoLc5xI2UQABHhHF2CnsIU8+iQqrTAa9UftspFOhfzFoam5QLy7PdLYPSjmEi1MYOIM9Zk4l42Mm7YpOY1V2tK2uufaPdhZX5uZWXj3VDJn6lmChDeQgJ05P4P9JEEAM3fO/2LaMvTODSmjW2OLsl7kGFCqAycyrmEY2TH0uKR/D23r8nsFSHopb6pQ7ncjraWSzr9dRICxndoieKGvLGoGckpI7NEZxWZVGpdG2zopZJinvDMYbQlwEBMwj2gUHsu40bxi0zrQsxlBn6+7mekHRj736PrVOR0++I3hSbe4/bQ5xiWnjbS1SrhUW2MdGcPLNFLJp6JkYHNCWxtMmelp/e7O4OOvsG+hvadaZNVNO9G2rdBK3SSwVTopYQ/zKfpnAhA24MMOifWQV0bns2MTS9OjLMeRgf2dmarJ7WMfhClWgTtM8Us/TQwAxZhJcN56XJYqixgdHJobH30yKz0pLe5ieXZxCZ7wYHh6zY9OTY273PwsbS2JYlpuU/ujWvdQIemEWKK8bI8lrR4seKAMpCZGxt7xDo8je4V+Rgz/3DfzgI59h/Yjbvbe3t/3+6M/55dlWXU9uak4lozSZkpQcVdgkniQ18G2csn4//5iokOSQgITAoLgLfhQvP+q5T7+RSuCDg+2/dt66j3eX1xaQOQeD8TDkQkzo19dvxRQrRE6SlG8RMIeuhaZGRaX6R0f7BIWTgyMCyLSPv/AruF/mdh8fHv7hdh8evT+wL0zCms5vL0VfOReWnlgBCx2n60yLzQsLpYd+l3KVGk2+RvPxDTvvFZAQm7n799bWu9fb6/OGrrb1rV/Hl1+m3Mi+/CH13g9cWOAggRyzQjhFi/nJm0yjUuN9qeEBfrQrvuFefhQKJcFoGOhog3tloLFH7Xbvo1O2x0y2//mwgkyJXDBOAgEMrjHUlFY8uJ0WFx176XKENznyolf4l96Uzy4GZVIjDE9b3MRx/G7vd1lrk0gp9/4kpIgBN+LTFrGsOrjn33HhWjdPxS7PfwxlJGZWPyrJvZ17k557/WpMfkae0/UKmcAgsYhfUDjczFQxc4QV6nqenUiVrMaiFbfrWVXl6ek3vqfHUZLSY7IzolNq7959VlWirrgPl+dX5BUoWVVmKWtVL0e7DMTeBlB8h2EggIo5lmYQ1ch0ugaVtl6uAmq7Ktl6HuDqadixd412yNQShbm9V9ekb+AjtVUE4gkGzwoR2UBFLEzEtomBMSl/VCG0N4P2nyF7o8CCxwavkfJsddW48P8BdpJHCED/A+l9zxoa9YoXAAAAAElFTkSuQmCC"},"backgroundColor":"transparent","images":{"fallback":{"src":"/static/c7740feca497412dc2f3947d9a263f5f/58e3d/ollama.png","srcSet":"/static/c7740feca497412dc2f3947d9a263f5f/fd23e/ollama.png 750w,\n/static/c7740feca497412dc2f3947d9a263f5f/58e3d/ollama.png 1024w","sizes":"(min-width: 1024px) 1024px, 100vw"},"sources":[{"srcSet":"/static/c7740feca497412dc2f3947d9a263f5f/cd166/ollama.webp 750w,\n/static/c7740feca497412dc2f3947d9a263f5f/402a0/ollama.webp 1024w","type":"image/webp","sizes":"(min-width: 1024px) 1024px, 100vw"}]},"width":1024,"height":1024}}}}}}]}},"pageContext":{"tag":"LLM"}},"staticQueryHashes":[],"slicesMap":{}}