<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Untitled Publication]]></title><description><![CDATA[Untitled Publication]]></description><link>https://hashnode.julien.cloud</link><generator>RSS for Node</generator><lastBuildDate>Thu, 08 Oct 2026 13:15:31 GMT</lastBuildDate><atom:link href="https://hashnode.julien.cloud/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Unveiling the World of AI Chatbots: A Diverse Exploration]]></title><description><![CDATA[The AI chatbot landscape is changing quickly. While ChatGPT is the most popular and well-known, it's important to look at other options that offer different views on Large Language Models (LLMs). These platforms offer better user experiences, various...]]></description><link>https://hashnode.julien.cloud/unveiling-the-world-of-ai-chatbots-a-diverse-exploration</link><guid isPermaLink="true">https://hashnode.julien.cloud/unveiling-the-world-of-ai-chatbots-a-diverse-exploration</guid><category><![CDATA[AI]]></category><category><![CDATA[chatbot]]></category><dc:creator><![CDATA[Julien.cloud]]></dc:creator><pubDate>Mon, 03 Mar 2025 20:16:48 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/Ns79tUYyVQQ/upload/2871e314445a042309177b96c8957f1c.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The AI chatbot landscape is changing quickly. While ChatGPT is the most popular and well-known, it's important to look at other options that offer different views on Large Language Models (LLMs). These platforms offer better user experiences, various pricing, and model options, letting you customize your AI experience to fit your needs and preferences.</p>
<p>By putting together this list of AI chatbots, I aim to expand your understanding and highlight the amazing variety within the AI revolution.</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Name</td><td>URL</td><td>Comment</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Anthropic</strong></td><td><a target="_blank" href="https://claude.ai/new">https://claude.ai/new</a></td><td>ChatGPT's main competitor, known for longer context windows and Constitutional AI principles</td></tr>
<tr>
<td><strong>Google Gemini</strong></td><td><a target="_blank" href="https://gemini.google.com/app">https://gemini.google.com/app</a></td><td>Google's AI-powered chat platform, integrated across Google products</td></tr>
<tr>
<td><strong>Mistral AI</strong></td><td><a target="_blank" href="https://chat.mistral.ai/chat">https://chat.mistral.ai/chat</a></td><td>A French-developed AI model with free chat, known for efficiency</td></tr>
<tr>
<td><strong>Hugging Face</strong></td><td><a target="_blank" href="https://huggingface.co/chat/">https://huggingface.co/chat/</a></td><td>Popular platform for developers and researchers, providing access to a vast library of pre-trained models with free, open-source chatbot</td></tr>
<tr>
<td><strong>Microsoft Copilot</strong></td><td><a target="_blank" href="https://copilot.microsoft.com/">https://copilot.microsoft.com/</a></td><td>Microsoft's AI-powered chat platform with search capabilities.</td></tr>
<tr>
<td><strong>Meta AI</strong></td><td><a target="_blank" href="https://www.meta.ai/">https://www.meta.ai/</a></td><td>Meta AI chat, not available in EU, requires VPN access</td></tr>
<tr>
<td><strong>X Grok</strong></td><td><a target="_blank" href="https://x.ai/grok">https://x.ai/grok</a></td><td>Elon Musk's AI chatbot, known for its irreverent personality</td></tr>
<tr>
<td><strong>Groq</strong></td><td><a target="_blank" href="https://groq.com/">https://groq.com/</a></td><td>Not to be confused with X Grok AI, focuses on high-performance multi models inference.</td></tr>
<tr>
<td><strong>Nvidia</strong></td><td><a target="_blank" href="https://build.nvidia.com/explore/reasoning">https://build.nvidia.com/explore/reasoning</a></td><td>Nvidia AI platform offering standard models and Nvidia developed ones.</td></tr>
<tr>
<td><strong>Perplexity</strong></td><td><a target="_blank" href="https://www.perplexity.ai/">https://www.perplexity.ai/</a></td><td>AI search engine with real-time information access</td></tr>
<tr>
<td><strong>Deepseek</strong></td><td><a target="_blank" href="https://chat.deepseek.com/">https://chat.deepseek.com/</a></td><td>Chinese AI firm that has disrupted the industry with its low-cost, open-source large language models</td></tr>
<tr>
<td><strong>Qwen</strong></td><td><a target="_blank" href="https://chat.qwenlm.ai/">https://chat.qwenlm.ai/</a></td><td>From Alibaba Cloud</td></tr>
<tr>
<td><strong>Allenai</strong></td><td><a target="_blank" href="https://playground.allenai.org/">https://playground.allenai.org/</a></td><td>Non-profit research institute founded by late Microsoft co-founder Paul Allen, focused on AI for scientific discovery</td></tr>
<tr>
<td><strong>You</strong></td><td><a target="_blank" href="https://you.com/">https://you.com/</a></td><td>AI-powered search engine with chatbot capabilities</td></tr>
<tr>
<td><strong>OpenRouter</strong></td><td><a target="_blank" href="https://openrouter.ai/chat">https://openrouter.ai/chat</a></td><td>Offers a single API to use several LLMs, increasing flexibility for developers</td></tr>
<tr>
<td><strong>Mammouth</strong></td><td><a target="_blank" href="https://mammouth.ai/app/a/default">https://mammouth.ai/app/a/default</a></td><td>Offers a single interface to access multiple models</td></tr>
<tr>
<td><strong>T3</strong></td><td><a target="_blank" href="https://t3.chat/chat">https://t3.chat/chat</a></td><td>Offers a single interface to access multiple models</td></tr>
<tr>
<td><strong>POE</strong></td><td><a target="_blank" href="https://poe.com/">https://poe.com/</a></td><td>Platform that provides access to multiple AI models, including GPT-4 and Claude</td></tr>
<tr>
<td><strong>LMarena</strong></td><td><a target="_blank" href="https://lmarena.ai/">https://lmarena.ai/</a></td><td>Focuses on AI model evaluation and comparison</td></tr>
<tr>
<td><strong>Together AI</strong></td><td><a target="_blank" href="https://api.together.ai/">https://api.together.ai/</a></td><td>Go to playground/chat, offers a platform for running and fine-tuning various AI models</td></tr>
<tr>
<td><strong>Nousresearch</strong></td><td><a target="_blank" href="https://hermes.nousresearch.com/">https://hermes.nousresearch.com/</a></td><td>Fined tuned version of Llama 3.1 base model</td></tr>
</tbody>
</table>
</div><p>While this list is not exhaustive, it offers a glimpse into the diverse and exciting world of AI chatbots. Each platform has unique features and specializations, catering to different needs and use cases. As you explore these options, you might find new tools that boost your productivity, creativity, or problem-solving skills.</p>
<p>I encourage you to try different platforms, as each one might offer insights and capabilities that could transform your daily use of AI.</p>
]]></content:encoded></item><item><title><![CDATA[My Git Cheatsheet]]></title><description><![CDATA[This is my Git cheatsheet. I share it in case it's of any use to anyone else.Stash Commands
Stashing
Basic Stashing
git stash                      # Stash changes quickly
git stash save "Description"   # Stash changes with a description

Viewing Stas...]]></description><link>https://hashnode.julien.cloud/my-git-cheatsheet</link><guid isPermaLink="true">https://hashnode.julien.cloud/my-git-cheatsheet</guid><category><![CDATA[Git]]></category><category><![CDATA[cheatsheet]]></category><dc:creator><![CDATA[Julien.cloud]]></dc:creator><pubDate>Thu, 08 Aug 2024 13:17:16 GMT</pubDate><content:encoded><![CDATA[<p>This is my Git cheatsheet. I share it in case it's of any use to anyone else.Stash Commands</p>
<h2 id="heading-stashing">Stashing</h2>
<h3 id="heading-basic-stashing">Basic Stashing</h3>
<pre><code class="lang-bash">git stash                      <span class="hljs-comment"># Stash changes quickly</span>
git stash save <span class="hljs-string">"Description"</span>   <span class="hljs-comment"># Stash changes with a description</span>
</code></pre>
<h3 id="heading-viewing-stashes">Viewing Stashes</h3>
<pre><code class="lang-bash">git stash list                 <span class="hljs-comment"># List all stashes</span>
git stash show stash@{n}       <span class="hljs-comment"># Show changes in a specific stash</span>
git stash show -p stash@{n}    <span class="hljs-comment"># Show full diff of a specific stash</span>
</code></pre>
<h3 id="heading-applying-stashes">Applying Stashes</h3>
<pre><code class="lang-bash">git stash apply                <span class="hljs-comment"># Apply the most recent stash</span>
git stash apply stash@{n}      <span class="hljs-comment"># Apply a specific stash</span>
git stash pop                  <span class="hljs-comment"># Apply and remove the most recent stash</span>
git stash pop stash@{n}        <span class="hljs-comment"># Apply and remove a specific stash</span>
</code></pre>
<h3 id="heading-managing-stashes">Managing Stashes</h3>
<pre><code class="lang-bash">git stash drop stash@{n}       <span class="hljs-comment"># Remove a specific stash</span>
git stash clear                <span class="hljs-comment"># Remove all stashes</span>
</code></pre>
<h3 id="heading-branching-from-a-stash">Branching from a Stash</h3>
<pre><code class="lang-bash">git stash branch new-branch    <span class="hljs-comment"># Create a new branch from the latest stash</span>
</code></pre>
<p>Note: Replace <code>n</code> with the stash index number (0 is most recent).</p>
<hr />
<h2 id="heading-rebase-commands">Rebase Commands</h2>
<h3 id="heading-basic-rebasing">Basic Rebasing</h3>
<pre><code class="lang-bash">git rebase &lt;base&gt;              <span class="hljs-comment"># Rebase current branch onto &lt;base&gt;</span>
git rebase -i &lt;base&gt;           <span class="hljs-comment"># Interactive rebase</span>
</code></pre>
<h3 id="heading-rebase-operations">Rebase Operations</h3>
<pre><code class="lang-bash">git rebase --<span class="hljs-built_in">continue</span>          <span class="hljs-comment"># Continue rebase after resolving conflicts</span>
git rebase --abort             <span class="hljs-comment"># Abort the rebase operation</span>
git rebase --skip              <span class="hljs-comment"># Skip the current commit and continue</span>
</code></pre>
<h3 id="heading-updating-a-branch">Updating a Branch</h3>
<pre><code class="lang-bash">git pull --rebase origin &lt;branch&gt;  <span class="hljs-comment"># Pull changes and rebase instead of merge</span>
</code></pre>
<h3 id="heading-rebase-onto-another-branch">Rebase onto Another Branch</h3>
<pre><code class="lang-bash">git rebase --onto &lt;newbase&gt; &lt;oldbase&gt; &lt;branch&gt;
</code></pre>
<h3 id="heading-preserving-merges">Preserving Merges</h3>
<pre><code class="lang-bash">git rebase -p &lt;upstream&gt;       <span class="hljs-comment"># Rebase preserving merge commits</span>
</code></pre>
<p>Note: Replace <code>&lt;base&gt;</code>, <code>&lt;branch&gt;</code>, <code>&lt;newbase&gt;</code>, <code>&lt;oldbase&gt;</code>, and <code>&lt;upstream&gt;</code> with appropriate branch or commit references.</p>
<hr />
<h2 id="heading-reset-commands">Reset Commands</h2>
<h3 id="heading-soft-reset">Soft Reset</h3>
<pre><code class="lang-bash">git reset --soft HEAD~1        <span class="hljs-comment"># Undo last commit, keep changes staged</span>
git reset --soft &lt;commit&gt;      <span class="hljs-comment"># Reset to specific commit, keep changes staged</span>
</code></pre>
<h3 id="heading-mixed-reset-default">Mixed Reset (Default)</h3>
<pre><code class="lang-bash">git reset HEAD~1               <span class="hljs-comment"># Undo last commit, keep changes unstaged</span>
git reset &lt;commit&gt;             <span class="hljs-comment"># Reset to specific commit, keep changes unstaged</span>
</code></pre>
<h3 id="heading-hard-reset">Hard Reset</h3>
<pre><code class="lang-bash">git reset --hard HEAD~1        <span class="hljs-comment"># Undo last commit, discard all changes</span>
git reset --hard &lt;commit&gt;      <span class="hljs-comment"># Reset to specific commit, discard all changes</span>
git reset --hard origin/&lt;branch&gt;  <span class="hljs-comment"># Reset to remote branch, discard all local changes</span>
</code></pre>
<h3 id="heading-reset-single-file">Reset Single File</h3>
<pre><code class="lang-bash">git reset &lt;file&gt;               <span class="hljs-comment"># Unstage a file</span>
git reset --hard &lt;file&gt;        <span class="hljs-comment"># Discard changes to a file (use with caution)</span>
</code></pre>
<h3 id="heading-reset-to-a-clean-state">Reset to a Clean State</h3>
<pre><code class="lang-bash">git reset --hard HEAD          <span class="hljs-comment"># Discard all local changes in working directory</span>
</code></pre>
<h3 id="heading-undo-a-reset">Undo a Reset</h3>
<pre><code class="lang-bash">git reflog                     <span class="hljs-comment"># View history of HEAD changes</span>
git reset --hard HEAD@{n}      <span class="hljs-comment"># Reset to a previous state (n is the reflog index)</span>
</code></pre>
<p>Note: Be cautious with <code>--hard</code> resets as they discard changes permanently. Always commit or stash important changes before using <code>--hard</code>.</p>
<p>Replace <code>&lt;commit&gt;</code> with a commit hash, branch name, or relative reference (e.g., HEAD~3).</p>
]]></content:encoded></item><item><title><![CDATA[Boost Your AI Workflow: A Guide to Using Ollama, OpenwebUI, and Continue]]></title><description><![CDATA[In a previous article, I discussed how I used Fabric with a local Large Language Model (LLM) to enhance AI prompts and perform tasks like summarizing text, writing Merge Requests, and creating agile user stories.
In this article, we will continue thi...]]></description><link>https://hashnode.julien.cloud/boost-your-ai-workflow-a-guide-to-using-ollama-openwebui-and-continue</link><guid isPermaLink="true">https://hashnode.julien.cloud/boost-your-ai-workflow-a-guide-to-using-ollama-openwebui-and-continue</guid><category><![CDATA[AI]]></category><category><![CDATA[#ai-tools]]></category><category><![CDATA[ollama]]></category><category><![CDATA[#Continue]]></category><category><![CDATA[continue.dev]]></category><category><![CDATA[open-webui]]></category><dc:creator><![CDATA[Julien.cloud]]></dc:creator><pubDate>Thu, 25 Jul 2024 18:56:33 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1721933709727/b1fa7d28-fe1e-4751-a823-1fc228412581.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In a previous article, I discussed how I used Fabric with a local Large Language Model (LLM) to enhance AI prompts and perform tasks like summarizing text, writing Merge Requests, and creating agile user stories.</p>
<p>In this article, we will continue this journey by exploring some other recent discoveries that are truly amazing.</p>
<p>First, we will learn how to run LLM locally using Ollama, an alternative to LM Studio.<br />Next, we will explore how to use Ollama with a web console to create a local version of ChatGPT/Anthropic.<br />Finally, we will see how to integrate it with Continue on Visual Studio Code to have a local coding assistant.</p>
<h1 id="heading-running-local-models-with-ollama">Running local models with Ollama</h1>
<p>Ollama is a powerful tool designed to help you download and run Large Language Models (LLMs) locally on your machine. It is similar to LM Studio but does not come as software. Instead, it is a tool that runs on your machine, and you interact with it using CLI or API calls.</p>
<p>The installation is straightforward on the website: <a target="_blank" href="https://ollama.com/download">https://ollama.com/download</a></p>
<p>Then you can browse the list of available models on the library page at: <a target="_blank" href="https://ollama.com/library">https://ollama.com/library</a></p>
<p>To download and run a model, follow the command on the model page, for example: <code>ollama run llama3.1</code></p>
<p>It will take some time to download the necessary files and then open a prompt that you can use to interact with the model. It is as simple as that.</p>
<p>To interact with the model using API calls, use :<br /><code>curl</code><a target="_blank" href="http://localhost:11434/api/generate"><code>http://localhost:11434/api/generate</code></a> <code>-d '{ "model": "llama3.1:8b", "prompt": "Why is the sky blue?", "stream": false }'</code></p>
<p>Once you've downloaded several models, you can see which ones are available to use on your machine: <code>ollama list</code></p>
<p>Because Ollama dynamically loads and unloads the models to avoid overloading your system, you can also see which models are currently loaded: <code>ollama ps</code></p>
<p>If you want to see what is happening behind the scenes:</p>
<ul>
<li><p>On Mac: <code>tail -f ~/.ollama/logs/server.log</code></p>
</li>
<li><p>On Linux: <code>journalctl -e -u ollama</code></p>
</li>
</ul>
<p>If you need to write an application that leverages this local LLM, head to <a target="_blank" href="https://github.com/ollama/ollama/tree/main/examples">https://github.com/ollama/ollama/tree/main/examples</a> to get some examples like:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> langchain.llms <span class="hljs-keyword">import</span> Ollama

