liter_llm 1.10.1-x86_64-linux → 1.11.0-x86_64-linux
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 +6 -6
- data/lib/liter_llm/native.rb +29 -2
- data/lib/liter_llm/version.rb +2 -2
- data/lib/liter_llm.rb +1 -1
- data/lib/liter_llm_rb.so +0 -0
- data/sig/types.rbs +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dae4d4ba4ffbd9d919a609664e7a020770aa9bfd05e95b2b55b3a67344f54254
|
|
4
|
+
data.tar.gz: 6f7b6df67c80756f5c10a629ef4ff15b62de07ebd181416b580a0a6910feeccd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 392bbb49d5d58c5322b38e4187ed74fbe996de1dbf7f21d310beaa88bbb34e7ccc7b87caec020df1f3d0751093fe5b53ec509be8419caa3567fe4a67481e8df9
|
|
7
|
+
data.tar.gz: 54b6f700414b3cb17f90bbd92569838305a0064b017302e737101e61af819b340630eabe58902d5840a43474fd2b67d9245ab88119e6d906f064931c2d8733d9
|
data/README.md
CHANGED
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
</a>
|
|
80
80
|
</div>
|
|
81
81
|
|
|
82
|
-
Universal LLM API client for Ruby. Access
|
|
82
|
+
Universal LLM API client for Ruby. Access 165 LLM providers through a single interface with idiomatic Ruby API and native performance.
|
|
83
83
|
|
|
84
84
|
## What This Package Provides
|
|
85
85
|
|
|
@@ -168,7 +168,7 @@ puts
|
|
|
168
168
|
|
|
169
169
|
## Features
|
|
170
170
|
|
|
171
|
-
### Supported Providers (
|
|
171
|
+
### Supported Providers (165)
|
|
172
172
|
|
|
173
173
|
Route to any provider using the `provider/model` prefix convention:
|
|
174
174
|
|
|
@@ -188,7 +188,7 @@ Route to any provider using the `provider/model` prefix convention:
|
|
|
188
188
|
|
|
189
189
|
### Key Capabilities
|
|
190
190
|
|
|
191
|
-
- **Provider Routing** -- Single client for
|
|
191
|
+
- **Provider Routing** -- Single client for 165 LLM providers via `provider/model` prefix
|
|
192
192
|
- **Local LLMs** — Connect to locally-hosted models via Ollama, LM Studio, vLLM, llama.cpp, and other local inference servers
|
|
193
193
|
- **Unified API** -- Consistent `chat`, `chat_stream`, `embeddings`, `list_models` interface
|
|
194
194
|
- **Streaming** -- Real-time token streaming via `chat_stream`
|
|
@@ -209,7 +209,7 @@ Built on a compiled Rust core for speed and safety:
|
|
|
209
209
|
|
|
210
210
|
## Provider Routing
|
|
211
211
|
|
|
212
|
-
Route to
|
|
212
|
+
Route to 165 providers using the `provider/model` prefix convention:
|
|
213
213
|
|
|
214
214
|
```text
|
|
215
215
|
openai/gpt-4o
|
|
@@ -244,7 +244,7 @@ To use the MCP server inside a coding agent, install the **liter-llm plugin** fr
|
|
|
244
244
|
|
|
245
245
|
- **[Documentation](https://docs.liter-llm.xberg.io)** -- Full docs and API reference
|
|
246
246
|
- **[GitHub Repository](https://github.com/xberg-io/liter-llm)** -- Source, issues, and discussions
|
|
247
|
-
- **[Provider Registry](https://github.com/xberg-io/liter-llm/blob/main/schemas/providers.json)** --
|
|
247
|
+
- **[Provider Registry](https://github.com/xberg-io/liter-llm/blob/main/schemas/providers.json)** -- 165 supported providers
|
|
248
248
|
|
|
249
249
|
## Part of Xberg.io
|
|
250
250
|
|
|
@@ -252,7 +252,7 @@ To use the MCP server inside a coding agent, install the **liter-llm plugin** fr
|
|
|
252
252
|
- [Xberg Enterprise](https://github.com/xberg-io/xberg-enterprise) — managed extraction API with SDKs, dashboards, and observability.
|
|
253
253
|
- [crawlberg](https://github.com/xberg-io/crawlberg) — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
|
|
254
254
|
- [html-to-markdown](https://github.com/xberg-io/html-to-markdown) — fast, lossless HTML→Markdown engine.
|
|
255
|
-
- [liter-llm](https://github.com/xberg-io/liter-llm) — universal LLM API client with native bindings for 14 languages and
|
|
255
|
+
- [liter-llm](https://github.com/xberg-io/liter-llm) — universal LLM API client with native bindings for 14 languages and 165 providers.
|
|
256
256
|
- [tree-sitter-language-pack](https://github.com/xberg-io/tree-sitter-language-pack) — tree-sitter grammars and code-intelligence primitives.
|
|
257
257
|
- [alef](https://github.com/xberg-io/alef) — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.
|
|
258
258
|
- [Discord](https://discord.gg/xt9WY3GnKR) — community, roadmap, announcements.
|
data/lib/liter_llm/native.rb
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:c7947a41084f71e69944233535fbeda5cd13b37144078f1895b6b57a7802d3fe
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
require "json"
|
|
8
8
|
require "sorbet-runtime"
|
|
9
|
-
require "
|
|
9
|
+
require "rbconfig"
|
|
10
|
+
|
|
11
|
+
extension_name = "liter_llm_rb"
|
|
12
|
+
# Ruby may expose more than one shared-library extension via DLEXT/DLEXT2.
|
|
13
|
+
dlexts = [RbConfig::CONFIG["DLEXT"], RbConfig::CONFIG["DLEXT2"]].compact.uniq
|
|
14
|
+
ruby_abi = RbConfig::CONFIG.fetch("ruby_version")
|
|
15
|
+
|
|
16
|
+
library_candidates = dlexts.flat_map do |dlext|
|
|
17
|
+
[
|
|
18
|
+
File.join(__dir__, "..", extension_name, ruby_abi, "#{extension_name}.#{dlext}"),
|
|
19
|
+
File.join(__dir__, "..", extension_name, ruby_abi, "lib#{extension_name}.#{dlext}"),
|
|
20
|
+
File.join(__dir__, "..", "#{extension_name}.#{dlext}"),
|
|
21
|
+
File.join(__dir__, "..", "lib#{extension_name}.#{dlext}"),
|
|
22
|
+
]
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
expanded_candidates = library_candidates.map { |path| File.expand_path(path) }
|
|
26
|
+
native_extension = expanded_candidates.find { |path| File.file?(path) }
|
|
27
|
+
|
|
28
|
+
unless native_extension
|
|
29
|
+
raise(
|
|
30
|
+
LoadError,
|
|
31
|
+
"cannot find #{extension_name} native extension for Ruby ABI #{ruby_abi}; " \
|
|
32
|
+
"searched: #{expanded_candidates.join(", ")}"
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
require native_extension
|
|
10
37
|
module LiterLlm
|
|
11
38
|
# A chat message in a conversation.
|
|
12
39
|
module Message
|
data/lib/liter_llm/version.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:c7947a41084f71e69944233535fbeda5cd13b37144078f1895b6b57a7802d3fe
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
module LiterLlm
|
|
8
8
|
## The version string for this package.
|
|
9
|
-
VERSION = "1.
|
|
9
|
+
VERSION = "1.11.0"
|
|
10
10
|
end
|
data/lib/liter_llm.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:c7947a41084f71e69944233535fbeda5cd13b37144078f1895b6b57a7802d3fe
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
data/lib/liter_llm_rb.so
CHANGED
|
Binary file
|
data/sig/types.rbs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:c7947a41084f71e69944233535fbeda5cd13b37144078f1895b6b57a7802d3fe
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
|
|
@@ -50,10 +50,12 @@ module LiterLlm
|
|
|
50
50
|
attr_accessor tool_calls: Array[ToolCall]?
|
|
51
51
|
attr_accessor refusal: String?
|
|
52
52
|
attr_accessor function_call: FunctionCall?
|
|
53
|
+
attr_accessor reasoning_content: String?
|
|
53
54
|
|
|
54
|
-
def initialize: (?content: AssistantContent, ?name: String, ?tool_calls: Array[ToolCall], ?refusal: String, ?function_call: FunctionCall) -> void
|
|
55
|
+
def initialize: (?content: AssistantContent, ?name: String, ?tool_calls: Array[ToolCall], ?refusal: String, ?function_call: FunctionCall, ?reasoning_content: String) -> void
|
|
55
56
|
def text: () -> String?
|
|
56
57
|
def refusal_text: () -> String?
|
|
58
|
+
def reasoning_text: () -> String?
|
|
57
59
|
def output_images: () -> Array[ImageUrl]
|
|
58
60
|
def output_audio: () -> Array[AudioContent]
|
|
59
61
|
end
|
|
@@ -229,8 +231,9 @@ module LiterLlm
|
|
|
229
231
|
attr_accessor tool_calls: Array[StreamToolCall]?
|
|
230
232
|
attr_accessor function_call: StreamFunctionCall?
|
|
231
233
|
attr_accessor refusal: String?
|
|
234
|
+
attr_accessor reasoning_content: String?
|
|
232
235
|
|
|
233
|
-
def initialize: (?role: String, ?content: String, ?tool_calls: Array[StreamToolCall], ?function_call: StreamFunctionCall, ?refusal: String) -> void
|
|
236
|
+
def initialize: (?role: String, ?content: String, ?tool_calls: Array[StreamToolCall], ?function_call: StreamFunctionCall, ?refusal: String, ?reasoning_content: String) -> void
|
|
234
237
|
end
|
|
235
238
|
|
|
236
239
|
class StreamToolCall
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: liter_llm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.11.0
|
|
5
5
|
platform: x86_64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Na'aman Hirschfeld
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sorbet-runtime
|