Hi everyone,
I'd like to share and announce the release of llm.rb v2.1.0.
The source is available at https://github.com/llmrb/llm.rb
> What is llm.rb?
llm.rb is a zero-dependency Ruby toolkit for Large Language Models that
includes OpenAI, Gemini, Anthropic, xAI (Grok), zAI, DeepSeek, Ollama,
and LlamaCpp. The toolkit includes full support for chat, streaming,
tool calling, audio, images, files, and structured outputs.
> Example
A simple chatbot that maintains a conversation and streams responses in
real-time:
#!/usr/bin/env ruby
require "llm"
llm = LLM.openai(key: ENV["KEY"])
bot = LLM::Bot.new(llm, stream: $stdout)
loop do
print "> "
bot.chat(gets)
print "\n"
end
#ruby