input = input(<span class="hljs-string">"What is your question?"</span>)
llm = Ollama(model=<span class="hljs-string">"llama3"</span>)
res = llm.predict(input)
<span class="hljs-keyword">print</span> (res)
</code></pre>
<p>Once you've set up and run the model, you can use the Ollama run command or the API. For an enhanced experience, a web interface can be very useful. In the next section, we'll explore how to set up a web console.</p>
<h1 id="heading-setting-up-a-web-console-with-openwebui">Setting Up a Web Console with OpenwebUI</h1>
<p>To get the web console up and running, I personally use the Docker version:</p>
<pre><code class="lang-python">docker run -d -p <span class="hljs-number">3000</span>:<span class="hljs-number">8080</span> --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
</code></pre>
<p>You can also use pip, helm, or docker-compose. For all installation methods, visit : <a target="_blank" href="https://docs.openwebui.com/getting-started/">https://docs.openwebui.com/getting-started/</a></p>
<p>Once it is running, you can access it via <a target="_blank" href="http://localhost:3000/">http://localhost:3000/</a>, sign up to create a (local) account, and log in.</p>
<p>Once logged in, go to Admin Panel / Settings / Connections. Here you will be able to connect it to your local Ollama as well as other LLM providers such as OpenAI, Anthropic, Groq, etc.</p>
<p>As you can see in the following example, I have configured it to use all of these providers:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721848585732/887ab9cb-df40-4a90-b712-24e837ba646a.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-using-the-chat-feature-in-openwebui">Using the Chat Feature in OpenwebUI</h2>
<p>Once this is done, you can start a new chat, select a model from the list, and start using it:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721848726325/5b838deb-5b07-465f-a417-f362042c6d49.png" alt class="image--center mx-auto" /></p>
<p>The list will show all available models from the connections you previously configured.</p>
<h2 id="heading-comparing-models-in-openwebui">Comparing Models in OpenwebUI</h2>
<p>Another interesting feature is that you can compare two models by clicking on the + button next to the model's name:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721848826372/f52d00a6-a7ba-4d18-b0d1-415a85313dbe.png" alt class="image--center mx-auto" /></p>
<p>This is an interesting way to compare model outputs and get multiple results to help you make the best decision.</p>
<h2 id="heading-preconfiguring-prompts-in-openwebui">Preconfiguring Prompts in OpenwebUI</h2>
<p>When you go to your workspace, you can also preconfigure Prompts. This will help you speed up regular tasks you might ask your model to do, such as writing an email.</p>
<pre><code class="lang-python">You are tasked <span class="hljs-keyword">with</span> improving a draft email. Your goal <span class="hljs-keyword">is</span> to enhance the email<span class="hljs-string">'s clarity, professionalism, and effectiveness while maintaining its original intent. Here is the draft email:

