@xberg-io/liter-llm-wasm 1.18.3 → 1.19.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.
- package/README.md +5 -1
- package/liter_llm_wasm.d.ts +27 -17
- package/liter_llm_wasm.js +87 -23
- package/liter_llm_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/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:1d4732ba1ab4d39552d24e92e96137684641e4858e08055421f59e92eaa3abd1 -->
|
|
3
3
|
<!-- To regenerate: alef readme -->
|
|
4
4
|
<!-- To verify freshness: alef verify -->
|
|
5
5
|
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
<a href="https://github.com/xberg-io/homebrew-tap/blob/main/Formula/liter-llm.rb">
|
|
55
55
|
<img src="https://img.shields.io/badge/Homebrew-007ec6?logo=homebrew&logoColor=white" alt="Homebrew" />
|
|
56
56
|
</a>
|
|
57
|
+
<a href="https://github.com/xberg-io/scoop-bucket/blob/main/bucket/liter-llm.json">
|
|
58
|
+
<img src="https://img.shields.io/badge/Scoop-007ec6" alt="Scoop" />
|
|
59
|
+
</a>
|
|
57
60
|
<a href="https://github.com/xberg-io/liter-llm/tree/main/crates/liter-llm-ffi">
|
|
58
61
|
<img src="https://img.shields.io/badge/C-FFI-007ec6" alt="C FFI" />
|
|
59
62
|
</a>
|
|
@@ -241,6 +244,7 @@ Beyond the SDK, the `liter-llm` CLI ships an OpenAI-compatible proxy and a Model
|
|
|
241
244
|
|
|
242
245
|
```bash
|
|
243
246
|
brew install xberg-io/tap/liter-llm # or: cargo install liter-llm-cli
|
|
247
|
+
# Windows: scoop bucket add xberg https://github.com/xberg-io/scoop-bucket && scoop install liter-llm
|
|
244
248
|
liter-llm api --config liter-llm-proxy.toml # OpenAI-compatible proxy
|
|
245
249
|
liter-llm mcp --transport stdio # MCP tool server
|
|
246
250
|
|
package/liter_llm_wasm.d.ts
CHANGED
|
@@ -20,16 +20,16 @@ export type WasmToolChoiceModeWire = "auto" | "required" | "none";
|
|
|
20
20
|
|
|
21
21
|
export type WasmToolTypeWire = "function";
|
|
22
22
|
|
|
23
|
-
export interface
|
|
23
|
+
export interface WasmSpecificFunctionWire {
|
|
24
24
|
name: string;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export interface
|
|
28
|
-
|
|
29
|
-
function:
|
|
27
|
+
export interface WasmSpecificToolChoiceWire {
|
|
28
|
+
type: WasmToolTypeWire;
|
|
29
|
+
"function": WasmSpecificFunctionWire;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export type WasmToolChoice = WasmToolChoiceModeWire |
|
|
32
|
+
export type WasmToolChoice = WasmToolChoiceModeWire | WasmSpecificToolChoiceWire;
|
|
33
33
|
|
|
34
34
|
export type WasmUserContent = string | any[];
|
|
35
35
|
|
|
@@ -172,10 +172,14 @@ export class WasmAuthConfig {
|
|
|
172
172
|
/**
|
|
173
173
|
* How the API key is sent in the HTTP request.
|
|
174
174
|
*/
|
|
175
|
-
export
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
export class WasmAuthHeaderFormat {
|
|
176
|
+
free(): void;
|
|
177
|
+
[Symbol.dispose](): void;
|
|
178
|
+
static default(): WasmAuthHeaderFormat;
|
|
179
|
+
constructor();
|
|
180
|
+
get 0(): string | undefined;
|
|
181
|
+
set 0(value: string | null | undefined);
|
|
182
|
+
type: string;
|
|
179
183
|
}
|
|
180
184
|
|
|
181
185
|
/**
|
|
@@ -625,9 +629,8 @@ export class WasmCustomProviderConfig {
|
|
|
625
629
|
free(): void;
|
|
626
630
|
[Symbol.dispose](): void;
|
|
627
631
|
static default(): WasmCustomProviderConfig;
|
|
628
|
-
constructor(name: string, baseUrl: string, authHeader:
|
|
629
|
-
|
|
630
|
-
set authHeader(value: WasmAuthHeaderFormat);
|
|
632
|
+
constructor(name: string, baseUrl: string, authHeader: any, modelPrefixes: string[]);
|
|
633
|
+
authHeader: any;
|
|
631
634
|
baseUrl: string;
|
|
632
635
|
modelPrefixes: string[];
|
|
633
636
|
name: string;
|
|
@@ -2228,6 +2231,7 @@ export interface InitOutput {
|
|
|
2228
2231
|
readonly __wbg_wasmassistantpart_free: (a: number, b: number) => void;
|
|
2229
2232
|
readonly __wbg_wasmaudiocontent_free: (a: number, b: number) => void;
|
|
2230
2233
|
readonly __wbg_wasmauthconfig_free: (a: number, b: number) => void;
|
|
2234
|
+
readonly __wbg_wasmauthheaderformat_free: (a: number, b: number) => void;
|
|
2231
2235
|
readonly __wbg_wasmbatchlistquery_free: (a: number, b: number) => void;
|
|
2232
2236
|
readonly __wbg_wasmbatchlistresponse_free: (a: number, b: number) => void;
|
|
2233
2237
|
readonly __wbg_wasmbatchobject_free: (a: number, b: number) => void;
|
|
@@ -2379,6 +2383,11 @@ export interface InitOutput {
|
|
|
2379
2383
|
readonly wasmauthconfig_new: (a: number, b: number, c: number) => number;
|
|
2380
2384
|
readonly wasmauthconfig_set_authType: (a: number, b: number) => void;
|
|
2381
2385
|
readonly wasmauthconfig_set_envVar: (a: number, b: number, c: number) => void;
|
|
2386
|
+
readonly wasmauthheaderformat_0: (a: number) => [number, number];
|
|
2387
|
+
readonly wasmauthheaderformat_default: () => number;
|
|
2388
|
+
readonly wasmauthheaderformat_set_0: (a: number, b: number, c: number) => void;
|
|
2389
|
+
readonly wasmauthheaderformat_set_type: (a: number, b: number, c: number) => void;
|
|
2390
|
+
readonly wasmauthheaderformat_type: (a: number) => [number, number];
|
|
2382
2391
|
readonly wasmbatchlistquery_after: (a: number) => [number, number];
|
|
2383
2392
|
readonly wasmbatchlistquery_default: () => number;
|
|
2384
2393
|
readonly wasmbatchlistquery_limit: (a: number) => number;
|
|
@@ -2647,13 +2656,13 @@ export interface InitOutput {
|
|
|
2647
2656
|
readonly wasmcreatetranscriptionrequest_set_model: (a: number, b: number, c: number) => void;
|
|
2648
2657
|
readonly wasmcreatetranscriptionrequest_set_prompt: (a: number, b: number, c: number) => void;
|
|
2649
2658
|
readonly wasmcreatetranscriptionrequest_set_responseFormat: (a: number, b: number, c: number) => void;
|
|
2650
|
-
readonly wasmcustomproviderconfig_authHeader: (a: number) =>
|
|
2659
|
+
readonly wasmcustomproviderconfig_authHeader: (a: number) => any;
|
|
2651
2660
|
readonly wasmcustomproviderconfig_baseUrl: (a: number) => [number, number];
|
|
2652
2661
|
readonly wasmcustomproviderconfig_default: () => number;
|
|
2653
2662
|
readonly wasmcustomproviderconfig_modelPrefixes: (a: number) => [number, number];
|
|
2654
2663
|
readonly wasmcustomproviderconfig_name: (a: number) => [number, number];
|
|
2655
|
-
readonly wasmcustomproviderconfig_new: (a: number, b: number, c: number, d: number, e:
|
|
2656
|
-
readonly wasmcustomproviderconfig_set_authHeader: (a: number, b:
|
|
2664
|
+
readonly wasmcustomproviderconfig_new: (a: number, b: number, c: number, d: number, e: any, f: number, g: number) => number;
|
|
2665
|
+
readonly wasmcustomproviderconfig_set_authHeader: (a: number, b: any) => void;
|
|
2657
2666
|
readonly wasmcustomproviderconfig_set_baseUrl: (a: number, b: number, c: number) => void;
|
|
2658
2667
|
readonly wasmcustomproviderconfig_set_modelPrefixes: (a: number, b: number, c: number) => void;
|
|
2659
2668
|
readonly wasmcustomproviderconfig_set_name: (a: number, b: number, c: number) => void;
|
|
@@ -2697,7 +2706,6 @@ export interface InitOutput {
|
|
|
2697
2706
|
readonly wasmdeleteresponse_set_id: (a: number, b: number, c: number) => void;
|
|
2698
2707
|
readonly wasmdeleteresponse_set_object: (a: number, b: number, c: number) => void;
|
|
2699
2708
|
readonly wasmdevelopermessage_content: (a: number) => [number, number];
|
|
2700
|
-
readonly wasmdevelopermessage_default: () => number;
|
|
2701
2709
|
readonly wasmdevelopermessage_name: (a: number) => [number, number];
|
|
2702
2710
|
readonly wasmdevelopermessage_new: (a: number, b: number, c: number, d: number) => number;
|
|
2703
2711
|
readonly wasmdevelopermessage_set_content: (a: number, b: number, c: number) => void;
|
|
@@ -3252,6 +3260,8 @@ export interface InitOutput {
|
|
|
3252
3260
|
readonly wasmwaitforbatchconfig_default: () => number;
|
|
3253
3261
|
readonly wasmwaitforbatchconfig_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
3254
3262
|
readonly wasmwaitforbatchconfig_set_backoffMultiplier: (a: number, b: number) => void;
|
|
3263
|
+
readonly wasmauthheaderformat_new: () => number;
|
|
3264
|
+
readonly wasmdevelopermessage_default: () => number;
|
|
3255
3265
|
readonly wasmmessage_new: () => number;
|
|
3256
3266
|
readonly wasmocrimage_default: () => number;
|
|
3257
3267
|
readonly wasmresponseformat_new: () => number;
|
|
@@ -3364,6 +3374,7 @@ export interface InitOutput {
|
|
|
3364
3374
|
readonly wasmchatcompletionresponse_usage: (a: number) => number;
|
|
3365
3375
|
readonly wasmembeddingresponse_usage: (a: number) => number;
|
|
3366
3376
|
readonly wasmocrresponse_usage: (a: number) => number;
|
|
3377
|
+
readonly wasmresponsetool_default: () => number;
|
|
3367
3378
|
readonly wasmocrrequest_set_includeImageBase64: (a: number, b: number) => void;
|
|
3368
3379
|
readonly wasmassistantpart_new: () => number;
|
|
3369
3380
|
readonly wasmcontentpart_new: () => number;
|
|
@@ -3395,7 +3406,6 @@ export interface InitOutput {
|
|
|
3395
3406
|
readonly wasmmodeltier_set_cacheReadInputTokenCost: (a: number, b: number, c: number) => void;
|
|
3396
3407
|
readonly wasmtranscriptionresponse_set_duration: (a: number, b: number, c: number) => void;
|
|
3397
3408
|
readonly wasmwaitforbatchconfig_set_timeoutSecs: (a: number, b: number, c: number) => void;
|
|
3398
|
-
readonly wasmresponsetool_default: () => number;
|
|
3399
3409
|
readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
3400
3410
|
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
3401
3411
|
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
package/liter_llm_wasm.js
CHANGED
|
@@ -691,13 +691,82 @@ if (Symbol.dispose) WasmAuthConfig.prototype[Symbol.dispose] = WasmAuthConfig.pr
|
|
|
691
691
|
|
|
692
692
|
/**
|
|
693
693
|
* How the API key is sent in the HTTP request.
|
|
694
|
-
* @enum {0 | 1 | 2}
|
|
695
694
|
*/
|
|
696
|
-
export
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
695
|
+
export class WasmAuthHeaderFormat {
|
|
696
|
+
static __wrap(ptr) {
|
|
697
|
+
const obj = Object.create(WasmAuthHeaderFormat.prototype);
|
|
698
|
+
obj.__wbg_ptr = ptr;
|
|
699
|
+
WasmAuthHeaderFormatFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
700
|
+
return obj;
|
|
701
|
+
}
|
|
702
|
+
__destroy_into_raw() {
|
|
703
|
+
const ptr = this.__wbg_ptr;
|
|
704
|
+
this.__wbg_ptr = 0;
|
|
705
|
+
WasmAuthHeaderFormatFinalization.unregister(this);
|
|
706
|
+
return ptr;
|
|
707
|
+
}
|
|
708
|
+
free() {
|
|
709
|
+
const ptr = this.__destroy_into_raw();
|
|
710
|
+
wasm.__wbg_wasmauthheaderformat_free(ptr, 0);
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* @returns {string | undefined}
|
|
714
|
+
*/
|
|
715
|
+
get 0() {
|
|
716
|
+
const ret = wasm.wasmauthheaderformat_0(this.__wbg_ptr);
|
|
717
|
+
let v1;
|
|
718
|
+
if (ret[0] !== 0) {
|
|
719
|
+
v1 = getStringFromWasm0(ret[0], ret[1]);
|
|
720
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
721
|
+
}
|
|
722
|
+
return v1;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* @returns {WasmAuthHeaderFormat}
|
|
726
|
+
*/
|
|
727
|
+
static default() {
|
|
728
|
+
const ret = wasm.wasmauthheaderformat_default();
|
|
729
|
+
return WasmAuthHeaderFormat.__wrap(ret);
|
|
730
|
+
}
|
|
731
|
+
constructor() {
|
|
732
|
+
const ret = wasm.wasmauthheaderformat_new();
|
|
733
|
+
this.__wbg_ptr = ret;
|
|
734
|
+
WasmAuthHeaderFormatFinalization.register(this, this.__wbg_ptr, this);
|
|
735
|
+
return this;
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* @param {string | null} [value]
|
|
739
|
+
*/
|
|
740
|
+
set 0(value) {
|
|
741
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
742
|
+
var len0 = WASM_VECTOR_LEN;
|
|
743
|
+
wasm.wasmauthheaderformat_set_0(this.__wbg_ptr, ptr0, len0);
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* @param {string} value
|
|
747
|
+
*/
|
|
748
|
+
set type(value) {
|
|
749
|
+
const ptr0 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
750
|
+
const len0 = WASM_VECTOR_LEN;
|
|
751
|
+
wasm.wasmauthheaderformat_set_type(this.__wbg_ptr, ptr0, len0);
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* @returns {string}
|
|
755
|
+
*/
|
|
756
|
+
get type() {
|
|
757
|
+
let deferred1_0;
|
|
758
|
+
let deferred1_1;
|
|
759
|
+
try {
|
|
760
|
+
const ret = wasm.wasmauthheaderformat_type(this.__wbg_ptr);
|
|
761
|
+
deferred1_0 = ret[0];
|
|
762
|
+
deferred1_1 = ret[1];
|
|
763
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
764
|
+
} finally {
|
|
765
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
if (Symbol.dispose) WasmAuthHeaderFormat.prototype[Symbol.dispose] = WasmAuthHeaderFormat.prototype.free;
|
|
701
770
|
|
|
702
771
|
/**
|
|
703
772
|
* Auth scheme used by a provider.
|
|
@@ -3932,19 +4001,11 @@ export class WasmCustomProviderConfig {
|
|
|
3932
4001
|
wasm.__wbg_wasmcustomproviderconfig_free(ptr, 0);
|
|
3933
4002
|
}
|
|
3934
4003
|
/**
|
|
3935
|
-
* @returns {
|
|
4004
|
+
* @returns {any}
|
|
3936
4005
|
*/
|
|
3937
4006
|
get authHeader() {
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
try {
|
|
3941
|
-
const ret = wasm.wasmcustomproviderconfig_authHeader(this.__wbg_ptr);
|
|
3942
|
-
deferred1_0 = ret[0];
|
|
3943
|
-
deferred1_1 = ret[1];
|
|
3944
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
3945
|
-
} finally {
|
|
3946
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3947
|
-
}
|
|
4007
|
+
const ret = wasm.wasmcustomproviderconfig_authHeader(this.__wbg_ptr);
|
|
4008
|
+
return ret;
|
|
3948
4009
|
}
|
|
3949
4010
|
/**
|
|
3950
4011
|
* @returns {string}
|
|
@@ -3995,7 +4056,7 @@ export class WasmCustomProviderConfig {
|
|
|
3995
4056
|
/**
|
|
3996
4057
|
* @param {string} name
|
|
3997
4058
|
* @param {string} baseUrl
|
|
3998
|
-
* @param {
|
|
4059
|
+
* @param {any} authHeader
|
|
3999
4060
|
* @param {string[]} modelPrefixes
|
|
4000
4061
|
*/
|
|
4001
4062
|
constructor(name, baseUrl, authHeader, modelPrefixes) {
|
|
@@ -4011,7 +4072,7 @@ export class WasmCustomProviderConfig {
|
|
|
4011
4072
|
return this;
|
|
4012
4073
|
}
|
|
4013
4074
|
/**
|
|
4014
|
-
* @param {
|
|
4075
|
+
* @param {any} value
|
|
4015
4076
|
*/
|
|
4016
4077
|
set authHeader(value) {
|
|
4017
4078
|
wasm.wasmcustomproviderconfig_set_authHeader(this.__wbg_ptr, value);
|
|
@@ -13682,22 +13743,22 @@ function __wbg_get_imports() {
|
|
|
13682
13743
|
return ret;
|
|
13683
13744
|
},
|
|
13684
13745
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
13685
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
13746
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 843, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
13686
13747
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h667483e89d9b83b0);
|
|
13687
13748
|
return ret;
|
|
13688
13749
|
},
|
|
13689
13750
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
13690
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
13751
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 863, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
13691
13752
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hb69aa43042a172e9);
|
|
13692
13753
|
return ret;
|
|
13693
13754
|
},
|
|
13694
13755
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
13695
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
13756
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 768, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
13696
13757
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__ha0196e5ce9bd92f7);
|
|
13697
13758
|
return ret;
|
|
13698
13759
|
},
|
|
13699
13760
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
13700
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
13761
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 784, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
13701
13762
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hc5a94ae7f9ac4e35);
|
|
13702
13763
|
return ret;
|
|
13703
13764
|
},
|
|
@@ -13802,6 +13863,9 @@ const WasmAudioContentFinalization = (typeof FinalizationRegistry === 'undefined
|
|
|
13802
13863
|
const WasmAuthConfigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
13803
13864
|
? { register: () => {}, unregister: () => {} }
|
|
13804
13865
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmauthconfig_free(ptr, 1));
|
|
13866
|
+
const WasmAuthHeaderFormatFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
13867
|
+
? { register: () => {}, unregister: () => {} }
|
|
13868
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmauthheaderformat_free(ptr, 1));
|
|
13805
13869
|
const WasmBatchListQueryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
13806
13870
|
? { register: () => {}, unregister: () => {} }
|
|
13807
13871
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmbatchlistquery_free(ptr, 1));
|
package/liter_llm_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED