<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ruby on Uday K</title><link>https://uday.dev/tags/ruby/</link><description>Recent content in Ruby on Uday K</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 26 Mar 2025 18:12:39 -0400</lastBuildDate><atom:link href="https://uday.dev/tags/ruby/index.xml" rel="self" type="application/rss+xml"/><item><title>fast-deepseek: Building a Lightweight DeepSeek Client for Ruby</title><link>https://uday.dev/posts/fast-deepseek/</link><pubDate>Wed, 26 Mar 2025 18:12:39 -0400</pubDate><guid>https://uday.dev/posts/fast-deepseek/</guid><description>&lt;p&gt;AI APIs have become remarkably easy to call.&lt;/p&gt;&#10;&lt;p&gt;The hard part isn&amp;rsquo;t sending an HTTP request. It&amp;rsquo;s deciding how much abstraction you actually need.&lt;/p&gt;&#10;&lt;p&gt;When I started experimenting with DeepSeek from Ruby, I didn&amp;rsquo;t want an AI framework, an agent abstraction, or a large dependency tree. I wanted this:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ruby" data-lang="ruby"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;client &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;FastDeepseek&lt;/span&gt;&lt;span style="color:#f92672"&gt;::&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;Client&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;new(&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;api_key&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;ENV&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;fetch(&lt;span style="color:#e6db74"&gt;&amp;#34;DEEPSEEK_API_KEY&amp;#34;&lt;/span&gt;)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;response &lt;span style="color:#f92672"&gt;=&lt;/span&gt; client&lt;span style="color:#f92672"&gt;.&lt;/span&gt;chat(&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Explain Ruby blocks in simple terms&amp;#34;&lt;/span&gt;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;model&lt;/span&gt;: &lt;span style="color:#e6db74"&gt;&amp;#34;deepseek-chat&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;)&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That idea became &lt;a href="https://rubygems.org/gems/fast-deepseek"&gt;fast-deepseek on RubyGems&lt;/a&gt; and &lt;a href="https://github.com/your-handle/fast-deepseek"&gt;fast-deepseek on GitHub&lt;/a&gt; — a lightweight Ruby client for the DeepSeek API.&lt;/p&gt;</description></item></channel></rss>