Unlocking the Power of Large Language Models with Kel: Enhancing Workflow and Productivity
Tags: ai, llm, productivity, python
Published: 2023-12-20 13:38:50

<!-- wp:paragraph -->
<p>If you're not using Large Language Models (LLMs) in your daily work, you're missing out. You can learn, improve, and optimize your developer and testing activities using any LLMs (free or paid). Even this blog article has been grammar checked by the OpenAI GPT-4 model. It is written by me, but improved by an AI. There are thousands of apps available in the marketplace which are built on top of LLM APIs. However, their monthly prices are typically higher than average. It harnesses powerful LLMs at its core. LLM companies charge in cents, but you need to pay in dollars to use those apps. That's why I created my own app to bring your own key to power up the workflow in Command Line Interface.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">What is Kel?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><code>Kel</code> means <code>ask</code> in Tamil. <code><a href="https://kel.qainsights.com/">Kel</a></code> is a simple utility which helps you to connect between your question and the LLM. It takes your questions to the LLM and prints its responses in your terminal. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><a href="https://kel.qainsights.com/">Kel</a> is built using Python and the respective LLM's library. It is free and open source. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Features of Kel</h2>
<!-- /wp:heading -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>CLI based utility </li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Bring your own API key</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Supports OpenAI, Anthropic, Ollama, and Google models.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Supports OpenAI assistant model</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Supports styling configuration</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Displays stats such as response time, tokens, and more.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Displays ~pricing information</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>and more</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:image {"id":17781,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://qainsights.com/wp-content/uploads/2023/12/unDrawPlus_1702252279321_72j05f.png"><img src="https://qainsights.com/wp-content/uploads/2023/12/unDrawPlus_1702252279321_72j05f-726x1024.png" alt="Unlocking the Power of Large Language Models with Kel: Enhancing Workflow and Productivity" class="wp-image-17781"/></a></figure>
<!-- /wp:image -->

<!-- wp:heading -->
<h2 class="wp-block-heading">How to install Kel?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>There are a couple of ways you can install <code><a href="https://kel.qainsights.com/">Kel</a></code>. </p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">pip</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>By using <code>pip</code> it is easy to install <code>Kel</code>. </p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>pip install kel-cli</code></pre>
<!-- /wp:code -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">pipx</h3>
<!-- /wp:heading -->

<!-- wp:code -->
<pre class="wp-block-code"><code>python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install kel-cli</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>Once it is installed, run the below commands to configure the <code>config.toml</code> file.</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code># copy the default config file to current user's home directory
curl -O https://raw.githubusercontent.com/QAInsights/kel/main/config.toml
mkdir -p ~/.kel
mv config.toml ~/.kel/config.toml </code></pre>
<!-- /wp:code -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Demo</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Here is a quick demo of <code>kel</code>.</p>
<!-- /wp:paragraph -->

[![asciicast](https://asciinema.org/a/626190.svg)](https://asciinema.org/a/626190)

<!-- wp:html -->
<script async id="asciicast-626190" src="https://asciinema.org/a/626190.js"></script>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Kel Commands</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Before you ask your questions using <code>kel</code>, you need a valid API key either from OpenAI, Anthropic, or Google. If you want free option, you can spin up https://ollama.ai/ in your local and configure the endpoint in <code>config.toml</code></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Once the API key setup is done, issue the below commands.</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>kel -v</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>To view the help, issue</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>kel -h</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>Now, let us ask some questions to the OpenAI model.</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>kel "git command to blame"</code></pre>
<!-- /wp:code -->

<!-- wp:image {"id":17776,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://qainsights.com/wp-content/uploads/2023/12/image-2.png"><img src="https://qainsights.com/wp-content/uploads/2023/12/image-2-1024x221.png" alt="Kel git command" class="wp-image-17776"/></a></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>By default, <code>kel</code> answers the questions which are relevant to software engineering e.g.</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>kel "What is the mass of the moon?"</code></pre>
<!-- /wp:code -->

<!-- wp:image {"id":17777,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://qainsights.com/wp-content/uploads/2023/12/image-3.png"><img src="https://qainsights.com/wp-content/uploads/2023/12/image-3-1024x223.png" alt="Kel science question" class="wp-image-17777"/></a></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>But you can change this behavior by adding your own prompt e.g.</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>kel "What is the mass of the moon?" -p "You are a physicist"</code></pre>
<!-- /wp:code -->

<!-- wp:image {"id":17778,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://qainsights.com/wp-content/uploads/2023/12/image-4.png"><img src="https://qainsights.com/wp-content/uploads/2023/12/image-4-1024x222.png" alt="Kel change prompt" class="wp-image-17778"/></a></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>This is the magic of <code>kel</code>. It is flexible and customizable. It has umpteen options to customize based on your needs. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>You can also change the LLM and its model on the fly. Let us ask the same question to Anthropic's Claude model. </p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":17779,"sizeSlug":"large","linkDestination":"media"} -->
<figure class="wp-block-image size-large"><a href="https://qainsights.com/wp-content/uploads/2023/12/image-5.png"><img src="https://qainsights.com/wp-content/uploads/2023/12/image-5-1024x195.png" alt="Kel change model and company" class="wp-image-17779"/></a></figure>
<!-- /wp:image -->

<!-- wp:heading -->
<h2 class="wp-block-heading">More Kel</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><code>Kel</code> also supports the OpenAI Assistant model where you can upload a file and ask questions about that. It is an awesome feature for performance engineers who need to analyze the raw results by using AI magic. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>I am saving this feature for my next blog article. So what is next?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Based on the user's feedback, I will integrate more prominent models into Kel so that you can improve your workflow. Please let me know in the comments or in GitHub <a href="https://github.com/qainsights/kel">issues</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Conclusion</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Using Large Language Models (LLMs) in your daily work can greatly improve and streamline your developer and testing tasks. Kel is a free and open-source utility that allows you to connect with LLMs using your own API key. It offers a command-line interface, supports various LLM models, and provides customization options. Kel's flexibility and convenience make it a valuable tool for improving workflow and productivity.</p>
<!-- /wp:paragraph -->