llm.rb 0.9.0 → 0.9.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 +4 -5
- data/lib/llm/bot/conversable.rb +0 -2
- data/lib/llm/buffer.rb +7 -3
- data/lib/llm/version.rb +1 -1
- data/llm.gemspec +7 -5
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20812e4c8cfc7ebee81190054e7483b00b24e0f0f567f630bfb4dc0ac962193f
|
4
|
+
data.tar.gz: 4ff26fa74520b29da3b6aa10331d5cd618e13d4df53cb9f0c5b7a7691f5fb42e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ed6e3f0426fc0967cb59cc14ae0d0afe552a93e2a29b8d173bf000341b77800ea31ef9088d45a696d353ac0e7f58cc1b3d7f86c3c15d757ae73efb33523b56d
|
7
|
+
data.tar.gz: 136e14863ef92264e270f3b6616a9660298cdc477a2a15db1b89b9360be1ce2be3dde0ee66d97be68d57c5bf68f4f0fc9764657187fbf2ae226f1a5ed6579189
|
data/README.md
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
## About
|
2
2
|
|
3
3
|
llm.rb is a zero-dependency Ruby toolkit for Large Language Models that
|
4
|
-
includes OpenAI, Gemini, Anthropic, DeepSeek, Ollama, and LlamaCpp.
|
5
|
-
|
6
|
-
|
7
|
-
generation.
|
4
|
+
includes OpenAI, Gemini, Anthropic, DeepSeek, Ollama, and LlamaCpp. The
|
5
|
+
toolkit includes full support for chat, streaming, tool calling, audio,
|
6
|
+
images, files, and JSON Schema generation.
|
8
7
|
|
9
8
|
## Features
|
10
9
|
|
11
10
|
#### General
|
12
11
|
- ✅ A single unified interface for multiple providers
|
13
12
|
- 📦 Zero dependencies outside Ruby's standard library
|
14
|
-
- 🚀
|
13
|
+
- 🚀 Efficient API design that minimizes the request count
|
15
14
|
|
16
15
|
#### Chat, Agents
|
17
16
|
- 🧠 Stateless and stateful chat via completions and responses API
|
data/lib/llm/bot/conversable.rb
CHANGED
data/lib/llm/buffer.rb
CHANGED
@@ -23,9 +23,13 @@ module LLM
|
|
23
23
|
# Yields each message in the conversation thread
|
24
24
|
# @raise (see LLM::Provider#complete)
|
25
25
|
# @return [void]
|
26
|
-
def each
|
27
|
-
|
28
|
-
|
26
|
+
def each(...)
|
27
|
+
if block_given?
|
28
|
+
empty! unless @pending.empty?
|
29
|
+
@completed.each { yield(_1) }
|
30
|
+
else
|
31
|
+
enum_for(:each, ...)
|
32
|
+
end
|
29
33
|
end
|
30
34
|
|
31
35
|
##
|
data/lib/llm/version.rb
CHANGED
data/llm.gemspec
CHANGED
@@ -8,11 +8,13 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Antar Azri", "0x1eef"]
|
9
9
|
spec.email = ["azantar@proton.me", "0x1eef@proton.me"]
|
10
10
|
|
11
|
-
spec.summary =
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
spec.summary = <<~SUMMARY
|
12
|
+
llm.rb is a zero-dependency Ruby toolkit for Large Language Models that
|
13
|
+
includes OpenAI, Gemini, Anthropic, DeepSeek, Ollama, and LlamaCpp. The
|
14
|
+
toolkit includes full support for chat, streaming, tool calling, audio,
|
15
|
+
images, files, and JSON Schema generation.
|
16
|
+
SUMMARY
|
17
|
+
|
16
18
|
spec.description = spec.summary
|
17
19
|
spec.homepage = "https://github.com/llmrb/llm"
|
18
20
|
spec.license = "0BSDL"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: llm.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antar Azri
|
@@ -151,9 +151,9 @@ dependencies:
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '2.8'
|
153
153
|
description: llm.rb is a zero-dependency Ruby toolkit for Large Language Models that
|
154
|
-
includes OpenAI, Gemini, Anthropic, DeepSeek, Ollama, and LlamaCpp.
|
155
|
-
|
156
|
-
|
154
|
+
includes OpenAI, Gemini, Anthropic, DeepSeek, Ollama, and LlamaCpp. The toolkit
|
155
|
+
includes full support for chat, streaming, tool calling, audio, images, files, and
|
156
|
+
JSON Schema generation.
|
157
157
|
email:
|
158
158
|
- azantar@proton.me
|
159
159
|
- 0x1eef@proton.me
|
@@ -285,7 +285,7 @@ requirements: []
|
|
285
285
|
rubygems_version: 3.6.8
|
286
286
|
specification_version: 4
|
287
287
|
summary: llm.rb is a zero-dependency Ruby toolkit for Large Language Models that includes
|
288
|
-
OpenAI, Gemini, Anthropic, DeepSeek, Ollama, and LlamaCpp.
|
289
|
-
|
290
|
-
|
288
|
+
OpenAI, Gemini, Anthropic, DeepSeek, Ollama, and LlamaCpp. The toolkit includes
|
289
|
+
full support for chat, streaming, tool calling, audio, images, files, and JSON Schema
|
290
|
+
generation.
|
291
291
|
test_files: []
|