TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: RubyLLM 1.0 – A Beautiful Ruby Way to Work with AI

30 pointsby earcar2 months ago
RubyLLM provides a unified interface to OpenAI, Anthropic, Google, and DeepSeek models with a clean, elegant API that feels like Ruby.<p>What makes it different?<p>Beautiful interfaces:<p><pre><code> chat = RubyLLM.chat embedding = RubyLLM.embed(&quot;Ruby is elegant&quot;) image = RubyLLM.paint(&quot;a sunset over mountains&quot;) </code></pre> Works with multiple providers through one API:<p><pre><code> # Start with GPT chat = RubyLLM.chat(model: &#x27;gpt-4o-mini&#x27;) # Switch to Claude? No problem chat.with_model(&#x27;claude-3-5-sonnet&#x27;) </code></pre> Streaming that makes sense:<p><pre><code> chat.ask &quot;Write a story&quot; do |chunk| print chunk.content # Same chunk format for all providers end </code></pre> Rails integration that just works:<p><pre><code> class Chat &lt; ApplicationRecord acts_as_chat end </code></pre> Tools without the JSON Schema pain:<p><pre><code> class Search &lt; RubyLLM::Tool description &quot;Searches our database&quot; param :query, desc: &quot;The search query&quot; def execute(query:) Document.search(query).map(&amp;:title) end end </code></pre> It supports vision, PDFs, audio, and more - all with minimal dependencies.<p>Website: <a href="https:&#x2F;&#x2F;rubyllm.com" rel="nofollow">https:&#x2F;&#x2F;rubyllm.com</a> GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;crmne&#x2F;ruby_llm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;crmne&#x2F;ruby_llm</a>

10 comments

crucero2 months ago
Really great work - would I be able to use a self-hosted model as well?
评论 #43356465 未加载
zaibatus2 months ago
That&#x27;s great! Starred.
评论 #43356466 未加载
BrettBrettBrett2 months ago
Super cool stuff
评论 #43356468 未加载
steephun2 months ago
Nice one this!
评论 #43356469 未加载
lemoncoffee2 months ago
Nice!
评论 #43356470 未加载
levitano22222 months ago
Epic!
评论 #43356472 未加载
icnosman2 months ago
Very cool
评论 #43356473 未加载
shakthiprasad2 months ago
Nice one
评论 #43356474 未加载
JavierLTo2 months ago
Cool
评论 #43356475 未加载
robknobs2 months ago
yup!!