ruby_llm 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +13 -9
- data/lib/ruby_llm/active_record/acts_as.rb +1 -0
- data/lib/ruby_llm/aliases.json +8 -0
- data/lib/ruby_llm/configuration.rb +1 -0
- data/lib/ruby_llm/models.json +979 -839
- data/lib/ruby_llm/providers/anthropic/tools.rb +5 -4
- data/lib/ruby_llm/providers/bedrock/streaming/prelude_handling.rb +3 -3
- data/lib/ruby_llm/providers/openai/capabilities.rb +4 -1
- data/lib/ruby_llm/providers/openai/chat.rb +12 -8
- data/lib/ruby_llm/tool.rb +8 -8
- data/lib/ruby_llm/version.rb +1 -1
- data/lib/ruby_llm.rb +1 -1
- data/lib/tasks/models_docs.rake +13 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2287ea41c7591e593a315a35fd34ef8e32968c1b7337042c0b08338caeda784
|
4
|
+
data.tar.gz: 55a2690e1faa46d9ecdda3e8115ae64549be8d52c80fb5ffdb2aadd6fa8887dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d5c7d2b3b73f289bdad5c5faac487a03221101302567a1d36b073de84e97e3650cc4d103ce6f9e641659c0ecc69484593535ed964b933f7d14b19b5dce34e81
|
7
|
+
data.tar.gz: 1515124ad74198461fdbc8105f7173392df7bee2038c701ad85d6da258107bb3ddd366878fa140bd5de354b41dfe8abc5887a78adf2c7cb3beb0cf6caa64f764
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@
|
|
37
37
|
|
38
38
|
Every AI provider comes with its own client library, its own response format, its own conventions for streaming, and its own way of handling errors. Want to use multiple providers? Prepare to juggle incompatible APIs and bloated dependencies.
|
39
39
|
|
40
|
-
RubyLLM fixes all that. One beautiful API for everything. One consistent format. Minimal dependencies — just Faraday and
|
40
|
+
RubyLLM fixes all that. One beautiful API for everything. One consistent format. Minimal dependencies — just Faraday, Zeitwerk, and Marcel. Because working with AI should be a joy, not a chore.
|
41
41
|
|
42
42
|
## What makes it great
|
43
43
|
|
@@ -46,14 +46,14 @@ RubyLLM fixes all that. One beautiful API for everything. One consistent format.
|
|
46
46
|
chat = RubyLLM.chat
|
47
47
|
chat.ask "What's the best way to learn Ruby?"
|
48
48
|
|
49
|
-
# Analyze images
|
50
|
-
chat.ask "What's in this image?", with:
|
49
|
+
# Analyze images, audio, documents, and text files
|
50
|
+
chat.ask "What's in this image?", with: "ruby_conf.jpg"
|
51
|
+
chat.ask "Describe this meeting", with: "meeting.wav"
|
52
|
+
chat.ask "Summarize this document", with: "contract.pdf"
|
53
|
+
chat.ask "Explain this code", with: "app.rb"
|
51
54
|
|
52
|
-
#
|
53
|
-
chat.ask "
|
54
|
-
|
55
|
-
# Analyze documents
|
56
|
-
chat.ask "Summarize this document", with: { pdf: "contract.pdf" }
|
55
|
+
# Multiple files at once - types automatically detected
|
56
|
+
chat.ask "Analyze these files", with: ["diagram.png", "report.pdf", "notes.txt"]
|
57
57
|
|
58
58
|
# Stream responses in real-time
|
59
59
|
chat.ask "Tell me a story about a Ruby programmer" do |chunk|
|
@@ -90,7 +90,7 @@ chat.with_tool(Weather).ask "What's the weather in Berlin? (52.5200, 13.4050)"
|
|
90
90
|
* 💬 **Unified Chat:** Converse with models from OpenAI, Anthropic, Gemini, Bedrock, OpenRouter, DeepSeek, Ollama, or any OpenAI-compatible API using `RubyLLM.chat`.
|
91
91
|
* 👁️ **Vision:** Analyze images within chats.
|
92
92
|
* 🔊 **Audio:** Transcribe and understand audio content.
|
93
|
-
* 📄 **
|
93
|
+
* 📄 **Document Analysis:** Extract information from PDFs, text files, and other documents.
|
94
94
|
* 🖼️ **Image Generation:** Create images with `RubyLLM.paint`.
|
95
95
|
* 📊 **Embeddings:** Generate text embeddings for vector search with `RubyLLM.embed`.
|
96
96
|
* 🔧 **Tools (Function Calling):** Let AI models call your Ruby code using `RubyLLM::Tool`.
|
@@ -143,6 +143,10 @@ end
|
|
143
143
|
# Now interacting with a Chat record persists the conversation:
|
144
144
|
chat_record = Chat.create!(model_id: "gpt-4.1-nano")
|
145
145
|
chat_record.ask("Explain Active Record callbacks.") # User & Assistant messages saved
|
146
|
+
|
147
|
+
# Works seamlessly with file attachments - types automatically detected
|
148
|
+
chat_record.ask("What's in this file?", with: "report.pdf")
|
149
|
+
chat_record.ask("Analyze these", with: ["image.jpg", "data.csv", "notes.txt"])
|
146
150
|
```
|
147
151
|
Check the [Rails Integration Guide](https://rubyllm.com/guides/rails) for more.
|
148
152
|
|
data/lib/ruby_llm/aliases.json
CHANGED
@@ -73,6 +73,10 @@
|
|
73
73
|
"gemini": "gemini-2.5-pro-exp-03-25",
|
74
74
|
"openrouter": "google/gemini-2.5-pro-exp-03-25"
|
75
75
|
},
|
76
|
+
"gemini-2.5-pro-preview-05-06": {
|
77
|
+
"gemini": "gemini-2.5-pro-preview-05-06",
|
78
|
+
"openrouter": "google/gemini-2.5-pro-preview-05-06"
|
79
|
+
},
|
76
80
|
"gemma-3-12b-it": {
|
77
81
|
"gemini": "gemma-3-12b-it",
|
78
82
|
"openrouter": "google/gemma-3-12b-it"
|
@@ -201,6 +205,10 @@
|
|
201
205
|
"openai": "o3-mini",
|
202
206
|
"openrouter": "openai/o3-mini"
|
203
207
|
},
|
208
|
+
"o3-pro": {
|
209
|
+
"openai": "o3-pro",
|
210
|
+
"openrouter": "openai/o3-pro"
|
211
|
+
},
|
204
212
|
"o4-mini": {
|
205
213
|
"openai": "o4-mini",
|
206
214
|
"openrouter": "openai/o4-mini"
|