@liip/liipgpt 3.0.5 → 3.1.0
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/button/liipgpt-button.iife.js +93 -5
- package/chat/liipgpt-chat.iife.js +159 -121
- package/config/index.cjs +34 -3
- package/config/index.d.ts +254 -11
- package/config/index.js +34 -3
- package/configurator/_app/env.js +1 -1
- package/configurator/_app/immutable/chunks/B0YFyw9m.js +1 -0
- package/configurator/_app/immutable/chunks/{BnkvG7IB.js → B0sgJJDB.js} +2 -2
- package/configurator/_app/immutable/chunks/B0tfJ4bw.js +15 -0
- package/configurator/_app/immutable/chunks/{BXxSlBOI.js → BRavZ9ND.js} +1 -1
- package/configurator/_app/immutable/chunks/CBLxj_NM.js +1 -0
- package/configurator/_app/immutable/chunks/CDW8Ir6T.js +1 -0
- package/configurator/_app/immutable/chunks/CM-bA1kG.js +143 -0
- package/configurator/_app/immutable/chunks/Cx_YT9bD.js +1 -0
- package/configurator/_app/immutable/chunks/D54U55sL.js +1 -0
- package/configurator/_app/immutable/chunks/DaodQ0aw.js +108 -0
- package/configurator/_app/immutable/chunks/DePuinxN.js +1 -0
- package/configurator/_app/immutable/chunks/{CUzNvOh0.js → DqdGvHNe.js} +1 -1
- package/configurator/_app/immutable/chunks/PRp3cksF.js +3 -0
- package/configurator/_app/immutable/chunks/PtcaWgCK.js +1 -0
- package/configurator/_app/immutable/entry/app.Dr4hHnS-.js +2 -0
- package/configurator/_app/immutable/entry/start.gWhxZZVU.js +1 -0
- package/configurator/_app/immutable/nodes/{0.6Nyp5YF7.js → 0.CA8UGTeg.js} +20 -2
- package/configurator/_app/immutable/nodes/1.D6sPv5-I.js +1 -0
- package/configurator/_app/immutable/nodes/2.7Va_fsEv.js +30 -0
- package/configurator/_app/immutable/nodes/3.BlJceQgE.js +897 -0
- package/configurator/_app/version.json +1 -1
- package/configurator/index.html +10 -10
- package/configurator/sidebar.html +10 -10
- package/index.cjs +99 -7
- package/index.d.ts +579 -28
- package/index.js +99 -7
- package/package.json +1 -1
- package/configurator/_app/immutable/chunks/BPqAw_M_.js +0 -1
- package/configurator/_app/immutable/chunks/BkMkT2yX.js +0 -1
- package/configurator/_app/immutable/chunks/BrRo6Gg5.js +0 -15
- package/configurator/_app/immutable/chunks/CIVexZRw.js +0 -1
- package/configurator/_app/immutable/chunks/Cp1S0mah.js +0 -3
- package/configurator/_app/immutable/chunks/DDyGsrRo.js +0 -1
- package/configurator/_app/immutable/chunks/DP_7kP9j.js +0 -1
- package/configurator/_app/immutable/chunks/HNsM71V8.js +0 -212
- package/configurator/_app/immutable/chunks/TjkIfco8.js +0 -1
- package/configurator/_app/immutable/chunks/w-7tIaYZ.js +0 -1
- package/configurator/_app/immutable/entry/app.WFBs3H0o.js +0 -2
- package/configurator/_app/immutable/entry/start.BSXxI4bC.js +0 -1
- package/configurator/_app/immutable/nodes/1.DQmrEIHy.js +0 -1
- package/configurator/_app/immutable/nodes/2.QtKjmXTG.js +0 -30
- package/configurator/_app/immutable/nodes/3.Cza37V1o.js +0 -897
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1762764050304"}
|
package/configurator/index.html
CHANGED
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
<link rel="icon" href="./favicon.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
7
|
|
|
8
|
-
<link rel="modulepreload" href="./_app/immutable/entry/start.
|
|
9
|
-
<link rel="modulepreload" href="./_app/immutable/chunks/
|
|
10
|
-
<link rel="modulepreload" href="./_app/immutable/chunks/
|
|
11
|
-
<link rel="modulepreload" href="./_app/immutable/chunks/
|
|
12
|
-
<link rel="modulepreload" href="./_app/immutable/entry/app.
|
|
13
|
-
<link rel="modulepreload" href="./_app/immutable/chunks/
|
|
8
|
+
<link rel="modulepreload" href="./_app/immutable/entry/start.gWhxZZVU.js">
|
|
9
|
+
<link rel="modulepreload" href="./_app/immutable/chunks/PRp3cksF.js">
|
|
10
|
+
<link rel="modulepreload" href="./_app/immutable/chunks/D54U55sL.js">
|
|
11
|
+
<link rel="modulepreload" href="./_app/immutable/chunks/Cx_YT9bD.js">
|
|
12
|
+
<link rel="modulepreload" href="./_app/immutable/entry/app.Dr4hHnS-.js">
|
|
13
|
+
<link rel="modulepreload" href="./_app/immutable/chunks/B0YFyw9m.js">
|
|
14
14
|
<link rel="modulepreload" href="./_app/immutable/chunks/NZTpNUN0.js">
|
|
15
|
-
<link rel="modulepreload" href="./_app/immutable/chunks/
|
|
15
|
+
<link rel="modulepreload" href="./_app/immutable/chunks/DePuinxN.js">
|
|
16
16
|
</head>
|
|
17
17
|
<body data-sveltekit-preload-data="hover">
|
|
18
18
|
<div style="display: contents">
|
|
19
19
|
<script>
|
|
20
20
|
{
|
|
21
|
-
|
|
21
|
+
__sveltekit_1gsu6r4 = {
|
|
22
22
|
base: new URL(".", location).pathname.slice(0, -1),
|
|
23
23
|
assets: "/configurator"
|
|
24
24
|
};
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
const element = document.currentScript.parentElement;
|
|
27
27
|
|
|
28
28
|
Promise.all([
|
|
29
|
-
import("./_app/immutable/entry/start.
|
|
30
|
-
import("./_app/immutable/entry/app.
|
|
29
|
+
import("./_app/immutable/entry/start.gWhxZZVU.js"),
|
|
30
|
+
import("./_app/immutable/entry/app.Dr4hHnS-.js")
|
|
31
31
|
]).then(([kit, app]) => {
|
|
32
32
|
kit.start(app, element);
|
|
33
33
|
});
|
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
<link rel="icon" href="./favicon.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
7
|
|
|
8
|
-
<link rel="modulepreload" href="./_app/immutable/entry/start.
|
|
9
|
-
<link rel="modulepreload" href="./_app/immutable/chunks/
|
|
10
|
-
<link rel="modulepreload" href="./_app/immutable/chunks/
|
|
11
|
-
<link rel="modulepreload" href="./_app/immutable/chunks/
|
|
12
|
-
<link rel="modulepreload" href="./_app/immutable/entry/app.
|
|
13
|
-
<link rel="modulepreload" href="./_app/immutable/chunks/
|
|
8
|
+
<link rel="modulepreload" href="./_app/immutable/entry/start.gWhxZZVU.js">
|
|
9
|
+
<link rel="modulepreload" href="./_app/immutable/chunks/PRp3cksF.js">
|
|
10
|
+
<link rel="modulepreload" href="./_app/immutable/chunks/D54U55sL.js">
|
|
11
|
+
<link rel="modulepreload" href="./_app/immutable/chunks/Cx_YT9bD.js">
|
|
12
|
+
<link rel="modulepreload" href="./_app/immutable/entry/app.Dr4hHnS-.js">
|
|
13
|
+
<link rel="modulepreload" href="./_app/immutable/chunks/B0YFyw9m.js">
|
|
14
14
|
<link rel="modulepreload" href="./_app/immutable/chunks/NZTpNUN0.js">
|
|
15
|
-
<link rel="modulepreload" href="./_app/immutable/chunks/
|
|
15
|
+
<link rel="modulepreload" href="./_app/immutable/chunks/DePuinxN.js">
|
|
16
16
|
</head>
|
|
17
17
|
<body data-sveltekit-preload-data="hover">
|
|
18
18
|
<div style="display: contents">
|
|
19
19
|
<script>
|
|
20
20
|
{
|
|
21
|
-
|
|
21
|
+
__sveltekit_1gsu6r4 = {
|
|
22
22
|
base: new URL(".", location).pathname.slice(0, -1),
|
|
23
23
|
assets: "/configurator"
|
|
24
24
|
};
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
const element = document.currentScript.parentElement;
|
|
27
27
|
|
|
28
28
|
Promise.all([
|
|
29
|
-
import("./_app/immutable/entry/start.
|
|
30
|
-
import("./_app/immutable/entry/app.
|
|
29
|
+
import("./_app/immutable/entry/start.gWhxZZVU.js"),
|
|
30
|
+
import("./_app/immutable/entry/app.Dr4hHnS-.js")
|
|
31
31
|
]).then(([kit, app]) => {
|
|
32
32
|
kit.start(app, element);
|
|
33
33
|
});
|
package/index.cjs
CHANGED
|
@@ -6227,6 +6227,12 @@ var getDomainName = (url) => {
|
|
|
6227
6227
|
}
|
|
6228
6228
|
};
|
|
6229
6229
|
|
|
6230
|
+
// src/lib/client/utils/html-to-text.ts
|
|
6231
|
+
function htmlToText(html4) {
|
|
6232
|
+
const text3 = html4.replace(/<[^>]*>/g, "").replace(/ /g, " ").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"');
|
|
6233
|
+
return text3;
|
|
6234
|
+
}
|
|
6235
|
+
|
|
6230
6236
|
// src/lib/client/chat-result-builder.ts
|
|
6231
6237
|
var mapSseReference = ({
|
|
6232
6238
|
url,
|
|
@@ -6270,7 +6276,7 @@ class ChatResultBuilder {
|
|
|
6270
6276
|
errors: [],
|
|
6271
6277
|
type: "bot",
|
|
6272
6278
|
time: new Date().toISOString(),
|
|
6273
|
-
message: { markdown: "", html: "" },
|
|
6279
|
+
message: { markdown: "", html: "", text: "" },
|
|
6274
6280
|
references: { all: [], used: [], unused: [] }
|
|
6275
6281
|
});
|
|
6276
6282
|
}
|
|
@@ -6291,7 +6297,7 @@ class ChatResultBuilder {
|
|
|
6291
6297
|
return {
|
|
6292
6298
|
...current,
|
|
6293
6299
|
state: "streaming",
|
|
6294
|
-
message: { markdown: nextMarkdown, html: html4 }
|
|
6300
|
+
message: { markdown: nextMarkdown, html: html4, text: "" }
|
|
6295
6301
|
};
|
|
6296
6302
|
});
|
|
6297
6303
|
}
|
|
@@ -6302,6 +6308,7 @@ class ChatResultBuilder {
|
|
|
6302
6308
|
state: "done"
|
|
6303
6309
|
};
|
|
6304
6310
|
message.references.unused = message.references.all.filter((reference) => reference.referenceIndex.used === undefined);
|
|
6311
|
+
message.message.text = htmlToText(message.message.html);
|
|
6305
6312
|
this.options?.onFinish?.(message);
|
|
6306
6313
|
this.content.setValue(message);
|
|
6307
6314
|
return message;
|
|
@@ -10586,12 +10593,12 @@ var chatSelectorTranslationSchema = exports_external.object({
|
|
|
10586
10593
|
values: exports_external.record(exports_external.string(), exports_external.string())
|
|
10587
10594
|
});
|
|
10588
10595
|
var translationSchema = exports_external.object({
|
|
10589
|
-
predefinedQuestions: exports_external.string(),
|
|
10590
10596
|
introductionTitle: exports_external.string(),
|
|
10591
10597
|
introductionDisclaimer: exports_external.string().optional(),
|
|
10592
10598
|
chatInputPlaceholder: exports_external.string(),
|
|
10593
10599
|
chatInputPlaceholderListening: exports_external.string().optional(),
|
|
10594
10600
|
chatInputSubmit: exports_external.string(),
|
|
10601
|
+
chatInputAbort: exports_external.string(),
|
|
10595
10602
|
chatInputStartListening: exports_external.string(),
|
|
10596
10603
|
chatInputStopListening: exports_external.string(),
|
|
10597
10604
|
referenceLink: exports_external.string(),
|
|
@@ -10630,8 +10637,37 @@ var translationSchema = exports_external.object({
|
|
|
10630
10637
|
classificationThankYou: exports_external.string(),
|
|
10631
10638
|
classificationTitle: exports_external.string(),
|
|
10632
10639
|
selectLanguage: exports_external.string(),
|
|
10640
|
+
languageChanged: exports_external.string(),
|
|
10641
|
+
selectColorTheme: exports_external.string(),
|
|
10633
10642
|
lightMode: exports_external.string(),
|
|
10634
10643
|
darkMode: exports_external.string(),
|
|
10644
|
+
ariaMainNavigation: exports_external.string(),
|
|
10645
|
+
ariaMainNavigationRegion: exports_external.string(),
|
|
10646
|
+
ariaGotoMainNavigation: exports_external.string(),
|
|
10647
|
+
ariaAskQuestion: exports_external.string(),
|
|
10648
|
+
ariaAskQuestionRegion: exports_external.string(),
|
|
10649
|
+
ariaNotifications: exports_external.string(),
|
|
10650
|
+
ariaPredefinedQuestions: exports_external.string(),
|
|
10651
|
+
ariaPredefinedQuestionsRegion: exports_external.string(),
|
|
10652
|
+
ariaChatHistory: exports_external.string(),
|
|
10653
|
+
ariaOpenChat: exports_external.string(),
|
|
10654
|
+
ariaQuestionFromYou: exports_external.string(),
|
|
10655
|
+
ariaAnswerFromBot: exports_external.string(),
|
|
10656
|
+
ariaLastAnswerNavigation: exports_external.string(),
|
|
10657
|
+
ariaQuestionSent: exports_external.string(),
|
|
10658
|
+
ariaAnswerReady: exports_external.string(),
|
|
10659
|
+
ariaAnswerFinished: exports_external.string(),
|
|
10660
|
+
ariaAnswerGood: exports_external.string(),
|
|
10661
|
+
ariaAnswerBad: exports_external.string(),
|
|
10662
|
+
ariaReferenceSource: exports_external.string(),
|
|
10663
|
+
ariaGiveFeedback: exports_external.string(),
|
|
10664
|
+
ariaLanguageChanged: exports_external.string(),
|
|
10665
|
+
ariaLightSelected: exports_external.string(),
|
|
10666
|
+
ariaDarkSelected: exports_external.string(),
|
|
10667
|
+
ariaSettings: exports_external.string(),
|
|
10668
|
+
ariaSettingsRegion: exports_external.string(),
|
|
10669
|
+
ariaReferencesRegion: exports_external.string(),
|
|
10670
|
+
ariaFlyoutRegion: exports_external.string(),
|
|
10635
10671
|
termsTitle: exports_external.string().optional(),
|
|
10636
10672
|
termsContent: exports_external.string().optional(),
|
|
10637
10673
|
selectors: exports_external.record(exports_external.string(), chatSelectorTranslationSchema).optional(),
|
|
@@ -10639,7 +10675,8 @@ var translationSchema = exports_external.object({
|
|
|
10639
10675
|
showSettings: exports_external.string(),
|
|
10640
10676
|
chooseAtLeastOneOption: exports_external.string(),
|
|
10641
10677
|
selectAll: exports_external.string(),
|
|
10642
|
-
selectNone: exports_external.string()
|
|
10678
|
+
selectNone: exports_external.string(),
|
|
10679
|
+
resetToDefaults: exports_external.string()
|
|
10643
10680
|
});
|
|
10644
10681
|
var allLanguages = ["en", "de", "fr", "it"];
|
|
10645
10682
|
var languagesSchema = exports_external.enum(allLanguages);
|
|
@@ -10704,13 +10741,14 @@ var completeChatConfigSchema = exports_external.object({
|
|
|
10704
10741
|
showContextInfo: exports_external.boolean(),
|
|
10705
10742
|
showReferencesByDefault: exports_external.boolean(),
|
|
10706
10743
|
showExpandedSelectors: exports_external.boolean(),
|
|
10744
|
+
showTextFeedback: exports_external.boolean(),
|
|
10745
|
+
inlineLayout: exports_external.boolean(),
|
|
10707
10746
|
allowAudioInput: exports_external.boolean(),
|
|
10708
10747
|
blockPII: exports_external.boolean(),
|
|
10709
10748
|
questionPrefix: exports_external.string(),
|
|
10710
10749
|
menu: exports_external.record(languagesSchema, exports_external.array(menuItemSchema)).optional(),
|
|
10711
10750
|
supportedLanguages: exports_external.array(languagesSchema),
|
|
10712
10751
|
classification: classificationConfigSchema.optional(),
|
|
10713
|
-
showTextFeedback: exports_external.boolean(),
|
|
10714
10752
|
theme: themeSchema2,
|
|
10715
10753
|
translations: translationsSchema,
|
|
10716
10754
|
buttonHref: exports_external.string().optional(),
|
|
@@ -10725,6 +10763,60 @@ var chatConfigSchemaWithLegacyThemeName = chatConfigSchema.and(exports_external.
|
|
|
10725
10763
|
theme: exports_external.object({ name: exports_external.string().optional() }).optional()
|
|
10726
10764
|
}));
|
|
10727
10765
|
|
|
10766
|
+
// node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/stringify.js
|
|
10767
|
+
var byteToHex = [];
|
|
10768
|
+
for (let i = 0;i < 256; ++i) {
|
|
10769
|
+
byteToHex.push((i + 256).toString(16).slice(1));
|
|
10770
|
+
}
|
|
10771
|
+
function unsafeStringify(arr, offset = 0) {
|
|
10772
|
+
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
10773
|
+
}
|
|
10774
|
+
|
|
10775
|
+
// node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/rng.js
|
|
10776
|
+
var getRandomValues;
|
|
10777
|
+
var rnds8 = new Uint8Array(16);
|
|
10778
|
+
function rng() {
|
|
10779
|
+
if (!getRandomValues) {
|
|
10780
|
+
if (typeof crypto === "undefined" || !crypto.getRandomValues) {
|
|
10781
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
10782
|
+
}
|
|
10783
|
+
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
10784
|
+
}
|
|
10785
|
+
return getRandomValues(rnds8);
|
|
10786
|
+
}
|
|
10787
|
+
|
|
10788
|
+
// node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/native.js
|
|
10789
|
+
var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
10790
|
+
var native_default = { randomUUID };
|
|
10791
|
+
|
|
10792
|
+
// node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js
|
|
10793
|
+
function _v4(options2, buf, offset) {
|
|
10794
|
+
options2 = options2 || {};
|
|
10795
|
+
const rnds = options2.random ?? options2.rng?.() ?? rng();
|
|
10796
|
+
if (rnds.length < 16) {
|
|
10797
|
+
throw new Error("Random bytes length must be >= 16");
|
|
10798
|
+
}
|
|
10799
|
+
rnds[6] = rnds[6] & 15 | 64;
|
|
10800
|
+
rnds[8] = rnds[8] & 63 | 128;
|
|
10801
|
+
if (buf) {
|
|
10802
|
+
offset = offset || 0;
|
|
10803
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
10804
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
10805
|
+
}
|
|
10806
|
+
for (let i = 0;i < 16; ++i) {
|
|
10807
|
+
buf[offset + i] = rnds[i];
|
|
10808
|
+
}
|
|
10809
|
+
return buf;
|
|
10810
|
+
}
|
|
10811
|
+
return unsafeStringify(rnds);
|
|
10812
|
+
}
|
|
10813
|
+
function v4(options2, buf, offset) {
|
|
10814
|
+
if (native_default.randomUUID && !buf && !options2) {
|
|
10815
|
+
return native_default.randomUUID();
|
|
10816
|
+
}
|
|
10817
|
+
return _v4(options2, buf, offset);
|
|
10818
|
+
}
|
|
10819
|
+
var v4_default = v4;
|
|
10728
10820
|
// src/lib/client/utils/agnostic-storage.ts
|
|
10729
10821
|
var storage = new Map;
|
|
10730
10822
|
|
|
@@ -11304,13 +11396,13 @@ class LiipGPTClientPrimitive {
|
|
|
11304
11396
|
return this.internalData.metadata;
|
|
11305
11397
|
}
|
|
11306
11398
|
createConversationId() {
|
|
11307
|
-
const conversationId =
|
|
11399
|
+
const conversationId = v4_default();
|
|
11308
11400
|
this.renderers.set(conversationId, new MarkdownRenderer({ extensions: this.markedExtensions }));
|
|
11309
11401
|
return conversationId;
|
|
11310
11402
|
}
|
|
11311
11403
|
chat(conversationId, question, options2 = {}) {
|
|
11312
11404
|
const content = new FutureValue;
|
|
11313
|
-
const requestId =
|
|
11405
|
+
const requestId = v4_default();
|
|
11314
11406
|
const readyForFeedback = new Flag;
|
|
11315
11407
|
const markdownRenderer = this.renderers.get(conversationId) ?? new MarkdownRenderer({ extensions: this.markedExtensions });
|
|
11316
11408
|
const chatResultBuilder = new ChatResultBuilder({
|