&lt;draft_email&gt;
{{CLIPBOARD}}
&lt;/draft_email&gt;

To improve this email, follow these steps:

1. Correct any grammatical errors, spelling mistakes, or typos.
2. Improve the overall structure and flow of the email.
3. Ensure the tone is appropriate for the intended recipient and purpose.
4. Clarify any vague or ambiguous statements.
5. Remove unnecessary information and add relevant details if needed.
6. Strengthen the call-to-action (if applicable).
7. Ensure the opening and closing are professional and appropriate.

After providing the improved email, briefly explain the main changes you made and why, in 2-3 sentences. 

Remember to maintain the original intent and key information of the email while making these improvements.</span>
</code></pre>
<p>To use this, I usually write a draft version of the email, copy it to the clipboard, then go to the chat and use the / command to invoke the prompt. It will automatically copy the draft with the prompt and submit it to the selected model.</p>
<p>There are many other features you can explore, such as custom models, document uploads, and various parameters in both personal and admin settings.</p>
<p>To use models and tools from the community: <a target="_blank" href="https://openwebui.com/#open-webui-community">https://openwebui.com/#open-webui-community</a></p>
<h1 id="heading-integrating-continue-with-vs-code">Integrating Continue with VS Code</h1>
<p>Now that we have a user-friendly web interface for our models, it would be great to use it in our development environment too. For this, I use a tool called Continue: <a target="_blank" href="https://www.continue.dev/">https://www.continue.dev/</a>. You can download the plugin from the VS Code marketplace. After installing it, open the plugin and go to the configuration button.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721849430445/743e866b-5427-4dde-9ed4-ad33dd9f8fe0.png" alt class="image--center mx-auto" /></p>
<p>This will open a Config.json file. This is where you will be able to configure all the integrations. There are three important sections:</p>
<ul>
<li><p>models: configure integration for the chat</p>
</li>
<li><p>tabAutocompleteModel: configure integration for autocompletion</p>
</li>
<li><p>embeddingsProvider: configure the provider to generate embedding and index your local codebase</p>
</li>
</ul>
<h2 id="heading-configuring-models-in-continue">Configuring Models in Continue</h2>
<p>To use ollama in the continue chat, use the following</p>
<pre><code class="lang-python">  <span class="hljs-string">"models"</span>: [
    {
      <span class="hljs-string">"title"</span>: <span class="hljs-string">"gemma2"</span>,
      <span class="hljs-string">"provider"</span>: <span class="hljs-string">"ollama"</span>,
      <span class="hljs-string">"model"</span>: <span class="hljs-string">"gemma2:latest"</span>
    },
    {
      <span class="hljs-string">"title"</span>: <span class="hljs-string">"llama3:8b"</span>,
      <span class="hljs-string">"provider"</span>: <span class="hljs-string">"ollama"</span>,
      <span class="hljs-string">"model"</span>: <span class="hljs-string">"llama3:8b"</span>
    },
    {
      <span class="hljs-string">"title"</span>: <span class="hljs-string">"llama3.1:8b"</span>,
      <span class="hljs-string">"provider"</span>: <span class="hljs-string">"ollama"</span>,
      <span class="hljs-string">"model"</span>: <span class="hljs-string">"llama3.1:8b"</span>
    }
</code></pre>
<p>You will have to describe each model (you previously downloaded with ollama run) you want to use in the chat. This will give you a nice drop-down in the continue chat interface to interact with different models.</p>
<p>In the chat section, you will be able to ask questions, of course, but also provide more context to your LLM. To do so, use the @ shortcut like:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721849782659/253a3533-746e-4012-a164-2ed7079c833f.png" alt class="image--center mx-auto" /></p>
<p>You can also ask Continue to act on your code or terminal with the / command:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721849831283/d15fad42-62c6-4486-a8c3-cf84529f1371.png" alt class="image--center mx-auto" /></p>
<p>You can also select a portion of your code and use <code>cmd + L</code> to send it to the chat as context.</p>
<h2 id="heading-using-autocomplete-in-continue">Using Autocomplete in Continue</h2>
<p>In the tabAutocompleteModel section, you can only have one model at a time. When using ollama, the documentation recommends using starcoder2:3b.</p>
<pre><code class="lang-python">  <span class="hljs-string">"tabAutocompleteModel"</span>: {
    <span class="hljs-string">"title"</span>: <span class="hljs-string">"Starcoder 2 3b"</span>,
    <span class="hljs-string">"provider"</span>: <span class="hljs-string">"ollama"</span>,
    <span class="hljs-string">"model"</span>: <span class="hljs-string">"starcoder2:3b"</span>
  },
</code></pre>
<p>The full documentation is on : <a target="_blank" href="https://docs.continue.dev/features/tab-autocomplete">https://docs.continue.dev/features/tab-autocomplete</a></p>
<p>Now, when typing code, you should be able to see recommendations and use tab autocompletion.:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721850085818/39274846-3bd0-423e-9612-64f00e3620bc.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-leveraging-embeddings-in-continue">Leveraging Embeddings in Continue</h2>
<p>Embeddings help "translate" data into a simpler form that computers can understand more easily. It's like translating words from one language to another. Embeddings do this with images, videos, texts, or any other type of complex data, making it easier for AI models to process and compare.</p>
<p>The embedding model will be used by Continue to index your codebase. When you ask a question, you can use @codebase. Continue will then search through your code, retrieve related data, and send it to the model to provide more context and get a better response. This mechanism is similar to RAG but with your local codebase.</p>
<p>For more info: <a target="_blank" href="https://docs.continue.dev/features/codebase-embeddings">https://docs.continue.dev/features/codebase-embeddings</a></p>
<h2 id="heading-creating-custom-prompts-in-continue">Creating Custom Prompts in Continue</h2>
<p>Another interesting feature is the ability to preconfigure prompts for recurring tasks: <a target="_blank" href="https://docs.continue.dev/features/prompt-files">https://docs.continue.dev/features/prompt-files</a></p>
<p>Create a <code>.prompt</code> folder. In this folder, name your custom prompt file <code>custom.prompt</code>.</p>
<p>Here is an example I use to generate Helm unit tests:</p>
<pre><code class="lang-python">temperature: <span class="hljs-number">0.5</span>
maxTokens: <span class="hljs-number">4096</span>
---
&lt;system&gt;
You are an expert programmer
&lt;/system&gt;

{{{ input }}}

Write <span class="hljs-keyword">or</span> improve helm unittest <span class="hljs-keyword">for</span> the selected code, following each of these instructions:
- Put the test <span class="hljs-keyword">in</span> a unittest folder
- name files like `function_test.yaml`
- cover all use cases <span class="hljs-keyword">and</span> document your code
</code></pre>
<p>Then in the chat use the / shortcut and you should be able to see your custom prompt.</p>
<h1 id="heading-conclusion-unlock-the-full-potential-of-local-llms">Conclusion: Unlock the Full Potential of Local LLMs</h1>
<p>With this setup, you can unlock the full potential of local LLMs for various applications, while also utilizing them as a gateway to access remote providers with paid APIs. This combination will significantly boost your productivity by enabling you to harness the power of AI across multiple tools and services.</p>
<h1 id="heading-key-takeaways"><strong>Key Takeaways</strong></h1>
<ul>
<li><p>Ollama is a tool to run LLMs locally; you can interact with it via CLI or API.</p>
</li>
<li><p>OpenwebUI is a web console that can use Ollama and other LLM providers like OpenAI and Anthropic.</p>
</li>
<li><p>Continue is an extension for VS Code that serves as a coding assistant.</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Leveraging Fabric and LM Studio for Advanced AI]]></title><description><![CDATA[Introduction
During my usual YouTube browsing, I stumbled upon a video (here) showcasing an AI tool called Fabric, a Python utility that facilitates interaction with AI models. The demo focused on OpenAI's paid version, but I was eager to explore its...]]></description><link>https://hashnode.julien.cloud/leveraging-fabric-and-lm-studio-for-advanced-ai</link><guid isPermaLink="true">https://hashnode.julien.cloud/leveraging-fabric-and-lm-studio-for-advanced-ai</guid><category><![CDATA[AI]]></category><category><![CDATA[#ai-tools]]></category><category><![CDATA[aitools]]></category><dc:creator><![CDATA[Julien.cloud]]></dc:creator><pubDate>Thu, 06 Jun 2024 20:28:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/TQ3SgrW9lkM/upload/2ac88ee69f4033e40c39e1ca27cc6717.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-introduction"><strong>Introduction</strong></h1>
<p>During my usual YouTube browsing, I stumbled upon a video (<a target="_blank" href="https://youtu.be/UbDyjIIGaxQ?si=LCgtyBHuDwLZunG0">here</a>) showcasing an AI tool called Fabric, a Python utility that facilitates interaction with AI models. The demo focused on OpenAI's paid version, but I was eager to explore its potential using a local LLM model.</p>
<h1 id="heading-understanding-fabric"><strong>Understanding Fabric</strong></h1>
<p>Fabric is a Python tool that takes text input and submits it to AI models via an API endpoint, along with an advanced prompt.</p>
<p>It includes a library of pre-built advanced prompt templates called <strong>patterns</strong>. These patterns can be customized or created from scratch to fit individual needs.</p>
<p>These two features make Fabric a unique tool. It acts as middleware between the user and the AI engine, allowing anyone to tailor their interactions with AI models, making it easy and efficient to use.</p>
<h1 id="heading-installing-tools"><strong>Installing tools</strong></h1>
<h2 id="heading-fabric"><strong>Fabric</strong></h2>
<p>To install Fabric, follow the guide on the GitHub page: <a target="_blank" href="https://github.com/danielmiessler/fabric">https://github.com/danielmiessler/fabric</a>.</p>
<p>Once installed, you can run basic commands like <code>fabric --listmodels</code> to list all available models.</p>
<p>If you want to connect to OpenAI, you can run <code>fabric --setup</code>. It will run the initialization phase and ask for your API keys.</p>
<p>However, if you don't want to pay for an OpenAI key, you will need to run your model locally. This is where LM Studio comes into play.</p>
<h2 id="heading-lm-studio"><strong>LM Studio</strong></h2>
<p>LM Studio is a free tool that allows users to download and run models locally on their machines. While it may be slower than using the paid version of OpenAI, it provides an opportunity to test LLM without incurring costs. To use LM Studio, visit <a target="_blank" href="https://lmstudio.ai/docs/welcome">https://lmstudio.ai/docs/welcome</a> and install it.</p>
<h2 id="heading-integration"><strong>Integration</strong></h2>
<p>Now that you have both Fabric and LM Studio installed, let's connect them.</p>
<p>To integrate Fabric with LM Studio, follow these steps:</p>
<ol>
<li><p>Download a model from LM Studio (I tried llama2, llama3, and Gemma, but stopped at llama3 as it's the latest and most advanced model available).</p>
</li>
<li><p>Run the LM Studio local server. Increase the context length to the maximum and use your GPU if you have one.</p>
<p> You should end up with something like this:</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1717759163794/4db52a26-9fc9-4525-909d-7bbf2ca73d67.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Configure Fabric by setting the following environment variables:</p>
</li>
</ol>
<pre><code class="lang-plaintext">export OPENAI_BASE_URL=http://localhost:1234/v1
export DEFAULT_MODEL=Meta-Llama-3-8B-Instruct-Q8_0.gguf
export OPENAI_API_KEY=lm-studio
</code></pre>
<p>That's all. You can now test if Fabric is properly configured with LM Studio by running:</p>
<p><code>fabric --listmodels</code></p>
<p>It should print the model you've loaded in the LM Studio server.</p>
<p>You can also try to send your first and most important request to Fabric using a generic AI pattern with the following command:</p>
<p><code>echo "what is the meaning of life" | fabric -sp ai</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1717759286205/c52f424f-514b-4987-aac8-c519ecf30090.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-using-fabric"><strong>Using Fabric</strong></h1>
<h2 id="heading-pre-built-patterns"><strong>Pre-built patterns</strong></h2>
<p>Patterns are advanced, customizable, and shareable AI prompts. Fabric comes with a library of pre-built patterns that you can use and modify to suit your needs.</p>
<p>You can list all the available patterns with the command <code>fabric -l</code>.</p>
<p>Here are some patterns I particularly like:</p>
<ul>
<li><p><code>extract_wisdom</code>: Extract important information from any text source (blog post, YouTube video transcript, PDF, etc.).</p>
</li>
<li><p><code>ai</code>: A generic pattern for standard requests.</p>
</li>
<li><p><code>write_pull-request</code>: To write beautiful PR/MR without effort.</p>
</li>
<li><p><code>agility_story</code>: For creating agile user stories.</p>
</li>
<li><p><code>provide_guidance</code> : Your AI psychologist</p>
</li>
</ul>
<h2 id="heading-writing-your-own-patterns"><strong>Writing Your Own Patterns</strong></h2>
<p>To demonstrate this capability, I created a custom pattern to improve this blog post. Yes, what you're reading has been generated using the process I'm about to explain – isn't it amazing?</p>
<p>If you look at the pattern library, you'll find a particularly useful pattern called <code>improve_prompt</code>. This pattern will help you write your own patterns.</p>
<p>Let's try creating a technical blog post pattern:</p>
<pre><code class="lang-plaintext">echo "As a technical writer, you take draft content as input and engaging technical guides in the form of blog articles. You provide technical context, explanation, and reference. You write articles of around 2000 words. You provide clear and detailed information. You use simple examples to explain concepts. You provide external links and sources. You provide actionable articles with a mix of theory and tutorial to help people understand concepts by putting things into practice. You write in a balance professional and casual way." | fabric -sp improve_prompt
</code></pre>
<p>Here is a snapshot of the produce pattern</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1717762366130/a81023d2-9340-4eba-b265-8dba9c7212aa.png" alt class="image--center mx-auto" /></p>
<p>Take the output and save it as a file under <code>/Users/&lt;user&gt;/.config/fabric/patterns/write_tech_blog/</code><a target="_blank" href="http://system.md"><code>system.md</code></a>.</p>
<p>This prompt is ready to be used, improved, or customized.</p>
<p>Now, if you list your models with <code>Fabric -l</code>, you should see your new pattern.</p>
<p>To pass some data to Fabric, you can use several methods:</p>
<ul>
<li><p><code>echo "data" | Fabric</code></p>
</li>
<li><p><code>cat my_file.txt | Fabric</code></p>
</li>
<li><p><code>pbpaste | Fabric</code> which will input text you've copied to your clipboard using ctrl+c</p>
</li>
</ul>
<p>To test our new pattern, gather some draft ideas for a blog post and pass them to Fabric with a command like <code>pbpaste | fabric -s -p write_tech_blog</code>.</p>
<p>This should give you pretty good articles that you can use right away or customize and improve yourself (or with other patterns).</p>
<p>If you want something different or more detailed, review the pattern file or regenerate it by changing the input of the initial <em>improve_prompt</em> process.</p>
<p>Crafting prompts is almost an art and definitely an iterative process. To improve your prompt crafting skills, I strongly recommend taking this free course: <a target="_blank" href="https://learn.deeplearning.ai/courses/chatgpt-prompt-eng">https://learn.deeplearning.ai/courses/chatgpt-prompt-eng</a></p>
<h2 id="heading-use-multiple-patterns"><strong>Use multiple patterns</strong></h2>
<p>Another great feature of Fabric is its ability to use the output of one Fabric process as input for another. For example, you could extract wisdom from an article and use that to create a Keynote presentation, like this:</p>
<pre><code class="lang-plaintext">pbpaste | fabric -p extract_wisdom | fabric -s -p create_keynote
</code></pre>
<p>This will obviously be slower because it runs Fabric twice, but I found this concept of data refinement very powerful and full of potential.</p>
<p>Here is a snapshot of the result for this blog post :</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1717760014208/1b94486c-b9a7-4fac-a8e5-a82e6f8a37ce.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-conclusion"><strong>Conclusion</strong></h1>
<p>Fabric and LM Studio offer a powerful combination to seamlessly use the AI platform while extracting the most value from it. By creating custom prompts and patterns, users can fully tailor their interactions with the AI model to suit their needs.</p>
<p>I strongly believe that AI tools are here to extend our capabilities and help us achieve more, faster. These tools have the potential to be as transformative as the industrial revolution, which fundamentally changed the way we work by introducing machines that could perform tasks more efficiently than humans. Similarly, AI will not only replace some jobs but also create entirely new ones that require different skills and competencies.</p>
<p>For now, these tools are still in the early stages and sometimes produce inappropriate or vague content. This is why the output of any AI-powered writing tool should always be reviewed and adapted by humans (for now :)).</p>
<h1 id="heading-key-takeaways"><strong>Key Takeaways</strong></h1>
<ul>
<li><p>Fabric is a Python tool that interacts with API AI models and injects custom prompts called patterns.</p>
</li>
<li><p>Patterns are pre-built templates that can be customised to meet individual needs.</p>
</li>
<li><p>Writing your own pattern can help you tailor your interactions with the AI model.</p>
</li>
<li><p>LM Studio is a free tool that allows users to download and run models locally on their machines.</p>
</li>
</ul>
]]></content:encoded></item></channel></rss>