@roomle/embedding-lib 11.0.0-alpha.6 → 11.0.0-alpha.8
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/THIRD-PARTY-NOTICES.txt +1 -1
- package/ai.js +6 -6
- package/ai.min.js +5 -4
- package/{browser-D6M-d6y5.mjs → browser-Cys-y5Hy.mjs} +1 -2
- package/chat-model-B7BO8IhK.mjs +212 -0
- package/chat-model-XYf503pT.mjs +213 -0
- package/coerce-CuLRCRlo.mjs +6 -0
- package/coerce-Dup0o-HR.mjs +7 -0
- package/{comlink-CG3f9q6z.mjs → comlink-7u13Z2ZH.mjs} +2 -3
- package/{comlink-hSUzCx9j.mjs → comlink-DKhvPU0o.mjs} +1 -1
- package/configurator.js +3 -4
- package/configurator.min.js +2 -2
- package/construction.js +278 -24
- package/construction.min.js +284 -27
- package/continuation-CswXtOus.mjs +10 -0
- package/continuation-NclHDSgS.mjs +9 -0
- package/{dist-Cm3aF4sf.mjs → dist-7-X7Xqsl.mjs} +851 -919
- package/{dist-BQaw78-_.mjs → dist-BMxyw-Zs.mjs} +411 -405
- package/{dist-0WZWTj8T.mjs → dist-BU022PnG.mjs} +4 -9
- package/{dist-DkR6G9Kj.mjs → dist-BY8OLJ2p.mjs} +1 -1
- package/{dist-6TznX-Ae.mjs → dist-BZSd56sr.mjs} +3850 -3942
- package/{dist-70R0b5Mq.mjs → dist-Ba3J8AjB.mjs} +400 -390
- package/{dist-CTS0DDwt.mjs → dist-CbQKC1xX.mjs} +1590 -1616
- package/{dist-BmOBP9h9.mjs → dist-CiybWJvs.mjs} +44 -41
- package/{dist-CPG4atmb.mjs → dist-CkZuNdCU.mjs} +6 -4
- package/{dist-Bt1FopV4.mjs → dist-D2ZAAHGn.mjs} +1058 -1042
- package/{dist-BWNv7qW9.mjs → dist-DjsS42rR.mjs} +916 -962
- package/{dist-9UI7dzwc.mjs → dist-Jcq_kKKT.mjs} +403 -393
- package/{dist-D0XFfKEL.mjs → dist-S9sLSjZ4.mjs} +3112 -3104
- package/{dist-BV-32IEX.mjs → dist-XECXrV5Q.mjs} +1497 -1558
- package/{dist-Bc2s-kJZ.mjs → dist-a5_BIeaS.mjs} +45 -51
- package/{dist-Crrp-Bno.mjs → dist-bQAJDeYc.mjs} +698 -748
- package/docs/md/web/embedding/CHANGELOG.md +19 -64
- package/{drag-ghost-BpIDzSdK.mjs → drag-ghost-QZelgA-_.mjs} +2 -3
- package/{drag-ghost-Bhb0_67G.mjs → drag-ghost-VmgSWLva.mjs} +5 -7
- package/{drag-in-mE_ozj_Q.mjs → drag-in-Cd_67tzS.mjs} +4 -5
- package/{drag-in-CGBG4wEk.mjs → drag-in-DlDsgY4T.mjs} +3 -3
- package/embedding-plugins.js +1 -2
- package/embedding-plugins.min.js +1 -2
- package/{experimental-evaluation-FzKFGoye.mjs → experimental-evaluation-B4hKMgFH.mjs} +19 -38
- package/{experimental-evaluation-DczxmJme.mjs → experimental-evaluation-DmqghFSx.mjs} +1 -1
- package/{from-custom-view-B3fIWMox.mjs → from-custom-view-6HMD_sPe.mjs} +5 -4
- package/{from-custom-view-B3HCOhdT.mjs → from-custom-view-BRFynafo.mjs} +16 -16
- package/{from-website-DaTahmvJ.mjs → from-website-Dl1VN4h7.mjs} +5 -6
- package/{from-website-DUQ9USj1.mjs → from-website-iZzauH4C.mjs} +3 -3
- package/hi.js +188 -197
- package/hi.min.js +193 -194
- package/mcp-tools-BLB7pCga.mjs +42 -0
- package/mcp-tools-BirFT2R0.mjs +41 -0
- package/package.json +1 -1
- package/packages/web-sdk/packages/assistant.d.ts +1 -0
- package/packages/web-sdk/packages/common-core/src/planning-assistant/runtime.d.ts +4 -1
- package/packages/web-sdk/packages/common-core/src/planning-assistant.d.ts +3 -0
- package/rolldown-runtime--db92txo.mjs +10 -0
- package/rolldown-runtime-CyjYJMBa.mjs +11 -0
- package/roomle-embedding-lib.js +25 -34
- package/roomle-embedding-lib.min.js +3 -3
- package/sbom.cdx.json +5 -5
- package/turn-limits-9LbUeSG2.mjs +9 -0
- package/turn-limits-Ciq383Bd.mjs +10 -0
- package/{utils-BwWn6Fw4.mjs → utils-CJnKZceY.mjs} +3 -4
- package/{utils-BoELtcEK.mjs → utils-DdNhTbJr.mjs} +6 -6
- package/chat-model-CZfZsgX9.mjs +0 -377
- package/chat-model-vgLJamoj.mjs +0 -373
- package/coerce-CqJod_GZ.mjs +0 -8
- package/coerce-CsI42_k0.mjs +0 -6
- package/mcp-tools-8qPMNqTK.mjs +0 -2
- package/mcp-tools-D_GxXscW.mjs +0 -2
- /package/{browser-BjtSrqbu.mjs → browser-CzLpXYFF.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { $t as e, Bt as t, D as n, Dn as r, E as i, H as a, Ht as o, Jt as s, K as c, O as l, Rt as u, S as d, St as f, Tt as p, Vt as m, Wt as h, X as g, Yt as _, Zt as v, _ as y, _t as b, an as x, bn as S, bt as C, dn as w, dt as T, f as E, ft as ee, h as D, in as O, jn as k, jt as A, kn as j, ln as M, o as N, ot as P, q as F, qt as te, sn as ne, st as re, tn as I, w as ie, yt as ae, zt as L } from "./dist-
|
|
3
|
-
|
|
2
|
+
import { $t as e, Bt as t, D as n, Dn as r, E as i, H as a, Ht as o, Jt as s, K as c, O as l, Rt as u, S as d, St as f, Tt as p, Vt as m, Wt as h, X as g, Yt as _, Zt as v, _ as y, _t as b, an as x, bn as S, bt as C, dn as w, dt as T, f as E, ft as ee, h as D, in as O, jn as k, jt as A, kn as j, ln as M, o as N, ot as P, q as F, qt as te, sn as ne, st as re, tn as I, w as ie, yt as ae, zt as L } from "./dist-XECXrV5Q.mjs";
|
|
3
|
+
// node_modules/@ai-sdk/mistral/dist/index.js
|
|
4
4
|
var R = x({
|
|
5
5
|
messages: s(e()).nullish(),
|
|
6
6
|
cached_tokens: O().nullish(),
|
|
@@ -134,9 +134,7 @@ function U(e) {
|
|
|
134
134
|
break;
|
|
135
135
|
case "content":
|
|
136
136
|
case "json":
|
|
137
|
-
case "error-json":
|
|
138
|
-
r = JSON.stringify(n.value);
|
|
139
|
-
break;
|
|
137
|
+
case "error-json": r = JSON.stringify(n.value);
|
|
140
138
|
}
|
|
141
139
|
t.push({
|
|
142
140
|
role: "tool",
|
|
@@ -169,17 +167,17 @@ var G = x({
|
|
|
169
167
|
parallelToolCalls: _().optional(),
|
|
170
168
|
promptCacheKey: M().optional(),
|
|
171
169
|
reasoningEffort: h(["high", "none"]).optional()
|
|
172
|
-
}), K =
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
170
|
+
}), K = x({
|
|
171
|
+
object: I("error"),
|
|
172
|
+
message: M(),
|
|
173
|
+
type: M(),
|
|
174
|
+
param: M().nullable(),
|
|
175
|
+
code: M().nullable()
|
|
176
|
+
}), q = ie({
|
|
177
|
+
errorSchema: K,
|
|
180
178
|
errorToMessage: (e) => e.message
|
|
181
179
|
});
|
|
182
|
-
function
|
|
180
|
+
function oe({ tools: e, toolChoice: t }) {
|
|
183
181
|
e = e?.length ? e : void 0;
|
|
184
182
|
let n = [];
|
|
185
183
|
if (e == null) return {
|
|
@@ -226,7 +224,7 @@ function q({ tools: e, toolChoice: t }) {
|
|
|
226
224
|
default: throw new k({ functionality: `tool choice type: ${i}` });
|
|
227
225
|
}
|
|
228
226
|
}
|
|
229
|
-
var
|
|
227
|
+
var se = /* @__PURE__ */ new Set([
|
|
230
228
|
"glm-5-2",
|
|
231
229
|
"labs-leanstral-1-5",
|
|
232
230
|
"labs-leanstral-1-5-1",
|
|
@@ -244,7 +242,7 @@ var oe = /* @__PURE__ */ new Set([
|
|
|
244
242
|
"mistral-vibe-cli-latest",
|
|
245
243
|
"mistral-vibe-cli-with-tools",
|
|
246
244
|
"zai-glm-5-2"
|
|
247
|
-
]),
|
|
245
|
+
]), ce = class e {
|
|
248
246
|
constructor(e, t) {
|
|
249
247
|
this.specificationVersion = "v4", this.supportedUrls = { "application/pdf": [/^https:\/\/.*$/] }, this.modelId = e, this.config = t, this.generateId = t.generateId ?? a;
|
|
250
248
|
}
|
|
@@ -270,7 +268,7 @@ var oe = /* @__PURE__ */ new Set([
|
|
|
270
268
|
type: "unsupported",
|
|
271
269
|
feature: "topK"
|
|
272
270
|
});
|
|
273
|
-
let _ =
|
|
271
|
+
let _ = se.has(this.modelId), v;
|
|
274
272
|
_ ? v = h.reasoningEffort ?? (g(s) ? s === "none" ? "none" : T({
|
|
275
273
|
reasoning: s,
|
|
276
274
|
effortMap: {
|
|
@@ -315,7 +313,7 @@ var oe = /* @__PURE__ */ new Set([
|
|
|
315
313
|
document_page_limit: h.documentPageLimit,
|
|
316
314
|
...h.promptCacheKey === void 0 ? {} : { prompt_cache_key: h.promptCacheKey },
|
|
317
315
|
messages: U(e)
|
|
318
|
-
}, { tools: C, toolChoice: w, toolWarnings: E } =
|
|
316
|
+
}, { tools: C, toolChoice: w, toolWarnings: E } = oe({
|
|
319
317
|
tools: f,
|
|
320
318
|
toolChoice: p
|
|
321
319
|
});
|
|
@@ -334,8 +332,8 @@ var oe = /* @__PURE__ */ new Set([
|
|
|
334
332
|
url: `${this.config.baseURL}/chat/completions`,
|
|
335
333
|
headers: E(this.config.headers?.(), e.headers),
|
|
336
334
|
body: t,
|
|
337
|
-
failedResponseHandler:
|
|
338
|
-
successfulResponseHandler: i(
|
|
335
|
+
failedResponseHandler: q,
|
|
336
|
+
successfulResponseHandler: i(le),
|
|
339
337
|
abortSignal: e.abortSignal,
|
|
340
338
|
fetch: this.config.fetch
|
|
341
339
|
}), c = o.choices[0], l = [];
|
|
@@ -386,8 +384,8 @@ var oe = /* @__PURE__ */ new Set([
|
|
|
386
384
|
url: `${this.config.baseURL}/chat/completions`,
|
|
387
385
|
headers: E(this.config.headers?.(), e.headers),
|
|
388
386
|
body: i,
|
|
389
|
-
failedResponseHandler:
|
|
390
|
-
successfulResponseHandler: d(
|
|
387
|
+
failedResponseHandler: q,
|
|
388
|
+
successfulResponseHandler: d(ue),
|
|
391
389
|
abortSignal: e.abortSignal,
|
|
392
390
|
fetch: this.config.fetch
|
|
393
391
|
}), s = {
|
|
@@ -514,7 +512,7 @@ var X = w([M(), s(v("type", [
|
|
|
514
512
|
text: M()
|
|
515
513
|
}))
|
|
516
514
|
})
|
|
517
|
-
]))]).nullish(),
|
|
515
|
+
]))]).nullish(), le = x({
|
|
518
516
|
id: M().nullish(),
|
|
519
517
|
created: O().nullish(),
|
|
520
518
|
model: M().nullish(),
|
|
@@ -535,7 +533,7 @@ var X = w([M(), s(v("type", [
|
|
|
535
533
|
})),
|
|
536
534
|
object: I("chat.completion"),
|
|
537
535
|
usage: B
|
|
538
|
-
}),
|
|
536
|
+
}), ue = x({
|
|
539
537
|
id: M().nullish(),
|
|
540
538
|
created: O().nullish(),
|
|
541
539
|
model: M().nullish(),
|
|
@@ -556,7 +554,7 @@ var X = w([M(), s(v("type", [
|
|
|
556
554
|
index: O()
|
|
557
555
|
})),
|
|
558
556
|
usage: B.nullish()
|
|
559
|
-
}),
|
|
557
|
+
}), de = x({
|
|
560
558
|
metadata: ne(M(), te()).optional(),
|
|
561
559
|
outputDimension: O().int().positive().optional(),
|
|
562
560
|
outputDtype: h([
|
|
@@ -566,7 +564,7 @@ var X = w([M(), s(v("type", [
|
|
|
566
564
|
"binary",
|
|
567
565
|
"ubinary"
|
|
568
566
|
]).optional()
|
|
569
|
-
}),
|
|
567
|
+
}), fe = class e {
|
|
570
568
|
constructor(e, t) {
|
|
571
569
|
this.specificationVersion = "v4", this.maxEmbeddingsPerCall = 32, this.supportsParallelCalls = !1, this.modelId = e, this.config = t;
|
|
572
570
|
}
|
|
@@ -592,7 +590,7 @@ var X = w([M(), s(v("type", [
|
|
|
592
590
|
let a = await b({
|
|
593
591
|
provider: "mistral",
|
|
594
592
|
providerOptions: r,
|
|
595
|
-
schema:
|
|
593
|
+
schema: de
|
|
596
594
|
}) ?? {}, { responseHeaders: o, value: s, rawValue: c } = await C({
|
|
597
595
|
url: `${this.config.baseURL}/embeddings`,
|
|
598
596
|
headers: E(this.config.headers?.(), n),
|
|
@@ -604,8 +602,8 @@ var X = w([M(), s(v("type", [
|
|
|
604
602
|
output_dtype: a.outputDtype,
|
|
605
603
|
encoding_format: "float"
|
|
606
604
|
},
|
|
607
|
-
failedResponseHandler:
|
|
608
|
-
successfulResponseHandler: i(
|
|
605
|
+
failedResponseHandler: q,
|
|
606
|
+
successfulResponseHandler: i(pe),
|
|
609
607
|
abortSignal: t,
|
|
610
608
|
fetch: this.config.fetch
|
|
611
609
|
});
|
|
@@ -619,10 +617,10 @@ var X = w([M(), s(v("type", [
|
|
|
619
617
|
}
|
|
620
618
|
};
|
|
621
619
|
}
|
|
622
|
-
},
|
|
620
|
+
}, pe = x({
|
|
623
621
|
data: s(x({ embedding: s(O()) })),
|
|
624
622
|
usage: x({ prompt_tokens: O() }).nullish()
|
|
625
|
-
}),
|
|
623
|
+
}), me = x({ refAudio: M().min(1).optional() }), he = class e {
|
|
626
624
|
constructor(e, t) {
|
|
627
625
|
this.modelId = e, this.config = t, this.specificationVersion = "v4";
|
|
628
626
|
}
|
|
@@ -642,7 +640,7 @@ var X = w([M(), s(v("type", [
|
|
|
642
640
|
let s = [], c = await b({
|
|
643
641
|
provider: "mistral",
|
|
644
642
|
providerOptions: o,
|
|
645
|
-
schema:
|
|
643
|
+
schema: me
|
|
646
644
|
}), l = "mp3";
|
|
647
645
|
[
|
|
648
646
|
"pcm",
|
|
@@ -692,8 +690,8 @@ var X = w([M(), s(v("type", [
|
|
|
692
690
|
content: JSON.stringify(n),
|
|
693
691
|
values: r
|
|
694
692
|
},
|
|
695
|
-
failedResponseHandler:
|
|
696
|
-
successfulResponseHandler: i(
|
|
693
|
+
failedResponseHandler: q,
|
|
694
|
+
successfulResponseHandler: i(Z),
|
|
697
695
|
abortSignal: e.abortSignal,
|
|
698
696
|
fetch: this.config.fetch
|
|
699
697
|
});
|
|
@@ -709,13 +707,13 @@ var X = w([M(), s(v("type", [
|
|
|
709
707
|
}
|
|
710
708
|
};
|
|
711
709
|
}
|
|
712
|
-
},
|
|
710
|
+
}, Z = x({ audio_data: M() }), ge = P(() => t(x({
|
|
713
711
|
language: M().min(1).optional(),
|
|
714
712
|
temperature: O().optional(),
|
|
715
713
|
timestampGranularities: s(h(["segment", "word"])).min(1).optional(),
|
|
716
714
|
diarize: _().optional(),
|
|
717
715
|
contextBias: s(M().min(1).regex(/^[^\s,]+$/, "Context bias items must not contain commas or whitespace.")).max(100).optional()
|
|
718
|
-
}))),
|
|
716
|
+
}))), _e = class e {
|
|
719
717
|
constructor(e, t) {
|
|
720
718
|
this.modelId = e, this.config = t, this.specificationVersion = "v4";
|
|
721
719
|
}
|
|
@@ -735,7 +733,7 @@ var X = w([M(), s(v("type", [
|
|
|
735
733
|
let r = [], i = await b({
|
|
736
734
|
provider: "mistral",
|
|
737
735
|
providerOptions: n,
|
|
738
|
-
schema:
|
|
736
|
+
schema: ge
|
|
739
737
|
});
|
|
740
738
|
if (i?.language != null && i.timestampGranularities != null) throw new S({
|
|
741
739
|
argument: "providerOptions",
|
|
@@ -752,8 +750,8 @@ var X = w([M(), s(v("type", [
|
|
|
752
750
|
url: `${this.config.baseURL}/audio/transcriptions`,
|
|
753
751
|
headers: E(this.config.headers?.(), e.headers),
|
|
754
752
|
formData: n,
|
|
755
|
-
failedResponseHandler:
|
|
756
|
-
successfulResponseHandler: i(
|
|
753
|
+
failedResponseHandler: q,
|
|
754
|
+
successfulResponseHandler: i(ve),
|
|
757
755
|
abortSignal: e.abortSignal,
|
|
758
756
|
fetch: this.config.fetch
|
|
759
757
|
}), c = a.segments?.map((e) => ({
|
|
@@ -794,14 +792,11 @@ var X = w([M(), s(v("type", [
|
|
|
794
792
|
};
|
|
795
793
|
function Q(e, t, n) {
|
|
796
794
|
if (n != null) {
|
|
797
|
-
if (Array.isArray(n))
|
|
798
|
-
|
|
799
|
-
return;
|
|
800
|
-
}
|
|
801
|
-
e.append(t, String(n));
|
|
795
|
+
if (Array.isArray(n)) for (let r of n) e.append(t, r);
|
|
796
|
+
else e.append(t, String(n));
|
|
802
797
|
}
|
|
803
798
|
}
|
|
804
|
-
var
|
|
799
|
+
var ve = x({
|
|
805
800
|
model: M(),
|
|
806
801
|
text: M(),
|
|
807
802
|
language: M().nullish(),
|
|
@@ -820,7 +815,7 @@ var _e = x({
|
|
|
820
815
|
prompt_audio_seconds: O().nullish(),
|
|
821
816
|
request_count: O().nullish()
|
|
822
817
|
}).nullish()
|
|
823
|
-
}),
|
|
818
|
+
}), ye = "4.0.54";
|
|
824
819
|
function $(e = {}) {
|
|
825
820
|
let t = L(e.baseURL) ?? "https://api.mistral.ai/v1", n = () => u({
|
|
826
821
|
Authorization: `Bearer ${re({
|
|
@@ -829,23 +824,23 @@ function $(e = {}) {
|
|
|
829
824
|
description: "Mistral"
|
|
830
825
|
})}`,
|
|
831
826
|
...e.headers
|
|
832
|
-
}, `ai-sdk-mistral/${
|
|
827
|
+
}, `ai-sdk-mistral/${ye}`), i = (r) => new ce(r, {
|
|
833
828
|
provider: "mistral.chat",
|
|
834
829
|
baseURL: t,
|
|
835
830
|
headers: n,
|
|
836
831
|
fetch: e.fetch,
|
|
837
832
|
generateId: e.generateId
|
|
838
|
-
}), a = (r) => new
|
|
833
|
+
}), a = (r) => new fe(r, {
|
|
839
834
|
provider: "mistral.embedding",
|
|
840
835
|
baseURL: t,
|
|
841
836
|
headers: n,
|
|
842
837
|
fetch: e.fetch
|
|
843
|
-
}), o = (r) => new
|
|
838
|
+
}), o = (r) => new he(r, {
|
|
844
839
|
provider: "mistral.speech",
|
|
845
840
|
baseURL: t,
|
|
846
841
|
headers: n,
|
|
847
842
|
fetch: e.fetch
|
|
848
|
-
}), s = (r) => new
|
|
843
|
+
}), s = (r) => new _e(r, {
|
|
849
844
|
provider: "mistral.transcription",
|
|
850
845
|
baseURL: t,
|
|
851
846
|
headers: n,
|
|
@@ -862,5 +857,4 @@ function $(e = {}) {
|
|
|
862
857
|
}, c;
|
|
863
858
|
}
|
|
864
859
|
$();
|
|
865
|
-
//#endregion
|
|
866
860
|
export { $ as createMistral };
|