@liip/liipgpt 3.5.7 → 3.6.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/README.md +26 -3
- package/button/liipgpt-button.iife.js +28 -28
- package/chat/liipgpt-chat.iife.js +18 -18
- package/config/index.cjs +17 -6
- package/config/index.d.ts +20 -1
- package/config/index.js +17 -6
- package/configurator/_app/env.js +1 -1
- package/configurator/_app/immutable/chunks/B2vNY6lx.js +143 -0
- package/configurator/_app/immutable/chunks/BGwzfQ_H.js +1 -0
- package/configurator/_app/immutable/chunks/BTwygYhA.js +1 -0
- package/configurator/_app/immutable/chunks/BmUm-Ak4.js +15 -0
- package/configurator/_app/immutable/chunks/{D6zVGLUW.js → BwV52vQs.js} +1 -1
- package/configurator/_app/immutable/chunks/C00ruT0L.js +3 -0
- package/configurator/_app/immutable/chunks/CFfgUb3G.js +16 -0
- package/configurator/_app/immutable/chunks/{B4H9KbzH.js → CKDKLu5Y.js} +1 -1
- package/configurator/_app/immutable/chunks/CX0dfddQ.js +1 -0
- package/configurator/_app/immutable/chunks/CibALFW0.js +1 -0
- package/configurator/_app/immutable/chunks/CnzkQxWo.js +1 -0
- package/configurator/_app/immutable/chunks/CqCdl07t.js +1 -0
- package/configurator/_app/immutable/chunks/CqPRQdP7.js +2 -0
- package/configurator/_app/immutable/chunks/Ct405RO9.js +1 -0
- package/configurator/_app/immutable/chunks/DFBUyDYh.js +29 -0
- package/configurator/_app/immutable/chunks/DUr69vGU.js +1 -0
- package/configurator/_app/immutable/chunks/DV91TmsB.js +293 -0
- package/configurator/_app/immutable/chunks/DVeOoWpz.js +1 -0
- package/configurator/_app/immutable/chunks/Db3xJ3R_.js +1 -0
- package/configurator/_app/immutable/chunks/EDJuo58-.js +61 -0
- package/configurator/_app/immutable/chunks/MRyhzcyW.js +39 -0
- package/configurator/_app/immutable/chunks/qE7I_Q4N.js +5 -0
- package/configurator/_app/immutable/chunks/tFLMI64R.js +1 -0
- package/configurator/_app/immutable/chunks/zUel1ZW0.js +70 -0
- package/configurator/_app/immutable/entry/app.BS_BNglT.js +2 -0
- package/configurator/_app/immutable/entry/start.B8ApCMix.js +1 -0
- package/configurator/_app/immutable/nodes/0.D_2XXaJQ.js +157 -0
- package/configurator/_app/immutable/nodes/1.BnWVDJCZ.js +1 -0
- package/configurator/_app/immutable/nodes/{2.C49eq5Js.js → 2.SUtdjb5A.js} +12 -11
- package/configurator/_app/immutable/nodes/3.Bo3t-YCM.js +952 -0
- package/configurator/_app/version.json +1 -1
- package/configurator/index.html +11 -10
- package/configurator/sidebar.html +11 -10
- package/index.cjs +17 -6
- package/index.d.ts +42 -3
- package/index.js +17 -6
- package/package.json +6 -1
- package/search-summary/liipgpt-search-summary.iife.js +421 -0
- package/configurator/_app/immutable/chunks/B7xCvPKw.js +0 -143
- package/configurator/_app/immutable/chunks/BdP-K7KO.js +0 -3
- package/configurator/_app/immutable/chunks/BsVnBobk.js +0 -1
- package/configurator/_app/immutable/chunks/CRn_Qu4-.js +0 -1
- package/configurator/_app/immutable/chunks/CZca1tVB.js +0 -89
- package/configurator/_app/immutable/chunks/CaZV0epm.js +0 -1
- package/configurator/_app/immutable/chunks/CabPM0Ap.js +0 -331
- package/configurator/_app/immutable/chunks/CgMo4dFz.js +0 -1
- package/configurator/_app/immutable/chunks/DUJlwB59.js +0 -15
- package/configurator/_app/immutable/chunks/di8DjX5b.js +0 -1
- package/configurator/_app/immutable/chunks/h2Kch-uX.js +0 -1
- package/configurator/_app/immutable/chunks/hTLSLo2s.js +0 -16
- package/configurator/_app/immutable/entry/app.Ce62vasD.js +0 -2
- package/configurator/_app/immutable/entry/start.CdYStGvR.js +0 -1
- package/configurator/_app/immutable/nodes/0.DJJ_NjgH.js +0 -156
- package/configurator/_app/immutable/nodes/1.BmbCK-Nv.js +0 -1
- package/configurator/_app/immutable/nodes/3.DQg0gEvm.js +0 -954
- /package/configurator/_app/immutable/chunks/{CNhGYG1q.js → Bo0U8J3e.js} +0 -0
- /package/configurator/_app/immutable/chunks/{D1hYfEew.js → CFKVnMbq.js} +0 -0
- /package/configurator/_app/immutable/chunks/{C8mohMXa.js → DjVmpym-.js} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DJJ_NjgH.js","../chunks/BdP-K7KO.js","../chunks/BsVnBobk.js","../chunks/CabPM0Ap.js","../chunks/D1hYfEew.js","../nodes/1.BmbCK-Nv.js","../chunks/B4H9KbzH.js","../chunks/D6zVGLUW.js","../chunks/CaZV0epm.js","../chunks/CNhGYG1q.js","../nodes/2.C49eq5Js.js","../chunks/C8mohMXa.js","../chunks/hTLSLo2s.js","../chunks/CZca1tVB.js","../chunks/CRn_Qu4-.js","../nodes/3.DQg0gEvm.js","../chunks/B7xCvPKw.js","../chunks/h2Kch-uX.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{B as e,Ct as t,G as n,K as r,N as i,Nt as a,Ot as o,Pt as s,Tt as c,U as l,Vt as u,X as d,_t as f,a as p,at as m,dt as h,ft as g,gt as _,i as v,o as y,q as b,r as x,rt as S,u as C,ut as w,vt as T,xt as E}from"../chunks/BdP-K7KO.js";import{t as D}from"../chunks/C8mohMXa.js";import"../chunks/D1hYfEew.js";var O={},k=b(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),A=b(`<!> <!>`,1);function j(p,v){s(v,!0);let b=y(v,`stores`,7),D=y(v,`page`,7),O=y(v,`constructors`,7),j=y(v,`components`,23,()=>[]),M=y(v,`form`,7),N=y(v,`data_0`,7,null),P=y(v,`data_1`,7,null);g(()=>b().page.set(D())),h(()=>{b(),D(),O(),j(),M(),N(),P(),b().page.notify()});let F=t(!1),I=t(!1),L=t(null);x(()=>{let e=b().page.subscribe(()=>{S(F)&&(E(I,!0),m().then(()=>{E(L,document.title||`untitled page`,!0)}))});return E(F,!0),e});let R=c(()=>O()[1]);var z={get stores(){return b()},set stores(e){b(e),o()},get page(){return D()},set page(e){D(e),o()},get constructors(){return O()},set constructors(e){O(e),o()},get components(){return j()},set components(e=[]){j(e),o()},get form(){return M()},set form(e){M(e),o()},get data_0(){return N()},set data_0(e=null){N(e),o()},get data_1(){return P()},set data_1(e=null){P(e),o()}},B=A(),V=f(B),H=e=>{let t=c(()=>O()[0]);var a=r();i(f(a),()=>S(t),(e,t)=>{C(t(e,{get data(){return N()},get form(){return M()},get params(){return D().params},children:(e,t)=>{var a=r();i(f(a),()=>S(R),(e,t)=>{C(t(e,{get data(){return P()},get form(){return M()},get params(){return D().params}}),e=>j()[1]=e,()=>j()?.[1])}),n(e,a)},$$slots:{default:!0}}),e=>j()[0]=e,()=>j()?.[0])}),n(e,a)},U=e=>{let t=c(()=>O()[0]);var a=r();i(f(a),()=>S(t),(e,t)=>{C(t(e,{get data(){return N()},get form(){return M()},get params(){return D().params}}),e=>j()[0]=e,()=>j()?.[0])}),n(e,a)};e(V,e=>{O()[1]?e(H):e(U,-1)});var W=T(V,2),G=t=>{var r=k(),i=_(r),a=e=>{var t=d();w(()=>l(t,S(L))),n(e,t)};e(i,e=>{S(I)&&e(a)}),u(r),n(t,r)};return e(W,e=>{S(F)&&e(G)}),n(p,B),a(z)}v(j,{stores:{},page:{},constructors:{},components:{},form:{},data_0:{},data_1:{}},[],[],{mode:`open`});var M=p(j),N=[()=>D(()=>import(`../nodes/0.DJJ_NjgH.js`),__vite__mapDeps([0,1,2,3,4]),import.meta.url),()=>D(()=>import(`../nodes/1.BmbCK-Nv.js`),__vite__mapDeps([5,1,6,7,4,8,9]),import.meta.url),()=>D(()=>import(`../nodes/2.C49eq5Js.js`),__vite__mapDeps([10,1,6,11,12,13,3,14,2,7,4,8,9]),import.meta.url),()=>D(()=>import(`../nodes/3.DQg0gEvm.js`),__vite__mapDeps([15,1,6,12,13,11,3,14,2,7,16,17,4,8,9]),import.meta.url)],P=[],F={"/":[2],"/sidebar":[3]},I={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},L=Object.fromEntries(Object.entries(I.transport).map(([e,t])=>[e,t.decode])),R=Object.fromEntries(Object.entries(I.transport).map(([e,t])=>[e,t.encode])),z=!1,B=(e,t)=>L[e](t);export{B as decode,L as decoders,F as dictionary,R as encoders,z as hash,I as hooks,O as matchers,N as nodes,M as root,P as server_loads};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../chunks/BdP-K7KO.js";import{n as e,s as t}from"../chunks/B4H9KbzH.js";import"../chunks/CNhGYG1q.js";export{t as load_css,e as start};
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import{G as e,Gt as t,K as n,Nt as r,Ot as i,P as a,Pt as o,_t as s,i as c,o as l}from"../chunks/BdP-K7KO.js";import"../chunks/D1hYfEew.js";import{t as u}from"../chunks/BsVnBobk.js";import"../chunks/CabPM0Ap.js";var d=async e=>await(await e(`https://liipgpt.api.dev.genai.liip.ch/configurator/api/all-org-names`)).json(),f=[`baselcitygpt`],p=async e=>{let t=await d(e).catch(e=>(console.error(`Error fetching org names:`,e),[]));t.push(`liipgpt`);let n=t.map(e=>f.includes(e)?[e,{dev:`https://${e}-dev-api.gpt.liip.ch/${e}`,prod:`https://${e}-api.gpt.liip.ch/${e}`}]:[e,{dev:`https://${e}.api.dev.genai.liip.ch/${e}`,prod:`https://${e}.api.prod.genai.liip.ch/${e}`}]);return Object.fromEntries(n)},m=`/**
|
|
2
|
-
* @type {import('@liip/liipgpt/config').ChatConfig} ChatConfig
|
|
3
|
-
*/
|
|
4
|
-
const CHAT_CONFIG_OVERRIDE = {
|
|
5
|
-
// showCloseChatButton: true,
|
|
6
|
-
// showContextInfo: true,
|
|
7
|
-
// showContextMenu: true,
|
|
8
|
-
// showOverallFeedbackButton: true,
|
|
9
|
-
// forcePredefinedQuestions: true, // hides the chat-input on the start-page, forcing the user to use predefined questions.
|
|
10
|
-
// showReferencesByDefault: true,
|
|
11
|
-
// showExpandedSelectors: true,
|
|
12
|
-
// showTextFeedback: false,
|
|
13
|
-
// inlineLayout: true,
|
|
14
|
-
// allowAudioInput: true,
|
|
15
|
-
// blockPII: false,
|
|
16
|
-
// questionPrefix: "url:https://example.com",
|
|
17
|
-
// translations: {},
|
|
18
|
-
// theme: {},
|
|
19
|
-
// renderKatex: true, // will use katex to render formulas
|
|
20
|
-
// reflectLanguageInPath: true,
|
|
21
|
-
// sendReferrer: true, // sends referrer path to backend for each question
|
|
22
|
-
// addRetrievalQuestionToUrlParams: true, // when true, adds the retrieval question to the URL search parameter
|
|
23
|
-
// forceConsent: true, // when true, forces the user to accept terms and conditions before using the chat
|
|
24
|
-
// askQuestionAgain: true, // when true, the answers of the bot will have an option to ask the corresponding question again
|
|
25
|
-
// enableBackdrop: true, // when true, shows a backdrop when flyout is opened
|
|
26
|
-
/*classification: {
|
|
27
|
-
impact: {
|
|
28
|
-
label: "Impact",
|
|
29
|
-
options: [
|
|
30
|
-
{ label: "Positive", value: 1 },
|
|
31
|
-
{ label: "Negative", value: 2 },
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
quality: {
|
|
35
|
-
label: "Quality",
|
|
36
|
-
options: [
|
|
37
|
-
{ label: "Good", value: 1 },
|
|
38
|
-
{ label: "Bad", value: 2 },
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
*/
|
|
43
|
-
/* selectorsConfig: [
|
|
44
|
-
{
|
|
45
|
-
settingName: "sources",
|
|
46
|
-
iconName: "sources", // Must match an SVG key in the theme
|
|
47
|
-
type: "multi-select",
|
|
48
|
-
values: [
|
|
49
|
-
"docs",
|
|
50
|
-
"web",
|
|
51
|
-
"files",
|
|
52
|
-
"docs long title",
|
|
53
|
-
"web long title ",
|
|
54
|
-
"files long title ",
|
|
55
|
-
"docs long title with overflow",
|
|
56
|
-
"web2",
|
|
57
|
-
"files2",
|
|
58
|
-
"docs2",
|
|
59
|
-
"web3",
|
|
60
|
-
"files3",
|
|
61
|
-
"docs3",
|
|
62
|
-
"web4",
|
|
63
|
-
"files4",
|
|
64
|
-
"docs4",
|
|
65
|
-
"web5",
|
|
66
|
-
"files5",
|
|
67
|
-
"docs5",
|
|
68
|
-
"web6",
|
|
69
|
-
"files6",
|
|
70
|
-
"docs6",
|
|
71
|
-
"web7",
|
|
72
|
-
],
|
|
73
|
-
defaultValues: ["docs", "web", "web2"], // Optional: pre-selected values
|
|
74
|
-
allowEmpty: false,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
settingName: "model",
|
|
78
|
-
iconName: "model", // Must match an SVG key in the theme
|
|
79
|
-
type: "single-select",
|
|
80
|
-
values: ["gpt-4o-mini", "gpt-4o"],
|
|
81
|
-
defaultValues: ["gpt-4o"], // Optional: pre-selected value
|
|
82
|
-
allowEmpty: false,
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
*/
|
|
86
|
-
// parentPageContext: { extractSelectors: ["#preview-form"] }
|
|
87
|
-
// enableBackdrop: true,
|
|
88
|
-
// This will be needed for the alva confidence experiment
|
|
89
|
-
/*
|
|
90
|
-
contextVersion: 1,
|
|
91
|
-
messageAdditions: {
|
|
92
|
-
init: [
|
|
93
|
-
{
|
|
94
|
-
type: "component",
|
|
95
|
-
componentName: "alva-init",
|
|
96
|
-
hideAvatar: true,
|
|
97
|
-
noSectionPadding: true,
|
|
98
|
-
data: {},
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
|
|
102
|
-
bot: {
|
|
103
|
-
after: [
|
|
104
|
-
{
|
|
105
|
-
type: "component",
|
|
106
|
-
componentName: "alva-score-survey",
|
|
107
|
-
hideAvatar: true,
|
|
108
|
-
noSectionPadding: true,
|
|
109
|
-
data: {},
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
*/
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
window.CHAT_CONFIG_OVERRIDE = CHAT_CONFIG_OVERRIDE;
|
|
118
|
-
`,h=`<div
|
|
119
|
-
style="
|
|
120
|
-
display: flex;
|
|
121
|
-
flex-direction: column;
|
|
122
|
-
gap: 8px;
|
|
123
|
-
justify-content: center;
|
|
124
|
-
align-items: center;
|
|
125
|
-
width: 100%;
|
|
126
|
-
height: 100%;
|
|
127
|
-
background: linear-gradient(0deg, #1b181e 0%, #2a2440 90%);
|
|
128
|
-
"
|
|
129
|
-
>
|
|
130
|
-
<svg width="48" height="48" stroke="rgba(127, 127, 127, 0.4)" viewBox="0 0 24 24">
|
|
131
|
-
<g>
|
|
132
|
-
<circle cx="12" cy="12" r="9.5" fill="none" stroke-width="1" stroke-linecap="round">
|
|
133
|
-
<animate
|
|
134
|
-
attributeName="stroke-dasharray"
|
|
135
|
-
dur="1.3s"
|
|
136
|
-
calcMode="spline"
|
|
137
|
-
values="0 150;42 150;42 150;42 150"
|
|
138
|
-
keyTimes="0;0.475;0.7;1"
|
|
139
|
-
keySplines="0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1"
|
|
140
|
-
repeatCount="indefinite"
|
|
141
|
-
/>
|
|
142
|
-
<animate
|
|
143
|
-
attributeName="stroke-dashoffset"
|
|
144
|
-
dur="1.3s"
|
|
145
|
-
calcMode="spline"
|
|
146
|
-
values="0;-2;-59;-59"
|
|
147
|
-
keyTimes="0;0.475;0.98;1"
|
|
148
|
-
keySplines="0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1"
|
|
149
|
-
repeatCount="indefinite"
|
|
150
|
-
/>
|
|
151
|
-
</circle>
|
|
152
|
-
<animateTransform attributeName="transform" type="rotate" dur="1.6s" values="0 12 12;360 12 12" repeatCount="indefinite" />
|
|
153
|
-
</g>
|
|
154
|
-
</svg>
|
|
155
|
-
</div>
|
|
156
|
-
`,g={"api-org":{type:`string`,values:[],value:`liipgpt`,description:`Select the organization to to get the API URL`},"prod-api":{type:`boolean`,value:!1,description:`Select to use the production API URL`},"api-url":{type:`string`,required:!0,value:u,description:`URL of the API endpoint.`},lang:{type:`string`,values:[`en`,`de`,`fr`,`it`],value:`en`,description:`This property allows the parent page of the chat to control the chat language. This is useful if the parent page should drive the language selection.`},"chat-class":{type:`string`,value:``,description:`This is the class attribute of the chat-app container. With this the chat appearance can be customized.`},flyout:{type:`boolean`,value:!1,description:`If set the chat will be put in a default flyout container.`},"flyout-style":{type:`string`,value:`width: 400px; height: 600px;`,description:`This is the style attribute of the flyout container. With this the flyout size and position can be customized.`},"flyout-class":{type:`string`,value:`custom-flyout-class`,description:`This is the class attribute of the flyout container. With this the flyout size and position can be customized.`},"loader-background":{type:`string`,value:`linear-gradient(0deg, #1B181E 0%, #2A2440 90%)`,description:`This is the background color of the loading spinner.`},"loader-color":{type:`string`,value:`#9C92EE`,description:`This is the color of the loading spinner.`},"custom-loader":{type:`string`,value:h,description:`This is an example how you can provide a custom loading spinner when the chat is loading.`},onclosechat:{type:`string`,value:`document.querySelector("liipgpt-chat").addEventListener("closechat", () => console.log("received: closechat"));`,description:`This is the event listener create a custom handler to the closechat event. RELOAD the page to avoid multiple listeners.`},cdn:{type:`boolean`,value:!0,description:`When set, a fixed CDN URL will be used. Instead of providing the code from the backend.`},"use-sri":{type:`boolean`,value:!1,description:`When enabled, generates embed code with a fixed versioned URL and Subresource Integrity (SRI) hash for stricter security.`},CHAT_CONFIG_OVERRIDE:{type:`string`,value:m,description:`This is only for demo purposes and should not be used in production. RELOAD the page to see the effects.`},"show-components":{type:`boolean`,value:!1,description:`Previews all the components for designing purposes.`},"show-link-button":{type:`boolean`,value:!1,description:`Previews the button as a link to an external page`},"hide-sidebar":{type:`boolean`,value:!1,description:`Once hidden, you can display the sidebar again by removing the parameter from the URL`},"preview-background":{type:`string`,value:``,description:`Enter an image URL (.png, .jpg, .webp) for a static background`},"preview-form":{type:`boolean`,value:!1,description:`When true and flyout active it will show a form on the parent page which can be used to demo page context extraction.`}},_=async e=>{let t=await p(e),n=g;return n[`api-org`].values=Object.keys(t),{optionsDefinition:n,apiUrls:t}},v=t({load:()=>x,prerender:()=>!0,ssr:()=>!1}),y=(e,t)=>{let n=structuredClone(e);return Object.entries(e).forEach(([r,i])=>{let a=t.get(r);i.type===`boolean`&&(n[r].required=!0),a===null?i.required?n[r].value=e[r].value:n[r].value=void 0:(i.type===`boolean`&&(n[r].value=a!==`false`),i.type===`string`&&(n[r].value=String(a)))}),n},b,x=async({url:e,fetch:t})=>{let{optionsDefinition:n,apiUrls:r}=await _(t),i=y(n,e.searchParams);if(i[`api-org`].value&&(!b||b[`api-org`].value!==i[`api-org`].value||b[`prod-api`].value!==i[`prod-api`].value)){let e=r[i[`api-org`].value];i[`api-url`].value=i[`prod-api`].value?e.prod:e.dev}return b=i,{optionsDefinition:n,options:i}};function S(t,c){o(c,!0);let u=l(c,`children`,7);var d={get children(){return u()},set children(e){u(e),i()}},f=n();return a(s(f),u),e(t,f),r(d)}c(S,{children:{}},[],[],{mode:`open`});export{S as component,v as universal};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{G as e,Nt as t,Pt as n,U as r,Vt as i,_t as a,gt as o,i as s,l as c,q as l,ut as u,vt as d}from"../chunks/BdP-K7KO.js";import"../chunks/B4H9KbzH.js";import"../chunks/CNhGYG1q.js";import"../chunks/D1hYfEew.js";import"../chunks/CaZV0epm.js";import{t as f}from"../chunks/D6zVGLUW.js";var p=l(`<h1> </h1> <p> </p>`,1);function m(s,l){n(l,!1),c();var m=p(),h=a(m),g=o(h,!0);i(h);var _=d(h,2),v=o(_,!0);i(_),u(()=>{r(g,f.status),r(v,f.error?.message)}),e(s,m),t()}s(m,{},[],[],{mode:`open`});export{m as component};
|