liter_llm 2.4.1 → 2.4.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/ext/liter_llm_rb/native/Cargo.lock +100 -97
- data/ext/liter_llm_rb/native/Cargo.toml +3 -3
- data/ext/liter_llm_rb/src/lib.rs +56 -1
- data/lib/liter_llm/native.rb +16 -16
- data/lib/liter_llm/version.rb +2 -2
- data/sig/types.rbs +321 -8
- 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: 544448e68c03852bc9bc1b166b79129153f0e70090ea325f567d83ad3e870a82
|
|
4
|
+
data.tar.gz: 4664d61850b8b2b74c76a49cde3f675c462b0e2f48455a3bb006e2ee0773d238
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6704f5706667798edea43427a71bf0b4fb3612b2109cd9753ffe9e581e0dc1e77bcfe60e62194640d27bd5647f5a7e5d484261ecb7fc488f38a7d37514763c45
|
|
7
|
+
data.tar.gz: 2774403731814a135a13aa535419868ffb69c691099fb5d622a1c58545078b36a73ca07fab7c63c35d6fe0cf3d2ec2a695a8e2b85ac32af182b9fd198c2b2c51
|
|
@@ -103,9 +103,9 @@ dependencies = [
|
|
|
103
103
|
|
|
104
104
|
[[package]]
|
|
105
105
|
name = "asyncband"
|
|
106
|
-
version = "0.7.
|
|
106
|
+
version = "0.7.4"
|
|
107
107
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
108
|
-
checksum = "
|
|
108
|
+
checksum = "5d2050892d4691cf110586070786712b504985a4d37ed64a9cd8a402718e1706"
|
|
109
109
|
|
|
110
110
|
[[package]]
|
|
111
111
|
name = "atomic-waker"
|
|
@@ -121,9 +121,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
|
121
121
|
|
|
122
122
|
[[package]]
|
|
123
123
|
name = "aws-credential-types"
|
|
124
|
-
version = "1.3.
|
|
124
|
+
version = "1.3.1"
|
|
125
125
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
-
checksum = "
|
|
126
|
+
checksum = "576e8da35751dc85409ec1cd15999f692c277a1fbe9336780fe6f15e49dd637d"
|
|
127
127
|
dependencies = [
|
|
128
128
|
"aws-smithy-async",
|
|
129
129
|
"aws-smithy-runtime-api",
|
|
@@ -133,9 +133,9 @@ dependencies = [
|
|
|
133
133
|
|
|
134
134
|
[[package]]
|
|
135
135
|
name = "aws-sigv4"
|
|
136
|
-
version = "1.6.
|
|
136
|
+
version = "1.6.4"
|
|
137
137
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
138
|
-
checksum = "
|
|
138
|
+
checksum = "f385da9b7757ed4c8214797ad663ff534fb622006143530aa80e21f8e06ff85c"
|
|
139
139
|
dependencies = [
|
|
140
140
|
"aws-credential-types",
|
|
141
141
|
"aws-smithy-http",
|
|
@@ -154,9 +154,9 @@ dependencies = [
|
|
|
154
154
|
|
|
155
155
|
[[package]]
|
|
156
156
|
name = "aws-smithy-async"
|
|
157
|
-
version = "1.3.
|
|
157
|
+
version = "1.3.1"
|
|
158
158
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
159
|
-
checksum = "
|
|
159
|
+
checksum = "de681a9df7ff79823b759ee17061076ec049cd61a8fa28ece4293d89c9f6964e"
|
|
160
160
|
dependencies = [
|
|
161
161
|
"futures-util",
|
|
162
162
|
"pin-project-lite",
|
|
@@ -165,9 +165,9 @@ dependencies = [
|
|
|
165
165
|
|
|
166
166
|
[[package]]
|
|
167
167
|
name = "aws-smithy-http"
|
|
168
|
-
version = "0.64.
|
|
168
|
+
version = "0.64.3"
|
|
169
169
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
170
|
-
checksum = "
|
|
170
|
+
checksum = "19af609dd5edf8b056cd0bb001c706c8b3b1458055328b334ec13d7f46f6aaa8"
|
|
171
171
|
dependencies = [
|
|
172
172
|
"aws-smithy-runtime-api",
|
|
173
173
|
"aws-smithy-types",
|
|
@@ -180,15 +180,14 @@ dependencies = [
|
|
|
180
180
|
"http-body-util",
|
|
181
181
|
"percent-encoding",
|
|
182
182
|
"pin-project-lite",
|
|
183
|
-
"pin-utils",
|
|
184
183
|
"tracing",
|
|
185
184
|
]
|
|
186
185
|
|
|
187
186
|
[[package]]
|
|
188
187
|
name = "aws-smithy-runtime-api"
|
|
189
|
-
version = "1.19.
|
|
188
|
+
version = "1.19.2"
|
|
190
189
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
191
|
-
checksum = "
|
|
190
|
+
checksum = "8c4e85cffe9944b10d576b075432bd8f98dbc081e8681cb37d5b2d87dc27bc84"
|
|
192
191
|
dependencies = [
|
|
193
192
|
"aws-smithy-async",
|
|
194
193
|
"aws-smithy-runtime-api-macros",
|
|
@@ -203,9 +202,9 @@ dependencies = [
|
|
|
203
202
|
|
|
204
203
|
[[package]]
|
|
205
204
|
name = "aws-smithy-runtime-api-macros"
|
|
206
|
-
version = "1.
|
|
205
|
+
version = "1.2.0"
|
|
207
206
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
208
|
-
checksum = "
|
|
207
|
+
checksum = "ce237f890a2283c9b328955c3b0918d2d5bf66a1cb6ceccd36a0047246fbc6e6"
|
|
209
208
|
dependencies = [
|
|
210
209
|
"proc-macro2",
|
|
211
210
|
"quote",
|
|
@@ -214,9 +213,9 @@ dependencies = [
|
|
|
214
213
|
|
|
215
214
|
[[package]]
|
|
216
215
|
name = "aws-smithy-types"
|
|
217
|
-
version = "1.
|
|
216
|
+
version = "1.9.1"
|
|
218
217
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
219
|
-
checksum = "
|
|
218
|
+
checksum = "cf183d70774ea2cfcc101ca74a8884e4c76be8b9df65cd303f6a1175c88e8f80"
|
|
220
219
|
dependencies = [
|
|
221
220
|
"base64-simd",
|
|
222
221
|
"bytes",
|
|
@@ -227,7 +226,6 @@ dependencies = [
|
|
|
227
226
|
"itoa",
|
|
228
227
|
"num-integer",
|
|
229
228
|
"pin-project-lite",
|
|
230
|
-
"pin-utils",
|
|
231
229
|
"ryu",
|
|
232
230
|
"serde",
|
|
233
231
|
"time",
|
|
@@ -387,9 +385,9 @@ dependencies = [
|
|
|
387
385
|
|
|
388
386
|
[[package]]
|
|
389
387
|
name = "cc"
|
|
390
|
-
version = "1.
|
|
388
|
+
version = "1.10.0"
|
|
391
389
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
392
|
-
checksum = "
|
|
390
|
+
checksum = "86e055fa6e3e40ad6187ba25b6855eeb635d5271f8e0f0e1e9a5826b8d75bea0"
|
|
393
391
|
dependencies = [
|
|
394
392
|
"find-msvc-tools",
|
|
395
393
|
"shlex 2.0.1",
|
|
@@ -586,9 +584,9 @@ checksum = "338089f42c427b86394a5ee60ff321da23a5c89c9d89514c829687b26359fcff"
|
|
|
586
584
|
|
|
587
585
|
[[package]]
|
|
588
586
|
name = "crc32fast"
|
|
589
|
-
version = "1.5.
|
|
587
|
+
version = "1.5.3"
|
|
590
588
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
591
|
-
checksum = "
|
|
589
|
+
checksum = "0ba106e844045ddc02c20768ac4b0b7cb45f2cc2ecbd833ac9f5dacb183c2055"
|
|
592
590
|
dependencies = [
|
|
593
591
|
"cfg-if",
|
|
594
592
|
]
|
|
@@ -645,9 +643,9 @@ dependencies = [
|
|
|
645
643
|
|
|
646
644
|
[[package]]
|
|
647
645
|
name = "ctutils"
|
|
648
|
-
version = "0.4.
|
|
646
|
+
version = "0.4.7"
|
|
649
647
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
650
|
-
checksum = "
|
|
648
|
+
checksum = "a2376ffd6f96d8a9db59875b4b6b0237d6900b5baf64279714e05493ce64828a"
|
|
651
649
|
dependencies = [
|
|
652
650
|
"cmov",
|
|
653
651
|
]
|
|
@@ -919,9 +917,9 @@ checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
|
|
|
919
917
|
|
|
920
918
|
[[package]]
|
|
921
919
|
name = "find-msvc-tools"
|
|
922
|
-
version = "0.1.
|
|
920
|
+
version = "0.1.15"
|
|
923
921
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
924
|
-
checksum = "
|
|
922
|
+
checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48"
|
|
925
923
|
|
|
926
924
|
[[package]]
|
|
927
925
|
name = "flate2"
|
|
@@ -1121,9 +1119,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1121
1119
|
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
|
1122
1120
|
dependencies = [
|
|
1123
1121
|
"cfg-if",
|
|
1122
|
+
"js-sys",
|
|
1124
1123
|
"libc",
|
|
1125
1124
|
"r-efi 6.0.0",
|
|
1126
1125
|
"rand_core 0.10.1",
|
|
1126
|
+
"wasm-bindgen",
|
|
1127
1127
|
]
|
|
1128
1128
|
|
|
1129
1129
|
[[package]]
|
|
@@ -1366,9 +1366,9 @@ dependencies = [
|
|
|
1366
1366
|
|
|
1367
1367
|
[[package]]
|
|
1368
1368
|
name = "icu_collections"
|
|
1369
|
-
version = "2.
|
|
1369
|
+
version = "2.4.0"
|
|
1370
1370
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1371
|
-
checksum = "
|
|
1371
|
+
checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd"
|
|
1372
1372
|
dependencies = [
|
|
1373
1373
|
"displaydoc",
|
|
1374
1374
|
"potential_utf",
|
|
@@ -1380,9 +1380,9 @@ dependencies = [
|
|
|
1380
1380
|
|
|
1381
1381
|
[[package]]
|
|
1382
1382
|
name = "icu_locale_core"
|
|
1383
|
-
version = "2.
|
|
1383
|
+
version = "2.4.0"
|
|
1384
1384
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1385
|
-
checksum = "
|
|
1385
|
+
checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0"
|
|
1386
1386
|
dependencies = [
|
|
1387
1387
|
"displaydoc",
|
|
1388
1388
|
"litemap",
|
|
@@ -1393,9 +1393,9 @@ dependencies = [
|
|
|
1393
1393
|
|
|
1394
1394
|
[[package]]
|
|
1395
1395
|
name = "icu_normalizer"
|
|
1396
|
-
version = "2.
|
|
1396
|
+
version = "2.4.0"
|
|
1397
1397
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1398
|
-
checksum = "
|
|
1398
|
+
checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599"
|
|
1399
1399
|
dependencies = [
|
|
1400
1400
|
"icu_collections",
|
|
1401
1401
|
"icu_normalizer_data",
|
|
@@ -1407,15 +1407,15 @@ dependencies = [
|
|
|
1407
1407
|
|
|
1408
1408
|
[[package]]
|
|
1409
1409
|
name = "icu_normalizer_data"
|
|
1410
|
-
version = "2.
|
|
1410
|
+
version = "2.4.0"
|
|
1411
1411
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1412
|
-
checksum = "
|
|
1412
|
+
checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc"
|
|
1413
1413
|
|
|
1414
1414
|
[[package]]
|
|
1415
1415
|
name = "icu_properties"
|
|
1416
|
-
version = "2.
|
|
1416
|
+
version = "2.4.0"
|
|
1417
1417
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1418
|
-
checksum = "
|
|
1418
|
+
checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f"
|
|
1419
1419
|
dependencies = [
|
|
1420
1420
|
"displaydoc",
|
|
1421
1421
|
"icu_collections",
|
|
@@ -1428,15 +1428,15 @@ dependencies = [
|
|
|
1428
1428
|
|
|
1429
1429
|
[[package]]
|
|
1430
1430
|
name = "icu_properties_data"
|
|
1431
|
-
version = "2.
|
|
1431
|
+
version = "2.4.0"
|
|
1432
1432
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1433
|
-
checksum = "
|
|
1433
|
+
checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf"
|
|
1434
1434
|
|
|
1435
1435
|
[[package]]
|
|
1436
1436
|
name = "icu_provider"
|
|
1437
|
-
version = "2.
|
|
1437
|
+
version = "2.4.0"
|
|
1438
1438
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1439
|
-
checksum = "
|
|
1439
|
+
checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514"
|
|
1440
1440
|
dependencies = [
|
|
1441
1441
|
"displaydoc",
|
|
1442
1442
|
"icu_locale_core",
|
|
@@ -1634,9 +1634,9 @@ dependencies = [
|
|
|
1634
1634
|
|
|
1635
1635
|
[[package]]
|
|
1636
1636
|
name = "js-sys"
|
|
1637
|
-
version = "0.3.
|
|
1637
|
+
version = "0.3.107"
|
|
1638
1638
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1639
|
-
checksum = "
|
|
1639
|
+
checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
|
|
1640
1640
|
dependencies = [
|
|
1641
1641
|
"cfg-if",
|
|
1642
1642
|
"futures-util",
|
|
@@ -1705,9 +1705,9 @@ checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"
|
|
|
1705
1705
|
|
|
1706
1706
|
[[package]]
|
|
1707
1707
|
name = "liter-llm"
|
|
1708
|
-
version = "2.4.
|
|
1708
|
+
version = "2.4.4"
|
|
1709
1709
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1710
|
-
checksum = "
|
|
1710
|
+
checksum = "3260f8b46d42463bbf7807ae4d85d7780079e199e983be1f895a32ee0aa9048b"
|
|
1711
1711
|
dependencies = [
|
|
1712
1712
|
"ahash",
|
|
1713
1713
|
"arc-swap",
|
|
@@ -1721,6 +1721,7 @@ dependencies = [
|
|
|
1721
1721
|
"futures-util",
|
|
1722
1722
|
"gcp_auth",
|
|
1723
1723
|
"getrandom 0.3.4",
|
|
1724
|
+
"getrandom 0.4.3",
|
|
1724
1725
|
"gloo-timers",
|
|
1725
1726
|
"hex",
|
|
1726
1727
|
"http",
|
|
@@ -1755,7 +1756,7 @@ dependencies = [
|
|
|
1755
1756
|
|
|
1756
1757
|
[[package]]
|
|
1757
1758
|
name = "liter-llm-rb"
|
|
1758
|
-
version = "2.4.
|
|
1759
|
+
version = "2.4.4"
|
|
1759
1760
|
dependencies = [
|
|
1760
1761
|
"futures",
|
|
1761
1762
|
"liter-llm",
|
|
@@ -1777,9 +1778,9 @@ dependencies = [
|
|
|
1777
1778
|
|
|
1778
1779
|
[[package]]
|
|
1779
1780
|
name = "log"
|
|
1780
|
-
version = "0.4.
|
|
1781
|
+
version = "0.4.35"
|
|
1781
1782
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1782
|
-
checksum = "
|
|
1783
|
+
checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c"
|
|
1783
1784
|
|
|
1784
1785
|
[[package]]
|
|
1785
1786
|
name = "macro_rules_attribute"
|
|
@@ -2113,9 +2114,9 @@ dependencies = [
|
|
|
2113
2114
|
|
|
2114
2115
|
[[package]]
|
|
2115
2116
|
name = "openssl-probe"
|
|
2116
|
-
version = "0.2.
|
|
2117
|
+
version = "0.2.2"
|
|
2117
2118
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2118
|
-
checksum = "
|
|
2119
|
+
checksum = "7e036b411754132fd6b74e94b74e9a13c5cf606fa93d1885c35860d3060820b1"
|
|
2119
2120
|
|
|
2120
2121
|
[[package]]
|
|
2121
2122
|
name = "openssl-sys"
|
|
@@ -2248,12 +2249,6 @@ version = "0.2.17"
|
|
|
2248
2249
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2249
2250
|
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
|
2250
2251
|
|
|
2251
|
-
[[package]]
|
|
2252
|
-
name = "pin-utils"
|
|
2253
|
-
version = "0.1.1"
|
|
2254
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2255
|
-
checksum = "13bee6c73da26345c729282832b60b0363cf3dd9f4bfd81d8551b7a1c889a113"
|
|
2256
|
-
|
|
2257
2252
|
[[package]]
|
|
2258
2253
|
name = "pkg-config"
|
|
2259
2254
|
version = "0.3.34"
|
|
@@ -2487,9 +2482,9 @@ checksum = "cca7ad6a7e21e72151d56fe2495a259b5670e204c3adac41ee7ef676ea08117a"
|
|
|
2487
2482
|
|
|
2488
2483
|
[[package]]
|
|
2489
2484
|
name = "redis"
|
|
2490
|
-
version = "1.
|
|
2485
|
+
version = "1.8.1"
|
|
2491
2486
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2492
|
-
checksum = "
|
|
2487
|
+
checksum = "db7f3d75b5a3301746bff39a767bf4c5c42506b08513527308b3875bfb64a031"
|
|
2493
2488
|
dependencies = [
|
|
2494
2489
|
"arc-swap",
|
|
2495
2490
|
"arcstr",
|
|
@@ -2738,9 +2733,9 @@ dependencies = [
|
|
|
2738
2733
|
|
|
2739
2734
|
[[package]]
|
|
2740
2735
|
name = "rustix"
|
|
2741
|
-
version = "1.1.
|
|
2736
|
+
version = "1.1.6"
|
|
2742
2737
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2743
|
-
checksum = "
|
|
2738
|
+
checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa"
|
|
2744
2739
|
dependencies = [
|
|
2745
2740
|
"bitflags 2.13.2",
|
|
2746
2741
|
"errno",
|
|
@@ -3084,9 +3079,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
|
|
3084
3079
|
|
|
3085
3080
|
[[package]]
|
|
3086
3081
|
name = "smallvec"
|
|
3087
|
-
version = "1.16.
|
|
3082
|
+
version = "1.16.4"
|
|
3088
3083
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3089
|
-
checksum = "
|
|
3084
|
+
checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8"
|
|
3090
3085
|
|
|
3091
3086
|
[[package]]
|
|
3092
3087
|
name = "socket2"
|
|
@@ -3276,9 +3271,9 @@ dependencies = [
|
|
|
3276
3271
|
|
|
3277
3272
|
[[package]]
|
|
3278
3273
|
name = "tinystr"
|
|
3279
|
-
version = "0.8.
|
|
3274
|
+
version = "0.8.5"
|
|
3280
3275
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3281
|
-
checksum = "
|
|
3276
|
+
checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a"
|
|
3282
3277
|
dependencies = [
|
|
3283
3278
|
"displaydoc",
|
|
3284
3279
|
"zerovec",
|
|
@@ -3320,9 +3315,9 @@ dependencies = [
|
|
|
3320
3315
|
|
|
3321
3316
|
[[package]]
|
|
3322
3317
|
name = "tokio"
|
|
3323
|
-
version = "1.
|
|
3318
|
+
version = "1.54.1"
|
|
3324
3319
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3325
|
-
checksum = "
|
|
3320
|
+
checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"
|
|
3326
3321
|
dependencies = [
|
|
3327
3322
|
"bytes",
|
|
3328
3323
|
"libc",
|
|
@@ -3627,9 +3622,9 @@ checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
|
|
|
3627
3622
|
|
|
3628
3623
|
[[package]]
|
|
3629
3624
|
name = "unicode-width"
|
|
3630
|
-
version = "0.2.
|
|
3625
|
+
version = "0.2.3"
|
|
3631
3626
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3632
|
-
checksum = "
|
|
3627
|
+
checksum = "ca718471876992059f251e33aafc334346ada08042b7661dd1fe313a9bced557"
|
|
3633
3628
|
|
|
3634
3629
|
[[package]]
|
|
3635
3630
|
name = "unicode_categories"
|
|
@@ -3676,15 +3671,24 @@ dependencies = [
|
|
|
3676
3671
|
|
|
3677
3672
|
[[package]]
|
|
3678
3673
|
name = "utf8_iter"
|
|
3679
|
-
version = "1.0
|
|
3674
|
+
version = "1.1.0"
|
|
3680
3675
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3681
|
-
checksum = "
|
|
3676
|
+
checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0"
|
|
3677
|
+
dependencies = [
|
|
3678
|
+
"utf_types",
|
|
3679
|
+
]
|
|
3680
|
+
|
|
3681
|
+
[[package]]
|
|
3682
|
+
name = "utf_types"
|
|
3683
|
+
version = "1.0.0"
|
|
3684
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3685
|
+
checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6"
|
|
3682
3686
|
|
|
3683
3687
|
[[package]]
|
|
3684
3688
|
name = "uuid"
|
|
3685
|
-
version = "1.
|
|
3689
|
+
version = "1.29.0"
|
|
3686
3690
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3687
|
-
checksum = "
|
|
3691
|
+
checksum = "4a0e2d11620c50695fe12bbbfde96b3477fe606e7284c22d505c12ce51214514"
|
|
3688
3692
|
dependencies = [
|
|
3689
3693
|
"getrandom 0.4.3",
|
|
3690
3694
|
"js-sys",
|
|
@@ -3752,12 +3756,11 @@ dependencies = [
|
|
|
3752
3756
|
|
|
3753
3757
|
[[package]]
|
|
3754
3758
|
name = "wasm-bindgen"
|
|
3755
|
-
version = "0.2.
|
|
3759
|
+
version = "0.2.130"
|
|
3756
3760
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3757
|
-
checksum = "
|
|
3761
|
+
checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c"
|
|
3758
3762
|
dependencies = [
|
|
3759
3763
|
"cfg-if",
|
|
3760
|
-
"once_cell",
|
|
3761
3764
|
"rustversion",
|
|
3762
3765
|
"serde",
|
|
3763
3766
|
"wasm-bindgen-macro",
|
|
@@ -3766,9 +3769,9 @@ dependencies = [
|
|
|
3766
3769
|
|
|
3767
3770
|
[[package]]
|
|
3768
3771
|
name = "wasm-bindgen-futures"
|
|
3769
|
-
version = "0.4.
|
|
3772
|
+
version = "0.4.80"
|
|
3770
3773
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3771
|
-
checksum = "
|
|
3774
|
+
checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501"
|
|
3772
3775
|
dependencies = [
|
|
3773
3776
|
"js-sys",
|
|
3774
3777
|
"tokio",
|
|
@@ -3777,9 +3780,9 @@ dependencies = [
|
|
|
3777
3780
|
|
|
3778
3781
|
[[package]]
|
|
3779
3782
|
name = "wasm-bindgen-macro"
|
|
3780
|
-
version = "0.2.
|
|
3783
|
+
version = "0.2.130"
|
|
3781
3784
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3782
|
-
checksum = "
|
|
3785
|
+
checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9"
|
|
3783
3786
|
dependencies = [
|
|
3784
3787
|
"quote",
|
|
3785
3788
|
"wasm-bindgen-macro-support",
|
|
@@ -3787,9 +3790,9 @@ dependencies = [
|
|
|
3787
3790
|
|
|
3788
3791
|
[[package]]
|
|
3789
3792
|
name = "wasm-bindgen-macro-support"
|
|
3790
|
-
version = "0.2.
|
|
3793
|
+
version = "0.2.130"
|
|
3791
3794
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3792
|
-
checksum = "
|
|
3795
|
+
checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a"
|
|
3793
3796
|
dependencies = [
|
|
3794
3797
|
"bumpalo",
|
|
3795
3798
|
"proc-macro2",
|
|
@@ -3800,9 +3803,9 @@ dependencies = [
|
|
|
3800
3803
|
|
|
3801
3804
|
[[package]]
|
|
3802
3805
|
name = "wasm-bindgen-shared"
|
|
3803
|
-
version = "0.2.
|
|
3806
|
+
version = "0.2.130"
|
|
3804
3807
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3805
|
-
checksum = "
|
|
3808
|
+
checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
|
|
3806
3809
|
dependencies = [
|
|
3807
3810
|
"unicode-ident",
|
|
3808
3811
|
]
|
|
@@ -3822,9 +3825,9 @@ dependencies = [
|
|
|
3822
3825
|
|
|
3823
3826
|
[[package]]
|
|
3824
3827
|
name = "web-sys"
|
|
3825
|
-
version = "0.3.
|
|
3828
|
+
version = "0.3.107"
|
|
3826
3829
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3827
|
-
checksum = "
|
|
3830
|
+
checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88"
|
|
3828
3831
|
dependencies = [
|
|
3829
3832
|
"js-sys",
|
|
3830
3833
|
"wasm-bindgen",
|
|
@@ -3842,9 +3845,9 @@ dependencies = [
|
|
|
3842
3845
|
|
|
3843
3846
|
[[package]]
|
|
3844
3847
|
name = "webpki-root-certs"
|
|
3845
|
-
version = "1.0.
|
|
3848
|
+
version = "1.0.11"
|
|
3846
3849
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3847
|
-
checksum = "
|
|
3850
|
+
checksum = "e49d0e65abc00c142e8f9428da991da9f1a250c39be97459901eb12b9b49f62a"
|
|
3848
3851
|
dependencies = [
|
|
3849
3852
|
"rustls-pki-types",
|
|
3850
3853
|
]
|
|
@@ -3855,14 +3858,14 @@ version = "0.26.11"
|
|
|
3855
3858
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3856
3859
|
checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
|
|
3857
3860
|
dependencies = [
|
|
3858
|
-
"webpki-roots 1.0.
|
|
3861
|
+
"webpki-roots 1.0.11",
|
|
3859
3862
|
]
|
|
3860
3863
|
|
|
3861
3864
|
[[package]]
|
|
3862
3865
|
name = "webpki-roots"
|
|
3863
|
-
version = "1.0.
|
|
3866
|
+
version = "1.0.11"
|
|
3864
3867
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3865
|
-
checksum = "
|
|
3868
|
+
checksum = "f5f280bbb2b287bc8e7de7e3852945a0ff50d1bbcb5ed42b6c7a568c546df171"
|
|
3866
3869
|
dependencies = [
|
|
3867
3870
|
"rustls-pki-types",
|
|
3868
3871
|
]
|
|
@@ -4145,9 +4148,9 @@ checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc"
|
|
|
4145
4148
|
|
|
4146
4149
|
[[package]]
|
|
4147
4150
|
name = "xattr"
|
|
4148
|
-
version = "1.
|
|
4151
|
+
version = "1.7.0"
|
|
4149
4152
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4150
|
-
checksum = "
|
|
4153
|
+
checksum = "963d6fab92d5504b971dc8bd90ca743c2575e590bc8071ea5bc571598667ae08"
|
|
4151
4154
|
dependencies = [
|
|
4152
4155
|
"libc",
|
|
4153
4156
|
"rustix",
|
|
@@ -4161,9 +4164,9 @@ checksum = "550a2b930b62486a393c52d5c3b84bff264b28aa437ed64694d31e93b1757af7"
|
|
|
4161
4164
|
|
|
4162
4165
|
[[package]]
|
|
4163
4166
|
name = "yoke"
|
|
4164
|
-
version = "0.8.
|
|
4167
|
+
version = "0.8.4"
|
|
4165
4168
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4166
|
-
checksum = "
|
|
4169
|
+
checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3"
|
|
4167
4170
|
dependencies = [
|
|
4168
4171
|
"stable_deref_trait",
|
|
4169
4172
|
"yoke-derive",
|
|
@@ -4256,9 +4259,9 @@ dependencies = [
|
|
|
4256
4259
|
|
|
4257
4260
|
[[package]]
|
|
4258
4261
|
name = "zerovec"
|
|
4259
|
-
version = "0.11.
|
|
4262
|
+
version = "0.11.9"
|
|
4260
4263
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4261
|
-
checksum = "
|
|
4264
|
+
checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40"
|
|
4262
4265
|
dependencies = [
|
|
4263
4266
|
"yoke",
|
|
4264
4267
|
"zerofrom",
|
|
@@ -4267,9 +4270,9 @@ dependencies = [
|
|
|
4267
4270
|
|
|
4268
4271
|
[[package]]
|
|
4269
4272
|
name = "zerovec-derive"
|
|
4270
|
-
version = "0.11.
|
|
4273
|
+
version = "0.11.7"
|
|
4271
4274
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4272
|
-
checksum = "
|
|
4275
|
+
checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a"
|
|
4273
4276
|
dependencies = [
|
|
4274
4277
|
"proc-macro2",
|
|
4275
4278
|
"quote",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:5fcbf23d4ca02f9f112ce82a29a7a6c4a58d1dc00123375098c3339164bb1df9
|
|
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.4.
|
|
8
|
+
version = "2.4.4"
|
|
9
9
|
edition = "2024"
|
|
10
10
|
authors = ["Na'aman Hirschfeld <naaman@xberg.io>", "Tobias Perlstein <tobias@xberg.io>"]
|
|
11
11
|
license = "MIT"
|
|
@@ -32,7 +32,7 @@ wasm-http = ["liter-llm/wasm-http"]
|
|
|
32
32
|
|
|
33
33
|
[dependencies]
|
|
34
34
|
futures = "0.3"
|
|
35
|
-
liter-llm = { version = "2.4.
|
|
35
|
+
liter-llm = { version = "2.4.4", features = ["native-http", "full"] }
|
|
36
36
|
magnus = "0.9"
|
|
37
37
|
rb-sys = ">=0.9.130, <0.10"
|
|
38
38
|
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:572a340c04d3c66f1d03134b5d86a44798c421e34868e0e9298ea9a5eec2dde9
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -13555,8 +13555,63 @@ pub enum Message {
|
|
|
13555
13555
|
},
|
|
13556
13556
|
}
|
|
13557
13557
|
|
|
13558
|
+
// Reconstruct the generated Data variant class instead of a plain Hash, keeping
|
|
13559
|
+
// IntoValue symmetric with TryConvert (which accepts those variant classes).
|
|
13560
|
+
// Falls back to the JSON shape when the Ruby classes are not loaded.
|
|
13561
|
+
impl Message {
|
|
13562
|
+
fn tagged_ruby_variant(&self, handle: &Ruby) -> Option<magnus::Value> {
|
|
13563
|
+
match self {
|
|
13564
|
+
Message::System { _0: payload } => {
|
|
13565
|
+
// Resolve the variant before wrapping a payload whose Ruby class may also be absent.
|
|
13566
|
+
let class = handle.eval::<magnus::RClass>("LiterLlm::MessageSystem").ok()?;
|
|
13567
|
+
let payload = (*payload).clone();
|
|
13568
|
+
let value = <SystemMessage as magnus::IntoValue>::into_value_with(payload, handle);
|
|
13569
|
+
class.funcall::<_, _, magnus::Value>("new", (value,)).ok()
|
|
13570
|
+
}
|
|
13571
|
+
Message::User { _0: payload } => {
|
|
13572
|
+
// Resolve the variant before wrapping a payload whose Ruby class may also be absent.
|
|
13573
|
+
let class = handle.eval::<magnus::RClass>("LiterLlm::MessageUser").ok()?;
|
|
13574
|
+
let payload = (*payload).clone();
|
|
13575
|
+
let value = <UserMessage as magnus::IntoValue>::into_value_with(payload, handle);
|
|
13576
|
+
class.funcall::<_, _, magnus::Value>("new", (value,)).ok()
|
|
13577
|
+
}
|
|
13578
|
+
Message::Assistant { _0: payload } => {
|
|
13579
|
+
// Resolve the variant before wrapping a payload whose Ruby class may also be absent.
|
|
13580
|
+
let class = handle.eval::<magnus::RClass>("LiterLlm::MessageAssistant").ok()?;
|
|
13581
|
+
let payload = (*payload).clone();
|
|
13582
|
+
let value = <AssistantMessage as magnus::IntoValue>::into_value_with(payload, handle);
|
|
13583
|
+
class.funcall::<_, _, magnus::Value>("new", (value,)).ok()
|
|
13584
|
+
}
|
|
13585
|
+
Message::Tool { _0: payload } => {
|
|
13586
|
+
// Resolve the variant before wrapping a payload whose Ruby class may also be absent.
|
|
13587
|
+
let class = handle.eval::<magnus::RClass>("LiterLlm::MessageTool").ok()?;
|
|
13588
|
+
let payload = (*payload).clone();
|
|
13589
|
+
let value = <ToolMessage as magnus::IntoValue>::into_value_with(payload, handle);
|
|
13590
|
+
class.funcall::<_, _, magnus::Value>("new", (value,)).ok()
|
|
13591
|
+
}
|
|
13592
|
+
Message::Developer { _0: payload } => {
|
|
13593
|
+
// Resolve the variant before wrapping a payload whose Ruby class may also be absent.
|
|
13594
|
+
let class = handle.eval::<magnus::RClass>("LiterLlm::MessageDeveloper").ok()?;
|
|
13595
|
+
let payload = (*payload).clone();
|
|
13596
|
+
let value = <DeveloperMessage as magnus::IntoValue>::into_value_with(payload, handle);
|
|
13597
|
+
class.funcall::<_, _, magnus::Value>("new", (value,)).ok()
|
|
13598
|
+
}
|
|
13599
|
+
Message::Function { _0: payload } => {
|
|
13600
|
+
// Resolve the variant before wrapping a payload whose Ruby class may also be absent.
|
|
13601
|
+
let class = handle.eval::<magnus::RClass>("LiterLlm::MessageFunction").ok()?;
|
|
13602
|
+
let payload = (*payload).clone();
|
|
13603
|
+
let value = <FunctionMessage as magnus::IntoValue>::into_value_with(payload, handle);
|
|
13604
|
+
class.funcall::<_, _, magnus::Value>("new", (value,)).ok()
|
|
13605
|
+
}
|
|
13606
|
+
}
|
|
13607
|
+
}
|
|
13608
|
+
}
|
|
13609
|
+
|
|
13558
13610
|
impl magnus::IntoValue for Message {
|
|
13559
13611
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
13612
|
+
if let Some(instance) = self.tagged_ruby_variant(handle) {
|
|
13613
|
+
return instance;
|
|
13614
|
+
}
|
|
13560
13615
|
match serde_json::to_value(&self) {
|
|
13561
13616
|
Ok(v) => json_to_ruby(handle, v),
|
|
13562
13617
|
Err(_) => handle.qnil().into_value_with(handle),
|
data/lib/liter_llm/native.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:2ec0e6553bbcedb66f6c3024962b14e6abefa6fe12da4e3932e31f38aebab98b
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
# frozen_string_literal: true
|
|
@@ -80,7 +80,7 @@ module LiterLlm
|
|
|
80
80
|
# @return [self]
|
|
81
81
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
82
82
|
def self.from_hash(hash)
|
|
83
|
-
new(text: hash[:text]
|
|
83
|
+
new(text: hash.key?(:text) ? hash[:text] : hash["text"])
|
|
84
84
|
end
|
|
85
85
|
end
|
|
86
86
|
## A refusal — the model declined to respond.
|
|
@@ -103,7 +103,7 @@ module LiterLlm
|
|
|
103
103
|
# @return [self]
|
|
104
104
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
105
105
|
def self.from_hash(hash)
|
|
106
|
-
new(refusal: hash[:refusal]
|
|
106
|
+
new(refusal: hash.key?(:refusal) ? hash[:refusal] : hash["refusal"])
|
|
107
107
|
end
|
|
108
108
|
end
|
|
109
109
|
## An image produced by the model (e.g. `gpt-image-1`, Gemini Imagen).
|
|
@@ -126,7 +126,7 @@ module LiterLlm
|
|
|
126
126
|
# @return [self]
|
|
127
127
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
128
128
|
def self.from_hash(hash)
|
|
129
|
-
new(image_url: hash[:image_url]
|
|
129
|
+
new(image_url: hash.key?(:image_url) ? hash[:image_url] : hash["image_url"])
|
|
130
130
|
end
|
|
131
131
|
end
|
|
132
132
|
## Audio produced by the model (e.g. `gpt-4o-audio-preview`).
|
|
@@ -149,7 +149,7 @@ module LiterLlm
|
|
|
149
149
|
# @return [self]
|
|
150
150
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
151
151
|
def self.from_hash(hash)
|
|
152
|
-
new(audio: hash[:audio]
|
|
152
|
+
new(audio: hash.key?(:audio) ? hash[:audio] : hash["audio"])
|
|
153
153
|
end
|
|
154
154
|
end
|
|
155
155
|
end
|
|
@@ -210,7 +210,7 @@ module LiterLlm
|
|
|
210
210
|
# @return [self]
|
|
211
211
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
212
212
|
def self.from_hash(hash)
|
|
213
|
-
new(scheme: hash[:scheme]
|
|
213
|
+
new(scheme: hash.key?(:scheme) ? hash[:scheme] : hash["scheme"], config: hash.key?(:config) ? hash[:config] : hash["config"])
|
|
214
214
|
end
|
|
215
215
|
end
|
|
216
216
|
end
|
|
@@ -258,7 +258,7 @@ module LiterLlm
|
|
|
258
258
|
# @return [self]
|
|
259
259
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
260
260
|
def self.from_hash(hash)
|
|
261
|
-
new(text: hash[:text]
|
|
261
|
+
new(text: hash.key?(:text) ? hash[:text] : hash["text"])
|
|
262
262
|
end
|
|
263
263
|
end
|
|
264
264
|
## Image identified by URL (with optional detail level).
|
|
@@ -281,7 +281,7 @@ module LiterLlm
|
|
|
281
281
|
# @return [self]
|
|
282
282
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
283
283
|
def self.from_hash(hash)
|
|
284
|
-
new(image_url: hash[:image_url]
|
|
284
|
+
new(image_url: hash.key?(:image_url) ? hash[:image_url] : hash["image_url"])
|
|
285
285
|
end
|
|
286
286
|
end
|
|
287
287
|
## Document file (PDF, CSV, etc.) as base64 or URL.
|
|
@@ -304,7 +304,7 @@ module LiterLlm
|
|
|
304
304
|
# @return [self]
|
|
305
305
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
306
306
|
def self.from_hash(hash)
|
|
307
|
-
new(document: hash[:document]
|
|
307
|
+
new(document: hash.key?(:document) ? hash[:document] : hash["document"])
|
|
308
308
|
end
|
|
309
309
|
end
|
|
310
310
|
## Audio input as base64.
|
|
@@ -327,7 +327,7 @@ module LiterLlm
|
|
|
327
327
|
# @return [self]
|
|
328
328
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
329
329
|
def self.from_hash(hash)
|
|
330
|
-
new(input_audio: hash[:input_audio]
|
|
330
|
+
new(input_audio: hash.key?(:input_audio) ? hash[:input_audio] : hash["input_audio"])
|
|
331
331
|
end
|
|
332
332
|
end
|
|
333
333
|
end
|
|
@@ -372,7 +372,7 @@ module LiterLlm
|
|
|
372
372
|
# @return [self]
|
|
373
373
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
374
374
|
def self.from_hash(hash)
|
|
375
|
-
new(text: hash[:text]
|
|
375
|
+
new(text: hash.key?(:text) ? hash[:text] : hash["text"])
|
|
376
376
|
end
|
|
377
377
|
end
|
|
378
378
|
## Image identified by a data URL or HTTP/HTTPS URL.
|
|
@@ -393,7 +393,7 @@ module LiterLlm
|
|
|
393
393
|
# @return [self]
|
|
394
394
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
395
395
|
def self.from_hash(hash)
|
|
396
|
-
new(image_url: hash[:image_url]
|
|
396
|
+
new(image_url: hash.key?(:image_url) ? hash[:image_url] : hash["image_url"])
|
|
397
397
|
end
|
|
398
398
|
end
|
|
399
399
|
## Image encoded as a complete data URL.
|
|
@@ -414,7 +414,7 @@ module LiterLlm
|
|
|
414
414
|
# @return [self]
|
|
415
415
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
416
416
|
def self.from_hash(hash)
|
|
417
|
-
new(image_base64: hash[:image_base64]
|
|
417
|
+
new(image_base64: hash.key?(:image_base64) ? hash[:image_base64] : hash["image_base64"])
|
|
418
418
|
end
|
|
419
419
|
end
|
|
420
420
|
end
|
|
@@ -651,7 +651,7 @@ module LiterLlm
|
|
|
651
651
|
# @return [self]
|
|
652
652
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
653
653
|
def self.from_hash(hash)
|
|
654
|
-
new(url: hash[:url]
|
|
654
|
+
new(url: hash.key?(:url) ? hash[:url] : hash["url"])
|
|
655
655
|
end
|
|
656
656
|
end
|
|
657
657
|
## Inline base64-encoded document data.
|
|
@@ -673,7 +673,7 @@ module LiterLlm
|
|
|
673
673
|
# @return [self]
|
|
674
674
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
675
675
|
def self.from_hash(hash)
|
|
676
|
-
new(data: hash[:data]
|
|
676
|
+
new(data: hash.key?(:data) ? hash[:data] : hash["data"], media_type: hash.key?(:media_type) ? hash[:media_type] : hash["media_type"])
|
|
677
677
|
end
|
|
678
678
|
end
|
|
679
679
|
end
|
|
@@ -769,7 +769,7 @@ module LiterLlm
|
|
|
769
769
|
# @return [self]
|
|
770
770
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.attached_class) }
|
|
771
771
|
def self.from_hash(hash)
|
|
772
|
-
new(json_schema: hash[:json_schema]
|
|
772
|
+
new(json_schema: hash.key?(:json_schema) ? hash[:json_schema] : hash["json_schema"])
|
|
773
773
|
end
|
|
774
774
|
end
|
|
775
775
|
end
|
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:8792656b96c005b1dedac3326ce3c00776ba9075824fc71a34ed86f34e1953bd
|
|
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.4.
|
|
9
|
+
VERSION = "2.4.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:0cefba00d6fed9bda30333573b644b571f0f024e4984d23c65a5835b4510c46b
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
@@ -981,7 +981,60 @@ module LiterLlm
|
|
|
981
981
|
class AssistantContent
|
|
982
982
|
end
|
|
983
983
|
|
|
984
|
-
|
|
984
|
+
module AssistantPart
|
|
985
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
986
|
+
end
|
|
987
|
+
|
|
988
|
+
class AssistantPartText
|
|
989
|
+
include AssistantPart
|
|
990
|
+
attr_reader text: String
|
|
991
|
+
|
|
992
|
+
def text?: () -> bool
|
|
993
|
+
def refusal?: () -> bool
|
|
994
|
+
def output_image?: () -> bool
|
|
995
|
+
def output_audio?: () -> bool
|
|
996
|
+
|
|
997
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
998
|
+
def self.new: (text: String) -> AssistantPartText
|
|
999
|
+
end
|
|
1000
|
+
|
|
1001
|
+
class AssistantPartRefusal
|
|
1002
|
+
include AssistantPart
|
|
1003
|
+
attr_reader refusal: String
|
|
1004
|
+
|
|
1005
|
+
def text?: () -> bool
|
|
1006
|
+
def refusal?: () -> bool
|
|
1007
|
+
def output_image?: () -> bool
|
|
1008
|
+
def output_audio?: () -> bool
|
|
1009
|
+
|
|
1010
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1011
|
+
def self.new: (refusal: String) -> AssistantPartRefusal
|
|
1012
|
+
end
|
|
1013
|
+
|
|
1014
|
+
class AssistantPartOutputImage
|
|
1015
|
+
include AssistantPart
|
|
1016
|
+
attr_reader image_url: ImageUrl
|
|
1017
|
+
|
|
1018
|
+
def text?: () -> bool
|
|
1019
|
+
def refusal?: () -> bool
|
|
1020
|
+
def output_image?: () -> bool
|
|
1021
|
+
def output_audio?: () -> bool
|
|
1022
|
+
|
|
1023
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1024
|
+
def self.new: (image_url: ImageUrl) -> AssistantPartOutputImage
|
|
1025
|
+
end
|
|
1026
|
+
|
|
1027
|
+
class AssistantPartOutputAudio
|
|
1028
|
+
include AssistantPart
|
|
1029
|
+
attr_reader audio: AudioContent
|
|
1030
|
+
|
|
1031
|
+
def text?: () -> bool
|
|
1032
|
+
def refusal?: () -> bool
|
|
1033
|
+
def output_image?: () -> bool
|
|
1034
|
+
def output_audio?: () -> bool
|
|
1035
|
+
|
|
1036
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1037
|
+
def self.new: (audio: AudioContent) -> AssistantPartOutputAudio
|
|
985
1038
|
end
|
|
986
1039
|
|
|
987
1040
|
class AuthHeaderFormat
|
|
@@ -991,15 +1044,127 @@ module LiterLlm
|
|
|
991
1044
|
|
|
992
1045
|
type enum_BatchStatus = :validating | :failed | :in_progress | :finalizing | :completed | :expired | :cancelling | :cancelled
|
|
993
1046
|
|
|
994
|
-
|
|
1047
|
+
module CacheBackend
|
|
1048
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1049
|
+
end
|
|
1050
|
+
|
|
1051
|
+
class CacheBackendMemory
|
|
1052
|
+
include CacheBackend
|
|
1053
|
+
def memory?: () -> bool
|
|
1054
|
+
def open_dal?: () -> bool
|
|
1055
|
+
|
|
1056
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1057
|
+
def self.new: -> CacheBackendMemory
|
|
1058
|
+
end
|
|
1059
|
+
|
|
1060
|
+
class CacheBackendOpenDal
|
|
1061
|
+
include CacheBackend
|
|
1062
|
+
attr_reader scheme: String
|
|
1063
|
+
attr_reader config: Hash[String, String]
|
|
1064
|
+
|
|
1065
|
+
def memory?: () -> bool
|
|
1066
|
+
def open_dal?: () -> bool
|
|
1067
|
+
|
|
1068
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1069
|
+
def self.new: (scheme: String, config: Hash[String, String]) -> CacheBackendOpenDal
|
|
995
1070
|
end
|
|
996
1071
|
|
|
997
1072
|
type enum_CircuitState = :Closed | :Open | :HalfOpen
|
|
998
1073
|
|
|
999
|
-
|
|
1074
|
+
module ContentPart
|
|
1075
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1076
|
+
end
|
|
1077
|
+
|
|
1078
|
+
class ContentPartText
|
|
1079
|
+
include ContentPart
|
|
1080
|
+
attr_reader text: String
|
|
1081
|
+
|
|
1082
|
+
def text?: () -> bool
|
|
1083
|
+
def image_url?: () -> bool
|
|
1084
|
+
def document?: () -> bool
|
|
1085
|
+
def input_audio?: () -> bool
|
|
1086
|
+
|
|
1087
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1088
|
+
def self.new: (text: String) -> ContentPartText
|
|
1000
1089
|
end
|
|
1001
1090
|
|
|
1002
|
-
class
|
|
1091
|
+
class ContentPartImageUrl
|
|
1092
|
+
include ContentPart
|
|
1093
|
+
attr_reader image_url: ImageUrl
|
|
1094
|
+
|
|
1095
|
+
def text?: () -> bool
|
|
1096
|
+
def image_url?: () -> bool
|
|
1097
|
+
def document?: () -> bool
|
|
1098
|
+
def input_audio?: () -> bool
|
|
1099
|
+
|
|
1100
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1101
|
+
def self.new: (image_url: ImageUrl) -> ContentPartImageUrl
|
|
1102
|
+
end
|
|
1103
|
+
|
|
1104
|
+
class ContentPartDocument
|
|
1105
|
+
include ContentPart
|
|
1106
|
+
attr_reader document: DocumentContent
|
|
1107
|
+
|
|
1108
|
+
def text?: () -> bool
|
|
1109
|
+
def image_url?: () -> bool
|
|
1110
|
+
def document?: () -> bool
|
|
1111
|
+
def input_audio?: () -> bool
|
|
1112
|
+
|
|
1113
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1114
|
+
def self.new: (document: DocumentContent) -> ContentPartDocument
|
|
1115
|
+
end
|
|
1116
|
+
|
|
1117
|
+
class ContentPartInputAudio
|
|
1118
|
+
include ContentPart
|
|
1119
|
+
attr_reader input_audio: AudioContent
|
|
1120
|
+
|
|
1121
|
+
def text?: () -> bool
|
|
1122
|
+
def image_url?: () -> bool
|
|
1123
|
+
def document?: () -> bool
|
|
1124
|
+
def input_audio?: () -> bool
|
|
1125
|
+
|
|
1126
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1127
|
+
def self.new: (input_audio: AudioContent) -> ContentPartInputAudio
|
|
1128
|
+
end
|
|
1129
|
+
|
|
1130
|
+
module EmbeddingContentPart
|
|
1131
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1132
|
+
end
|
|
1133
|
+
|
|
1134
|
+
class EmbeddingContentPartText
|
|
1135
|
+
include EmbeddingContentPart
|
|
1136
|
+
attr_reader text: String
|
|
1137
|
+
|
|
1138
|
+
def text?: () -> bool
|
|
1139
|
+
def image_url?: () -> bool
|
|
1140
|
+
def image_base64?: () -> bool
|
|
1141
|
+
|
|
1142
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1143
|
+
def self.new: (text: String) -> EmbeddingContentPartText
|
|
1144
|
+
end
|
|
1145
|
+
|
|
1146
|
+
class EmbeddingContentPartImageUrl
|
|
1147
|
+
include EmbeddingContentPart
|
|
1148
|
+
attr_reader image_url: ImageUrl
|
|
1149
|
+
|
|
1150
|
+
def text?: () -> bool
|
|
1151
|
+
def image_url?: () -> bool
|
|
1152
|
+
def image_base64?: () -> bool
|
|
1153
|
+
|
|
1154
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1155
|
+
def self.new: (image_url: ImageUrl) -> EmbeddingContentPartImageUrl
|
|
1156
|
+
end
|
|
1157
|
+
|
|
1158
|
+
class EmbeddingContentPartImageBase64
|
|
1159
|
+
include EmbeddingContentPart
|
|
1160
|
+
attr_reader image_base64: String
|
|
1161
|
+
|
|
1162
|
+
def text?: () -> bool
|
|
1163
|
+
def image_url?: () -> bool
|
|
1164
|
+
def image_base64?: () -> bool
|
|
1165
|
+
|
|
1166
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1167
|
+
def self.new: (image_base64: String) -> EmbeddingContentPartImageBase64
|
|
1003
1168
|
end
|
|
1004
1169
|
|
|
1005
1170
|
type enum_EmbeddingFormat = :float | :base64
|
|
@@ -1017,7 +1182,98 @@ module LiterLlm
|
|
|
1017
1182
|
|
|
1018
1183
|
type enum_ImageDetail = :low | :high | :auto
|
|
1019
1184
|
|
|
1020
|
-
|
|
1185
|
+
module Message
|
|
1186
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1187
|
+
end
|
|
1188
|
+
|
|
1189
|
+
class MessageSystem
|
|
1190
|
+
include Message
|
|
1191
|
+
attr_reader value: SystemMessage
|
|
1192
|
+
|
|
1193
|
+
def system?: () -> bool
|
|
1194
|
+
def user?: () -> bool
|
|
1195
|
+
def assistant?: () -> bool
|
|
1196
|
+
def tool?: () -> bool
|
|
1197
|
+
def developer?: () -> bool
|
|
1198
|
+
def function?: () -> bool
|
|
1199
|
+
|
|
1200
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1201
|
+
def self.new: (value: SystemMessage) -> MessageSystem
|
|
1202
|
+
end
|
|
1203
|
+
|
|
1204
|
+
class MessageUser
|
|
1205
|
+
include Message
|
|
1206
|
+
attr_reader value: UserMessage
|
|
1207
|
+
|
|
1208
|
+
def system?: () -> bool
|
|
1209
|
+
def user?: () -> bool
|
|
1210
|
+
def assistant?: () -> bool
|
|
1211
|
+
def tool?: () -> bool
|
|
1212
|
+
def developer?: () -> bool
|
|
1213
|
+
def function?: () -> bool
|
|
1214
|
+
|
|
1215
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1216
|
+
def self.new: (value: UserMessage) -> MessageUser
|
|
1217
|
+
end
|
|
1218
|
+
|
|
1219
|
+
class MessageAssistant
|
|
1220
|
+
include Message
|
|
1221
|
+
attr_reader value: AssistantMessage
|
|
1222
|
+
|
|
1223
|
+
def system?: () -> bool
|
|
1224
|
+
def user?: () -> bool
|
|
1225
|
+
def assistant?: () -> bool
|
|
1226
|
+
def tool?: () -> bool
|
|
1227
|
+
def developer?: () -> bool
|
|
1228
|
+
def function?: () -> bool
|
|
1229
|
+
|
|
1230
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1231
|
+
def self.new: (value: AssistantMessage) -> MessageAssistant
|
|
1232
|
+
end
|
|
1233
|
+
|
|
1234
|
+
class MessageTool
|
|
1235
|
+
include Message
|
|
1236
|
+
attr_reader value: ToolMessage
|
|
1237
|
+
|
|
1238
|
+
def system?: () -> bool
|
|
1239
|
+
def user?: () -> bool
|
|
1240
|
+
def assistant?: () -> bool
|
|
1241
|
+
def tool?: () -> bool
|
|
1242
|
+
def developer?: () -> bool
|
|
1243
|
+
def function?: () -> bool
|
|
1244
|
+
|
|
1245
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1246
|
+
def self.new: (value: ToolMessage) -> MessageTool
|
|
1247
|
+
end
|
|
1248
|
+
|
|
1249
|
+
class MessageDeveloper
|
|
1250
|
+
include Message
|
|
1251
|
+
attr_reader value: DeveloperMessage
|
|
1252
|
+
|
|
1253
|
+
def system?: () -> bool
|
|
1254
|
+
def user?: () -> bool
|
|
1255
|
+
def assistant?: () -> bool
|
|
1256
|
+
def tool?: () -> bool
|
|
1257
|
+
def developer?: () -> bool
|
|
1258
|
+
def function?: () -> bool
|
|
1259
|
+
|
|
1260
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1261
|
+
def self.new: (value: DeveloperMessage) -> MessageDeveloper
|
|
1262
|
+
end
|
|
1263
|
+
|
|
1264
|
+
class MessageFunction
|
|
1265
|
+
include Message
|
|
1266
|
+
attr_reader value: FunctionMessage
|
|
1267
|
+
|
|
1268
|
+
def system?: () -> bool
|
|
1269
|
+
def user?: () -> bool
|
|
1270
|
+
def assistant?: () -> bool
|
|
1271
|
+
def tool?: () -> bool
|
|
1272
|
+
def developer?: () -> bool
|
|
1273
|
+
def function?: () -> bool
|
|
1274
|
+
|
|
1275
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1276
|
+
def self.new: (value: FunctionMessage) -> MessageFunction
|
|
1021
1277
|
end
|
|
1022
1278
|
|
|
1023
1279
|
type enum_Modality = :text | :audio | :image
|
|
@@ -1025,7 +1281,31 @@ module LiterLlm
|
|
|
1025
1281
|
class ModerationInput
|
|
1026
1282
|
end
|
|
1027
1283
|
|
|
1028
|
-
|
|
1284
|
+
module OcrDocument
|
|
1285
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1286
|
+
end
|
|
1287
|
+
|
|
1288
|
+
class OcrDocumentUrl
|
|
1289
|
+
include OcrDocument
|
|
1290
|
+
attr_reader url: String
|
|
1291
|
+
|
|
1292
|
+
def url?: () -> bool
|
|
1293
|
+
def base64?: () -> bool
|
|
1294
|
+
|
|
1295
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1296
|
+
def self.new: (url: String) -> OcrDocumentUrl
|
|
1297
|
+
end
|
|
1298
|
+
|
|
1299
|
+
class OcrDocumentBase64
|
|
1300
|
+
include OcrDocument
|
|
1301
|
+
attr_reader data: String
|
|
1302
|
+
attr_reader media_type: String
|
|
1303
|
+
|
|
1304
|
+
def url?: () -> bool
|
|
1305
|
+
def base64?: () -> bool
|
|
1306
|
+
|
|
1307
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1308
|
+
def self.new: (data: String, media_type: String) -> OcrDocumentBase64
|
|
1029
1309
|
end
|
|
1030
1310
|
|
|
1031
1311
|
type enum_ReasoningEffort = :low | :medium | :high | :minimal | :max | :none
|
|
@@ -1037,7 +1317,40 @@ module LiterLlm
|
|
|
1037
1317
|
|
|
1038
1318
|
end
|
|
1039
1319
|
|
|
1040
|
-
|
|
1320
|
+
module ResponseFormat
|
|
1321
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1322
|
+
end
|
|
1323
|
+
|
|
1324
|
+
class ResponseFormatText
|
|
1325
|
+
include ResponseFormat
|
|
1326
|
+
def text?: () -> bool
|
|
1327
|
+
def json_object?: () -> bool
|
|
1328
|
+
def json_schema?: () -> bool
|
|
1329
|
+
|
|
1330
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1331
|
+
def self.new: -> ResponseFormatText
|
|
1332
|
+
end
|
|
1333
|
+
|
|
1334
|
+
class ResponseFormatJsonObject
|
|
1335
|
+
include ResponseFormat
|
|
1336
|
+
def text?: () -> bool
|
|
1337
|
+
def json_object?: () -> bool
|
|
1338
|
+
def json_schema?: () -> bool
|
|
1339
|
+
|
|
1340
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1341
|
+
def self.new: -> ResponseFormatJsonObject
|
|
1342
|
+
end
|
|
1343
|
+
|
|
1344
|
+
class ResponseFormatJsonSchema
|
|
1345
|
+
include ResponseFormat
|
|
1346
|
+
attr_reader json_schema: JsonSchemaFormat
|
|
1347
|
+
|
|
1348
|
+
def text?: () -> bool
|
|
1349
|
+
def json_object?: () -> bool
|
|
1350
|
+
def json_schema?: () -> bool
|
|
1351
|
+
|
|
1352
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
1353
|
+
def self.new: (json_schema: JsonSchemaFormat) -> ResponseFormatJsonSchema
|
|
1041
1354
|
end
|
|
1042
1355
|
|
|
1043
1356
|
class StopSequence
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: liter_llm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Na'aman Hirschfeld
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-10-
|
|
12
|
+
date: 2026-10-31 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rb_sys
|