diff --git a/feeds/.atom.xml b/feeds/.atom.xml index f4fce86..5010704 100644 --- a/feeds/.atom.xml +++ b/feeds/.atom.xml @@ -1,8 +1,9 @@ Alexis Métaireauhttps://blog.notmyidea.org/2023-09-27T00:00:00+02:00llm command-line tips2023-09-27T00:00:00+02:002023-09-27T00:00:00+02:00tag:blog.notmyidea.org,2023-09-27:/llm-command-line-tips.html<p>I&#8217;m using <a href="https://llm.datasette.io">llm</a> more and more, and today I had to find back prompts I used in the past. Here is a command I&#8217;ve been using, which allows me to filter the results based on what I want. It leverages <a href="https://sqlutils.datasette.io">sql-utils</a>, a cli tool which is able to …</p><p>I&#8217;m using <a href="https://llm.datasette.io">llm</a> more and more, and today I had to find back prompts I used in the past. Here is a command I&#8217;ve been using, which allows me to filter the results based on what I want. It leverages <a href="https://sqlutils.datasette.io">sql-utils</a>, a cli tool which is able to talk to a <span class="caps">SQLITE</span> database and answer in json, and <a href="https://github.com/jqlang/jq">jq</a> a command-line tool capable of doing requests for&nbsp;json.</p> <p>All in all, it&#8217;s pretty satisfying to use. I finally got a simple way to query databases! I&#8217;m also using <a href="https://github.com/charmbracelet/glow">glow</a>, which is capable of transforming markdown into a better version on the&nbsp;terminal.</p> -<p><span class="dquo">&#8220;</span>`bash -sqlite-utils &#8220;$(llm logs path)&#8221; &#8220;<span class="caps">SELECT</span> * <span class="caps">FROM</span> responses <span class="caps">WHERE</span> prompt <span class="caps">LIKE</span> &#8216;%search%&#8217;&#8221; | jq &#8216;.[].response&#8217; -r | glow&nbsp;&#8220;&#8220;</p> +<div class="highlight"><pre><span></span><code>sqlite-utils<span class="w"> </span><span class="s2">&quot;</span><span class="k">$(</span>llm<span class="w"> </span>logs<span class="w"> </span>path<span class="k">)</span><span class="s2">&quot;</span><span class="w"> </span><span class="s2">&quot;SELECT * FROM responses WHERE prompt LIKE &#39;%search%&#39;&quot;</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>jq<span class="w"> </span><span class="s1">&#39;.[].response&#39;</span><span class="w"> </span>-r<span class="w"> </span><span class="p">|</span><span class="w"> </span>glow +</code></pre></div> + <p>Which got me a colored response&nbsp;:-)</p>Setting up a IRC Bouncer with ZNC2023-09-27T00:00:00+02:002023-09-27T00:00:00+02:00tag:blog.notmyidea.org,2023-09-27:/setting-up-a-irc-bouncer-with-znc.html<p>It&#8217;s been a while since I&#8217;ve used <span class="caps">IRC</span>, but I needed to connect to it today to discuss around <a href="https://docs.peewee-orm.com">Peewee</a>.</p> <p>The main issue with <span class="caps">IRC</span> is that you need to be connected to see the answer, and to get the context of the conversation. Unless&#8230; you set up …</p><p>It&#8217;s been a while since I&#8217;ve used <span class="caps">IRC</span>, but I needed to connect to it today to discuss around <a href="https://docs.peewee-orm.com">Peewee</a>.</p> <p>The main issue with <span class="caps">IRC</span> is that you need to be connected to see the answer, and to get the context of the conversation. Unless&#8230; you set up a&nbsp;bouncer.</p> diff --git a/feeds/all-en.atom.xml b/feeds/all-en.atom.xml index a0b7894..2d42112 100644 --- a/feeds/all-en.atom.xml +++ b/feeds/all-en.atom.xml @@ -1,8 +1,9 @@ Alexis Métaireauhttps://blog.notmyidea.org/2023-09-27T00:00:00+02:00llm command-line tips2023-09-27T00:00:00+02:002023-09-27T00:00:00+02:00tag:blog.notmyidea.org,2023-09-27:/llm-command-line-tips.html<p>I&#8217;m using <a href="https://llm.datasette.io">llm</a> more and more, and today I had to find back prompts I used in the past. Here is a command I&#8217;ve been using, which allows me to filter the results based on what I want. It leverages <a href="https://sqlutils.datasette.io">sql-utils</a>, a cli tool which is able to …</p><p>I&#8217;m using <a href="https://llm.datasette.io">llm</a> more and more, and today I had to find back prompts I used in the past. Here is a command I&#8217;ve been using, which allows me to filter the results based on what I want. It leverages <a href="https://sqlutils.datasette.io">sql-utils</a>, a cli tool which is able to talk to a <span class="caps">SQLITE</span> database and answer in json, and <a href="https://github.com/jqlang/jq">jq</a> a command-line tool capable of doing requests for&nbsp;json.</p> <p>All in all, it&#8217;s pretty satisfying to use. I finally got a simple way to query databases! I&#8217;m also using <a href="https://github.com/charmbracelet/glow">glow</a>, which is capable of transforming markdown into a better version on the&nbsp;terminal.</p> -<p><span class="dquo">&#8220;</span>`bash -sqlite-utils &#8220;$(llm logs path)&#8221; &#8220;<span class="caps">SELECT</span> * <span class="caps">FROM</span> responses <span class="caps">WHERE</span> prompt <span class="caps">LIKE</span> &#8216;%search%&#8217;&#8221; | jq &#8216;.[].response&#8217; -r | glow&nbsp;&#8220;&#8220;</p> +<div class="highlight"><pre><span></span><code>sqlite-utils<span class="w"> </span><span class="s2">&quot;</span><span class="k">$(</span>llm<span class="w"> </span>logs<span class="w"> </span>path<span class="k">)</span><span class="s2">&quot;</span><span class="w"> </span><span class="s2">&quot;SELECT * FROM responses WHERE prompt LIKE &#39;%search%&#39;&quot;</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>jq<span class="w"> </span><span class="s1">&#39;.[].response&#39;</span><span class="w"> </span>-r<span class="w"> </span><span class="p">|</span><span class="w"> </span>glow +</code></pre></div> + <p>Which got me a colored response&nbsp;:-)</p>Setting up a IRC Bouncer with ZNC2023-09-27T00:00:00+02:002023-09-27T00:00:00+02:00tag:blog.notmyidea.org,2023-09-27:/setting-up-a-irc-bouncer-with-znc.html<p>It&#8217;s been a while since I&#8217;ve used <span class="caps">IRC</span>, but I needed to connect to it today to discuss around <a href="https://docs.peewee-orm.com">Peewee</a>.</p> <p>The main issue with <span class="caps">IRC</span> is that you need to be connected to see the answer, and to get the context of the conversation. Unless&#8230; you set up …</p><p>It&#8217;s been a while since I&#8217;ve used <span class="caps">IRC</span>, but I needed to connect to it today to discuss around <a href="https://docs.peewee-orm.com">Peewee</a>.</p> <p>The main issue with <span class="caps">IRC</span> is that you need to be connected to see the answer, and to get the context of the conversation. Unless&#8230; you set up a&nbsp;bouncer.</p> diff --git a/feeds/all.atom.xml b/feeds/all.atom.xml index dced280..114d6f8 100644 --- a/feeds/all.atom.xml +++ b/feeds/all.atom.xml @@ -1,8 +1,9 @@ Alexis Métaireauhttps://blog.notmyidea.org/2023-09-27T00:00:00+02:00llm command-line tips2023-09-27T00:00:00+02:002023-09-27T00:00:00+02:00tag:blog.notmyidea.org,2023-09-27:/llm-command-line-tips.html<p>I&#8217;m using <a href="https://llm.datasette.io">llm</a> more and more, and today I had to find back prompts I used in the past. Here is a command I&#8217;ve been using, which allows me to filter the results based on what I want. It leverages <a href="https://sqlutils.datasette.io">sql-utils</a>, a cli tool which is able to …</p><p>I&#8217;m using <a href="https://llm.datasette.io">llm</a> more and more, and today I had to find back prompts I used in the past. Here is a command I&#8217;ve been using, which allows me to filter the results based on what I want. It leverages <a href="https://sqlutils.datasette.io">sql-utils</a>, a cli tool which is able to talk to a <span class="caps">SQLITE</span> database and answer in json, and <a href="https://github.com/jqlang/jq">jq</a> a command-line tool capable of doing requests for&nbsp;json.</p> <p>All in all, it&#8217;s pretty satisfying to use. I finally got a simple way to query databases! I&#8217;m also using <a href="https://github.com/charmbracelet/glow">glow</a>, which is capable of transforming markdown into a better version on the&nbsp;terminal.</p> -<p><span class="dquo">&#8220;</span>`bash -sqlite-utils &#8220;$(llm logs path)&#8221; &#8220;<span class="caps">SELECT</span> * <span class="caps">FROM</span> responses <span class="caps">WHERE</span> prompt <span class="caps">LIKE</span> &#8216;%search%&#8217;&#8221; | jq &#8216;.[].response&#8217; -r | glow&nbsp;&#8220;&#8220;</p> +<div class="highlight"><pre><span></span><code>sqlite-utils<span class="w"> </span><span class="s2">&quot;</span><span class="k">$(</span>llm<span class="w"> </span>logs<span class="w"> </span>path<span class="k">)</span><span class="s2">&quot;</span><span class="w"> </span><span class="s2">&quot;SELECT * FROM responses WHERE prompt LIKE &#39;%search%&#39;&quot;</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>jq<span class="w"> </span><span class="s1">&#39;.[].response&#39;</span><span class="w"> </span>-r<span class="w"> </span><span class="p">|</span><span class="w"> </span>glow +</code></pre></div> + <p>Which got me a colored response&nbsp;:-)</p>Setting up a IRC Bouncer with ZNC2023-09-27T00:00:00+02:002023-09-27T00:00:00+02:00tag:blog.notmyidea.org,2023-09-27:/setting-up-a-irc-bouncer-with-znc.html<p>It&#8217;s been a while since I&#8217;ve used <span class="caps">IRC</span>, but I needed to connect to it today to discuss around <a href="https://docs.peewee-orm.com">Peewee</a>.</p> <p>The main issue with <span class="caps">IRC</span> is that you need to be connected to see the answer, and to get the context of the conversation. Unless&#8230; you set up …</p><p>It&#8217;s been a while since I&#8217;ve used <span class="caps">IRC</span>, but I needed to connect to it today to discuss around <a href="https://docs.peewee-orm.com">Peewee</a>.</p> <p>The main issue with <span class="caps">IRC</span> is that you need to be connected to see the answer, and to get the context of the conversation. Unless&#8230; you set up a&nbsp;bouncer.</p> diff --git a/feeds/code.atom.xml b/feeds/code.atom.xml index 1900ada..8428188 100644 --- a/feeds/code.atom.xml +++ b/feeds/code.atom.xml @@ -1,8 +1,9 @@ Alexis Métaireau - codehttps://blog.notmyidea.org/2023-09-27T00:00:00+02:00llm command-line tips2023-09-27T00:00:00+02:002023-09-27T00:00:00+02:00tag:blog.notmyidea.org,2023-09-27:/llm-command-line-tips.html<p>I&#8217;m using <a href="https://llm.datasette.io">llm</a> more and more, and today I had to find back prompts I used in the past. Here is a command I&#8217;ve been using, which allows me to filter the results based on what I want. It leverages <a href="https://sqlutils.datasette.io">sql-utils</a>, a cli tool which is able to …</p><p>I&#8217;m using <a href="https://llm.datasette.io">llm</a> more and more, and today I had to find back prompts I used in the past. Here is a command I&#8217;ve been using, which allows me to filter the results based on what I want. It leverages <a href="https://sqlutils.datasette.io">sql-utils</a>, a cli tool which is able to talk to a <span class="caps">SQLITE</span> database and answer in json, and <a href="https://github.com/jqlang/jq">jq</a> a command-line tool capable of doing requests for&nbsp;json.</p> <p>All in all, it&#8217;s pretty satisfying to use. I finally got a simple way to query databases! I&#8217;m also using <a href="https://github.com/charmbracelet/glow">glow</a>, which is capable of transforming markdown into a better version on the&nbsp;terminal.</p> -<p><span class="dquo">&#8220;</span>`bash -sqlite-utils &#8220;$(llm logs path)&#8221; &#8220;<span class="caps">SELECT</span> * <span class="caps">FROM</span> responses <span class="caps">WHERE</span> prompt <span class="caps">LIKE</span> &#8216;%search%&#8217;&#8221; | jq &#8216;.[].response&#8217; -r | glow&nbsp;&#8220;&#8220;</p> +<div class="highlight"><pre><span></span><code>sqlite-utils<span class="w"> </span><span class="s2">&quot;</span><span class="k">$(</span>llm<span class="w"> </span>logs<span class="w"> </span>path<span class="k">)</span><span class="s2">&quot;</span><span class="w"> </span><span class="s2">&quot;SELECT * FROM responses WHERE prompt LIKE &#39;%search%&#39;&quot;</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>jq<span class="w"> </span><span class="s1">&#39;.[].response&#39;</span><span class="w"> </span>-r<span class="w"> </span><span class="p">|</span><span class="w"> </span>glow +</code></pre></div> + <p>Which got me a colored response&nbsp;:-)</p>Setting up a IRC Bouncer with ZNC2023-09-27T00:00:00+02:002023-09-27T00:00:00+02:00tag:blog.notmyidea.org,2023-09-27:/setting-up-a-irc-bouncer-with-znc.html<p>It&#8217;s been a while since I&#8217;ve used <span class="caps">IRC</span>, but I needed to connect to it today to discuss around <a href="https://docs.peewee-orm.com">Peewee</a>.</p> <p>The main issue with <span class="caps">IRC</span> is that you need to be connected to see the answer, and to get the context of the conversation. Unless&#8230; you set up …</p><p>It&#8217;s been a while since I&#8217;ve used <span class="caps">IRC</span>, but I needed to connect to it today to discuss around <a href="https://docs.peewee-orm.com">Peewee</a>.</p> <p>The main issue with <span class="caps">IRC</span> is that you need to be connected to see the answer, and to get the context of the conversation. Unless&#8230; you set up a&nbsp;bouncer.</p> diff --git a/llm-command-line-tips.html b/llm-command-line-tips.html index e25c27b..62defe2 100644 --- a/llm-command-line-tips.html +++ b/llm-command-line-tips.html @@ -34,8 +34,9 @@

I’m using llm more and more, and today I had to find back prompts I used in the past. Here is a command I’ve been using, which allows me to filter the results based on what I want. It leverages sql-utils, a cli tool which is able to talk to a SQLITE database and answer in json, and jq a command-line tool capable of doing requests for json.

All in all, it’s pretty satisfying to use. I finally got a simple way to query databases! I’m also using glow, which is capable of transforming markdown into a better version on the terminal.

-

`bash -sqlite-utils “$(llm logs path)” “SELECT * FROM responses WHERE prompt LIKE ‘%search%’” | jq ‘.[].response’ -r | glow ““

+
sqlite-utils "$(llm logs path)" "SELECT * FROM responses WHERE prompt LIKE '%search%'" | jq '.[].response' -r | glow
+
+

Which got me a colored response :-)

#python, #llm, #bash, #sqlite - Posté dans la catégorie code