liter_llm 2.1.2 → 2.1.4
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 +7 -7
- data/ext/liter_llm_rb/native/Cargo.lock +35 -35
- data/ext/liter_llm_rb/native/Cargo.toml +3 -3
- data/ext/liter_llm_rb/src/lib.rs +14 -6
- data/lib/liter_llm/version.rb +2 -2
- data/sig/types.rbs +26 -25
- 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: bf6805425f104609ae273d266f479caa7bad1da164df07f4fac910d5e4bc1755
|
|
4
|
+
data.tar.gz: bfc1cf1a719016bed6b2d5f6e16db7812a72db0a3576f078a0a5b1998264e9a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5c72c4081f770533a35a7ed331e94147aad519721fc24859c2f1ca263d7d363b6ce9f5a069f81c51d4eb27b053af2d0c2d67512d4d1b8104edf11071b4dc63d
|
|
7
|
+
data.tar.gz: 38d314e536a57092dd56e41f526fde8ea39db45ae552a37131ceaf55f2a76da1dbb19dcabcc2f10ded291e04dee310984ed73436993f8652a3493ddcfaa78056
|
data/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- This file is auto-generated by alef — DO NOT EDIT. -->
|
|
2
|
-
<!-- alef:hash:
|
|
2
|
+
<!-- alef:hash:7c40d8eb1d087bfcbe645868b4311d50b36fbd38633bc3e137cf5adeb8081fbb -->
|
|
3
3
|
<!-- To regenerate: alef readme -->
|
|
4
4
|
<!-- To verify freshness: alef verify -->
|
|
5
5
|
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
</a>
|
|
88
88
|
</div>
|
|
89
89
|
|
|
90
|
-
Universal LLM API client for Ruby. Access
|
|
90
|
+
Universal LLM API client for Ruby. Access 174 LLM providers through a single interface with idiomatic Ruby API and native performance.
|
|
91
91
|
|
|
92
92
|
## What This Package Provides
|
|
93
93
|
|
|
@@ -176,7 +176,7 @@ puts
|
|
|
176
176
|
|
|
177
177
|
## Features
|
|
178
178
|
|
|
179
|
-
### Supported Providers (
|
|
179
|
+
### Supported Providers (174)
|
|
180
180
|
|
|
181
181
|
Route to any provider using the `provider/model` prefix convention:
|
|
182
182
|
|
|
@@ -196,7 +196,7 @@ Route to any provider using the `provider/model` prefix convention:
|
|
|
196
196
|
|
|
197
197
|
### Key Capabilities
|
|
198
198
|
|
|
199
|
-
- **Provider Routing** -- Single client for
|
|
199
|
+
- **Provider Routing** -- Single client for 174 LLM providers via `provider/model` prefix
|
|
200
200
|
- **Local LLMs** — Connect to locally-hosted models via Ollama, LM Studio, vLLM, llama.cpp, and other local inference servers
|
|
201
201
|
- **Unified API** -- Consistent `chat`, `chat_stream`, `embeddings`, `list_models` interface
|
|
202
202
|
- **Streaming** -- Real-time token streaming via `chat_stream`
|
|
@@ -217,7 +217,7 @@ Built on a compiled Rust core for speed and safety:
|
|
|
217
217
|
|
|
218
218
|
## Provider Routing
|
|
219
219
|
|
|
220
|
-
Route to
|
|
220
|
+
Route to 174 providers using the `provider/model` prefix convention:
|
|
221
221
|
|
|
222
222
|
```text
|
|
223
223
|
openai/gpt-4o
|
|
@@ -253,7 +253,7 @@ To use the MCP server inside a coding agent, install the **liter-llm plugin** fr
|
|
|
253
253
|
|
|
254
254
|
- **[Documentation](https://docs.liter-llm.xberg.io)** -- Full docs and API reference
|
|
255
255
|
- **[GitHub Repository](https://github.com/xberg-io/liter-llm)** -- Source, issues, and discussions
|
|
256
|
-
- **[Provider Registry](https://github.com/xberg-io/liter-llm/blob/main/schemas/providers.json)** --
|
|
256
|
+
- **[Provider Registry](https://github.com/xberg-io/liter-llm/blob/main/schemas/providers.json)** -- 174 supported providers
|
|
257
257
|
|
|
258
258
|
## Part of Xberg.io
|
|
259
259
|
|
|
@@ -261,7 +261,7 @@ To use the MCP server inside a coding agent, install the **liter-llm plugin** fr
|
|
|
261
261
|
- [Xberg Enterprise](https://github.com/xberg-io/xberg-enterprise) — managed extraction API with SDKs, dashboards, and observability.
|
|
262
262
|
- [crawlberg](https://github.com/xberg-io/crawlberg) — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
|
|
263
263
|
- [html-to-markdown](https://github.com/xberg-io/html-to-markdown) — fast, lossless HTML→Markdown engine.
|
|
264
|
-
- [liter-llm](https://github.com/xberg-io/liter-llm) — universal LLM API client with native bindings for 14 languages and
|
|
264
|
+
- [liter-llm](https://github.com/xberg-io/liter-llm) — universal LLM API client with native bindings for 14 languages and 174 providers.
|
|
265
265
|
- [tree-sitter-language-pack](https://github.com/xberg-io/tree-sitter-language-pack) — tree-sitter grammars and code-intelligence primitives.
|
|
266
266
|
- [alef](https://github.com/xberg-io/alef) — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.
|
|
267
267
|
- [Discord](https://discord.gg/xt9WY3GnKR) — community, roadmap, announcements.
|
|
@@ -69,9 +69,9 @@ checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56"
|
|
|
69
69
|
|
|
70
70
|
[[package]]
|
|
71
71
|
name = "async-compression"
|
|
72
|
-
version = "0.4.
|
|
72
|
+
version = "0.4.50"
|
|
73
73
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
74
|
-
checksum = "
|
|
74
|
+
checksum = "ee19bd99b43e3691acbad4e840420a4881cea6c0b66a208125a824f8fd53f5a1"
|
|
75
75
|
dependencies = [
|
|
76
76
|
"compression-codecs",
|
|
77
77
|
"compression-core",
|
|
@@ -387,9 +387,9 @@ dependencies = [
|
|
|
387
387
|
|
|
388
388
|
[[package]]
|
|
389
389
|
name = "cc"
|
|
390
|
-
version = "1.
|
|
390
|
+
version = "1.6.0"
|
|
391
391
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
392
|
-
checksum = "
|
|
392
|
+
checksum = "f74872d07caf508b30a21f6836e7d7016a2eaf7d9ff4f48deaa58cd8a0407630"
|
|
393
393
|
dependencies = [
|
|
394
394
|
"find-msvc-tools",
|
|
395
395
|
"shlex 2.0.1",
|
|
@@ -489,9 +489,9 @@ dependencies = [
|
|
|
489
489
|
|
|
490
490
|
[[package]]
|
|
491
491
|
name = "compression-codecs"
|
|
492
|
-
version = "0.4.
|
|
492
|
+
version = "0.4.45"
|
|
493
493
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
494
|
-
checksum = "
|
|
494
|
+
checksum = "98fc98460ba0ad5317075d3632b8dfc45d0be8c4a49347c2a38272019717614a"
|
|
495
495
|
dependencies = [
|
|
496
496
|
"compression-core",
|
|
497
497
|
"flate2",
|
|
@@ -1660,9 +1660,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
|
1660
1660
|
|
|
1661
1661
|
[[package]]
|
|
1662
1662
|
name = "libc"
|
|
1663
|
-
version = "0.2.
|
|
1663
|
+
version = "0.2.190"
|
|
1664
1664
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1665
|
-
checksum = "
|
|
1665
|
+
checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
|
|
1666
1666
|
|
|
1667
1667
|
[[package]]
|
|
1668
1668
|
name = "libloading"
|
|
@@ -1697,9 +1697,9 @@ checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"
|
|
|
1697
1697
|
|
|
1698
1698
|
[[package]]
|
|
1699
1699
|
name = "liter-llm"
|
|
1700
|
-
version = "2.1.
|
|
1700
|
+
version = "2.1.4"
|
|
1701
1701
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1702
|
-
checksum = "
|
|
1702
|
+
checksum = "35e59e12c35c0f48d16fdd3864f8f4288914a934579214a1394584091af03561"
|
|
1703
1703
|
dependencies = [
|
|
1704
1704
|
"ahash",
|
|
1705
1705
|
"arc-swap",
|
|
@@ -1742,7 +1742,7 @@ dependencies = [
|
|
|
1742
1742
|
|
|
1743
1743
|
[[package]]
|
|
1744
1744
|
name = "liter-llm-rb"
|
|
1745
|
-
version = "2.1.
|
|
1745
|
+
version = "2.1.4"
|
|
1746
1746
|
dependencies = [
|
|
1747
1747
|
"futures",
|
|
1748
1748
|
"liter-llm",
|
|
@@ -1786,9 +1786,9 @@ checksum = "fc04a4c58212d57930a24bf47d3fa87485264a3a054e9c10e042eb373573ad3c"
|
|
|
1786
1786
|
|
|
1787
1787
|
[[package]]
|
|
1788
1788
|
name = "magnus"
|
|
1789
|
-
version = "0.9.
|
|
1789
|
+
version = "0.9.2"
|
|
1790
1790
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1791
|
-
checksum = "
|
|
1791
|
+
checksum = "b9068710e00d21be762edca59b9c4c8946dbdb29820d4f76ad559afea07982c9"
|
|
1792
1792
|
dependencies = [
|
|
1793
1793
|
"magnus-macros",
|
|
1794
1794
|
"rb-sys",
|
|
@@ -1867,9 +1867,9 @@ dependencies = [
|
|
|
1867
1867
|
|
|
1868
1868
|
[[package]]
|
|
1869
1869
|
name = "mio"
|
|
1870
|
-
version = "1.2.
|
|
1870
|
+
version = "1.2.4"
|
|
1871
1871
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1872
|
-
checksum = "
|
|
1872
|
+
checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee"
|
|
1873
1873
|
dependencies = [
|
|
1874
1874
|
"libc",
|
|
1875
1875
|
"wasi",
|
|
@@ -1983,9 +1983,9 @@ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
|
1983
1983
|
|
|
1984
1984
|
[[package]]
|
|
1985
1985
|
name = "opendal"
|
|
1986
|
-
version = "0.59.
|
|
1986
|
+
version = "0.59.4"
|
|
1987
1987
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1988
|
-
checksum = "
|
|
1988
|
+
checksum = "3cbd193aec6d62efaff87611dfae52c132aed650bb3cb0c684c0a9394f09a42a"
|
|
1989
1989
|
dependencies = [
|
|
1990
1990
|
"opendal-core",
|
|
1991
1991
|
"opendal-service-fs",
|
|
@@ -1995,9 +1995,9 @@ dependencies = [
|
|
|
1995
1995
|
|
|
1996
1996
|
[[package]]
|
|
1997
1997
|
name = "opendal-core"
|
|
1998
|
-
version = "0.59.
|
|
1998
|
+
version = "0.59.4"
|
|
1999
1999
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2000
|
-
checksum = "
|
|
2000
|
+
checksum = "54b5555d753dd6a6383dc0891254b72f3cdc40c011ba0372b560e0ae5aa29f5c"
|
|
2001
2001
|
dependencies = [
|
|
2002
2002
|
"anyhow",
|
|
2003
2003
|
"asyncband",
|
|
@@ -2021,9 +2021,9 @@ dependencies = [
|
|
|
2021
2021
|
|
|
2022
2022
|
[[package]]
|
|
2023
2023
|
name = "opendal-http-transport-reqwest"
|
|
2024
|
-
version = "0.59.
|
|
2024
|
+
version = "0.59.4"
|
|
2025
2025
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2026
|
-
checksum = "
|
|
2026
|
+
checksum = "4d6588678f3040a3eab1819364dcbc6a746a8286d1ceb23a70a6614faa01dc6c"
|
|
2027
2027
|
dependencies = [
|
|
2028
2028
|
"bytes",
|
|
2029
2029
|
"futures",
|
|
@@ -2035,9 +2035,9 @@ dependencies = [
|
|
|
2035
2035
|
|
|
2036
2036
|
[[package]]
|
|
2037
2037
|
name = "opendal-service-fs"
|
|
2038
|
-
version = "0.59.
|
|
2038
|
+
version = "0.59.4"
|
|
2039
2039
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2040
|
-
checksum = "
|
|
2040
|
+
checksum = "ec5c16fe91b77c0364f66546a1c32b2999e9c3c3c75c2e908a282268e0890bac"
|
|
2041
2041
|
dependencies = [
|
|
2042
2042
|
"bytes",
|
|
2043
2043
|
"log",
|
|
@@ -2049,9 +2049,9 @@ dependencies = [
|
|
|
2049
2049
|
|
|
2050
2050
|
[[package]]
|
|
2051
2051
|
name = "opendal-service-redis"
|
|
2052
|
-
version = "0.59.
|
|
2052
|
+
version = "0.59.4"
|
|
2053
2053
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2054
|
-
checksum = "
|
|
2054
|
+
checksum = "67bdcf0db50dafddb62b3a62c21bd81e8e6ae200852b1887d594ce722d052570"
|
|
2055
2055
|
dependencies = [
|
|
2056
2056
|
"asyncband",
|
|
2057
2057
|
"bytes",
|
|
@@ -2064,9 +2064,9 @@ dependencies = [
|
|
|
2064
2064
|
|
|
2065
2065
|
[[package]]
|
|
2066
2066
|
name = "opendal-service-s3"
|
|
2067
|
-
version = "0.59.
|
|
2067
|
+
version = "0.59.4"
|
|
2068
2068
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2069
|
-
checksum = "
|
|
2069
|
+
checksum = "1d83e716c25a81fe2ca701894b8e14b9966acca3812af250e50132accb19da02"
|
|
2070
2070
|
dependencies = [
|
|
2071
2071
|
"base64 0.23.1",
|
|
2072
2072
|
"bytes",
|
|
@@ -2283,9 +2283,9 @@ dependencies = [
|
|
|
2283
2283
|
|
|
2284
2284
|
[[package]]
|
|
2285
2285
|
name = "powerfmt"
|
|
2286
|
-
version = "0.2.
|
|
2286
|
+
version = "0.2.1"
|
|
2287
2287
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2288
|
-
checksum = "
|
|
2288
|
+
checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958"
|
|
2289
2289
|
|
|
2290
2290
|
[[package]]
|
|
2291
2291
|
name = "ppv-lite86"
|
|
@@ -3318,9 +3318,9 @@ dependencies = [
|
|
|
3318
3318
|
|
|
3319
3319
|
[[package]]
|
|
3320
3320
|
name = "tokio"
|
|
3321
|
-
version = "1.53.
|
|
3321
|
+
version = "1.53.2"
|
|
3322
3322
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3323
|
-
checksum = "
|
|
3323
|
+
checksum = "e95f91fcc7a621e8b030f6aa23c71fe9838ae2fb4d8118b75602a328f5144044"
|
|
3324
3324
|
dependencies = [
|
|
3325
3325
|
"bytes",
|
|
3326
3326
|
"libc",
|
|
@@ -3680,9 +3680,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
|
|
|
3680
3680
|
|
|
3681
3681
|
[[package]]
|
|
3682
3682
|
name = "uuid"
|
|
3683
|
-
version = "1.
|
|
3683
|
+
version = "1.27.0"
|
|
3684
3684
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3685
|
-
checksum = "
|
|
3685
|
+
checksum = "97277d36b9c3ace13e58fa6e753f8b0bbbf302a18dd193240d70f9e29681059a"
|
|
3686
3686
|
dependencies = [
|
|
3687
3687
|
"getrandom 0.4.3",
|
|
3688
3688
|
"js-sys",
|
|
@@ -4170,9 +4170,9 @@ dependencies = [
|
|
|
4170
4170
|
|
|
4171
4171
|
[[package]]
|
|
4172
4172
|
name = "yoke-derive"
|
|
4173
|
-
version = "0.8.
|
|
4173
|
+
version = "0.8.4"
|
|
4174
4174
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4175
|
-
checksum = "
|
|
4175
|
+
checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71"
|
|
4176
4176
|
dependencies = [
|
|
4177
4177
|
"proc-macro2",
|
|
4178
4178
|
"quote",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:b7764342c62963d9887c5dda3446e9c78257e2e56c28e74236e4f8d8111ea4b6
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
6
6
|
[package]
|
|
7
7
|
name = "liter-llm-rb"
|
|
8
|
-
version = "2.1.
|
|
8
|
+
version = "2.1.4"
|
|
9
9
|
edition = "2024"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
description = "Universal LLM API client with Rust-powered polyglot bindings."
|
|
@@ -31,7 +31,7 @@ wasm-http = ["liter-llm/wasm-http"]
|
|
|
31
31
|
|
|
32
32
|
[dependencies]
|
|
33
33
|
futures = "0.3"
|
|
34
|
-
liter-llm = { version = "2.1.
|
|
34
|
+
liter-llm = { version = "2.1.4", features = ["native-http", "full"] }
|
|
35
35
|
magnus = "0.9"
|
|
36
36
|
rb-sys = ">=0.9.130, <0.10"
|
|
37
37
|
serde = { version = "1", features = ["derive"] }
|
data/ext/liter_llm_rb/src/lib.rs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:0298ffd63d1edf1d3ee3e4b3928b7608944a5687feff10faee95958dce861a54
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -17019,16 +17019,16 @@ impl From<liter_llm::types::UserContent> for UserContent {
|
|
|
17019
17019
|
}
|
|
17020
17020
|
}
|
|
17021
17021
|
|
|
17022
|
-
/// Convert a `liter_llm::
|
|
17022
|
+
/// Convert a `liter_llm::CatalogRefreshError` error to a Magnus runtime error.
|
|
17023
17023
|
#[allow(dead_code)]
|
|
17024
|
-
fn catalog_refresh_error_to_magnus_err(e: liter_llm::
|
|
17024
|
+
fn catalog_refresh_error_to_magnus_err(e: liter_llm::CatalogRefreshError) -> magnus::Error {
|
|
17025
17025
|
let msg = e.to_string();
|
|
17026
17026
|
magnus::Error::new(unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(), msg)
|
|
17027
17027
|
}
|
|
17028
17028
|
|
|
17029
|
-
/// Convert a `liter_llm::
|
|
17029
|
+
/// Convert a `liter_llm::LiterLlmError` error to a Magnus runtime error.
|
|
17030
17030
|
#[allow(dead_code)]
|
|
17031
|
-
fn liter_llm_error_to_magnus_err(e: liter_llm::
|
|
17031
|
+
fn liter_llm_error_to_magnus_err(e: liter_llm::LiterLlmError) -> magnus::Error {
|
|
17032
17032
|
let msg = e.to_string();
|
|
17033
17033
|
magnus::Error::new(unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(), msg)
|
|
17034
17034
|
}
|
|
@@ -17036,14 +17036,16 @@ fn liter_llm_error_to_magnus_err(e: liter_llm::error::LiterLlmError) -> magnus::
|
|
|
17036
17036
|
#[magnus::wrap(class = "LiterLlmErrorInfo", free_immediately, size)]
|
|
17037
17037
|
pub struct LiterLlmErrorInfo {
|
|
17038
17038
|
status_code: u16,
|
|
17039
|
+
retry_after: Option<u64>,
|
|
17039
17040
|
is_transient: bool,
|
|
17040
17041
|
error_type: String,
|
|
17041
17042
|
}
|
|
17042
17043
|
|
|
17043
17044
|
#[allow(dead_code)]
|
|
17044
|
-
fn liter_llm_error_info(e: &liter_llm::
|
|
17045
|
+
fn liter_llm_error_info(e: &liter_llm::LiterLlmError) -> LiterLlmErrorInfo {
|
|
17045
17046
|
LiterLlmErrorInfo {
|
|
17046
17047
|
status_code: e.status_code(),
|
|
17048
|
+
retry_after: e.retry_after().map(|d| d.as_millis() as u64),
|
|
17047
17049
|
is_transient: e.is_transient(),
|
|
17048
17050
|
error_type: e.error_type().to_string(),
|
|
17049
17051
|
}
|
|
@@ -17055,6 +17057,11 @@ impl LiterLlmErrorInfo {
|
|
|
17055
17057
|
self.status_code
|
|
17056
17058
|
}
|
|
17057
17059
|
|
|
17060
|
+
/// `retry_after` in whole milliseconds (nil when absent).
|
|
17061
|
+
pub fn retry_after(&self) -> Option<u64> {
|
|
17062
|
+
self.retry_after
|
|
17063
|
+
}
|
|
17064
|
+
|
|
17058
17065
|
/// Returns `true` if the error is transient and a retry may succeed.
|
|
17059
17066
|
pub fn transient(&self) -> bool {
|
|
17060
17067
|
self.is_transient
|
|
@@ -18637,6 +18644,7 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
18637
18644
|
|
|
18638
18645
|
let liter_llm_error_info_class = module.define_class("LiterLlmErrorInfo", ruby.class_object())?;
|
|
18639
18646
|
liter_llm_error_info_class.define_method("status_code", magnus::method!(LiterLlmErrorInfo::status_code, 0))?;
|
|
18647
|
+
liter_llm_error_info_class.define_method("retry_after", magnus::method!(LiterLlmErrorInfo::retry_after, 0))?;
|
|
18640
18648
|
liter_llm_error_info_class.define_method("transient?", magnus::method!(LiterLlmErrorInfo::transient, 0))?;
|
|
18641
18649
|
liter_llm_error_info_class.define_method("error_type", magnus::method!(LiterLlmErrorInfo::error_type, 0))?;
|
|
18642
18650
|
|
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:ec4b9fddcab939ec9af3ee75ea79f76247e89cb4488bdb821150c16ebeb362c4
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
module LiterLlm
|
|
8
8
|
## The version string for this package.
|
|
9
|
-
VERSION = "2.1.
|
|
9
|
+
VERSION = "2.1.4"
|
|
10
10
|
end
|
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:3ecfb5f1cc485b2ce1056911e2946e2b5473b5d5383da6a90dd8d1772fb73f3e
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
@@ -277,31 +277,31 @@ module LiterLlm
|
|
|
277
277
|
end
|
|
278
278
|
|
|
279
279
|
class DefaultClient
|
|
280
|
-
def
|
|
280
|
+
def chat_async: (ChatCompletionRequest req) -> ChatCompletionResponse
|
|
281
281
|
def chat_stream: (ChatCompletionRequest req) -> Enumerator[ChatCompletionChunk]
|
|
282
|
-
def
|
|
283
|
-
def
|
|
284
|
-
def
|
|
285
|
-
def
|
|
286
|
-
def
|
|
287
|
-
def
|
|
288
|
-
def
|
|
289
|
-
def
|
|
290
|
-
def
|
|
291
|
-
def
|
|
292
|
-
def
|
|
293
|
-
def
|
|
294
|
-
def
|
|
295
|
-
def
|
|
296
|
-
def
|
|
297
|
-
def
|
|
298
|
-
def
|
|
299
|
-
def
|
|
300
|
-
def
|
|
301
|
-
def
|
|
302
|
-
def
|
|
303
|
-
def
|
|
304
|
-
def
|
|
282
|
+
def embed_async: (EmbeddingRequest req) -> EmbeddingResponse
|
|
283
|
+
def list_models_async: () -> ModelsListResponse
|
|
284
|
+
def image_generate_async: (CreateImageRequest req) -> ImagesResponse
|
|
285
|
+
def speech_async: (CreateSpeechRequest req) -> String
|
|
286
|
+
def transcribe_async: (CreateTranscriptionRequest req) -> TranscriptionResponse
|
|
287
|
+
def moderate_async: (ModerationRequest req) -> ModerationResponse
|
|
288
|
+
def rerank_async: (RerankRequest req) -> RerankResponse
|
|
289
|
+
def search_async: (SearchRequest req) -> SearchResponse
|
|
290
|
+
def ocr_async: (OcrRequest req) -> OcrResponse
|
|
291
|
+
def create_file_async: (CreateFileRequest req) -> FileObject
|
|
292
|
+
def retrieve_file_async: (String file_id) -> FileObject
|
|
293
|
+
def delete_file_async: (String file_id) -> DeleteResponse
|
|
294
|
+
def list_files_async: (?FileListQuery query) -> FileListResponse
|
|
295
|
+
def file_content_async: (String file_id) -> String
|
|
296
|
+
def create_batch_async: (CreateBatchRequest req) -> BatchObject
|
|
297
|
+
def retrieve_batch_async: (String batch_id) -> BatchObject
|
|
298
|
+
def list_batches_async: (?BatchListQuery query) -> BatchListResponse
|
|
299
|
+
def cancel_batch_async: (String batch_id) -> BatchObject
|
|
300
|
+
def fetch_batch_for_polling_async: (String batch_id) -> BatchObject
|
|
301
|
+
def wait_for_batch_async: (String batch_id, WaitForBatchConfig config) -> BatchObject
|
|
302
|
+
def create_response_async: (CreateResponseRequest req) -> ResponseObject
|
|
303
|
+
def retrieve_response_async: (String response_id) -> ResponseObject
|
|
304
|
+
def cancel_response_async: (String response_id) -> ResponseObject
|
|
305
305
|
end
|
|
306
306
|
|
|
307
307
|
class DeleteResponse
|
|
@@ -1041,6 +1041,7 @@ module LiterLlm
|
|
|
1041
1041
|
|
|
1042
1042
|
class LiterLlmErrorInfo
|
|
1043
1043
|
def status_code: () -> Integer
|
|
1044
|
+
def retry_after: () -> Integer?
|
|
1044
1045
|
def transient?: () -> bool
|
|
1045
1046
|
def error_type: () -> String
|
|
1046
1047
|
end
|
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: 2.1.
|
|
4
|
+
version: 2.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Na'aman Hirschfeld
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|