@digipair/skill-web-chatbot 0.5.7 → 0.5.9
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/index.cjs2.js
CHANGED
|
@@ -51882,14 +51882,14 @@ function indent(str, spaces) {
|
|
|
51882
51882
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
51883
51883
|
// match is required
|
|
51884
51884
|
if (!match) {
|
|
51885
|
-
return
|
|
51885
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
51886
51886
|
v: nextMatch1
|
|
51887
51887
|
};
|
|
51888
51888
|
}
|
|
51889
51889
|
var token = match.token, offset = match.offset;
|
|
51890
51890
|
i1 += offset;
|
|
51891
51891
|
if (token === " ") {
|
|
51892
|
-
return
|
|
51892
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
51893
51893
|
}
|
|
51894
51894
|
tokens1 = _to_consumable_array$9(tokens1).concat([
|
|
51895
51895
|
token
|
|
@@ -51908,7 +51908,7 @@ function indent(str, spaces) {
|
|
|
51908
51908
|
if (contextKeys.some(function(el) {
|
|
51909
51909
|
return el.startsWith(name);
|
|
51910
51910
|
})) {
|
|
51911
|
-
return
|
|
51911
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
51912
51912
|
}
|
|
51913
51913
|
if (dateTimeIdentifiers.some(function(el) {
|
|
51914
51914
|
return el === name;
|
|
@@ -51927,9 +51927,9 @@ function indent(str, spaces) {
|
|
|
51927
51927
|
if (dateTimeIdentifiers.some(function(el) {
|
|
51928
51928
|
return el.startsWith(name);
|
|
51929
51929
|
})) {
|
|
51930
|
-
return
|
|
51930
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
51931
51931
|
}
|
|
51932
|
-
return
|
|
51932
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
51933
51933
|
v: nextMatch1
|
|
51934
51934
|
};
|
|
51935
51935
|
};
|
|
@@ -57759,8 +57759,12 @@ const config = {
|
|
|
57759
57759
|
}
|
|
57760
57760
|
};
|
|
57761
57761
|
|
|
57762
|
+
let API_URL$1;
|
|
57763
|
+
let COMMON_EXPERIENCE$1;
|
|
57762
57764
|
class ChatbotElement extends s$3 {
|
|
57763
57765
|
connectedCallback() {
|
|
57766
|
+
API_URL$1 = this.apiUrl;
|
|
57767
|
+
COMMON_EXPERIENCE$1 = this.commonExperience;
|
|
57764
57768
|
super.connectedCallback();
|
|
57765
57769
|
this.loadUser();
|
|
57766
57770
|
this.boostListener();
|
|
@@ -57781,7 +57785,7 @@ class ChatbotElement extends s$3 {
|
|
|
57781
57785
|
}
|
|
57782
57786
|
async boostListener() {
|
|
57783
57787
|
const digipair = this.code;
|
|
57784
|
-
const boosts = (await this.executeScene(
|
|
57788
|
+
const boosts = (await this.executeScene(COMMON_EXPERIENCE$1, 'boosts', {
|
|
57785
57789
|
digipair
|
|
57786
57790
|
})).map(({ name, metadata })=>metadata == null ? void 0 : metadata.boosts.map((boost)=>_extends({}, boost, {
|
|
57787
57791
|
scene: name,
|
|
@@ -57813,7 +57817,7 @@ class ChatbotElement extends s$3 {
|
|
|
57813
57817
|
digipair: this.code,
|
|
57814
57818
|
reasoning: boost.scene,
|
|
57815
57819
|
input: {},
|
|
57816
|
-
apiUrl:
|
|
57820
|
+
apiUrl: API_URL$1
|
|
57817
57821
|
}
|
|
57818
57822
|
}
|
|
57819
57823
|
}));
|
|
@@ -57827,7 +57831,7 @@ class ChatbotElement extends s$3 {
|
|
|
57827
57831
|
this.isDigipairLoading = true;
|
|
57828
57832
|
const digipair = this.code;
|
|
57829
57833
|
const reasoning = 'metadata';
|
|
57830
|
-
const metadata = await this.executeScene(
|
|
57834
|
+
const metadata = await this.executeScene(COMMON_EXPERIENCE$1, reasoning, {
|
|
57831
57835
|
digipair
|
|
57832
57836
|
});
|
|
57833
57837
|
this.metadata = _extends({}, metadata, {
|
|
@@ -57969,18 +57973,23 @@ class ChatbotElement extends s$3 {
|
|
|
57969
57973
|
|
|
57970
57974
|
<section class="actions ${this.loading ? 'loading' : ''}">
|
|
57971
57975
|
${!this.currentBoost ? this.boosters.map((boost)=>x`
|
|
57972
|
-
<span
|
|
57976
|
+
<span
|
|
57977
|
+
class="action"
|
|
57978
|
+
style="border: 1px solid ${this.metadata.color}"
|
|
57979
|
+
@click=${()=>this.executeBoost(boost)}
|
|
57980
|
+
>${boost.name}</span
|
|
57981
|
+
>
|
|
57973
57982
|
`) : x`
|
|
57974
|
-
|
|
57975
|
-
|
|
57976
|
-
|
|
57977
|
-
|
|
57983
|
+
<span
|
|
57984
|
+
class="action"
|
|
57985
|
+
style="border: 1px solid ${this.metadata.color}"
|
|
57986
|
+
@click=${()=>{
|
|
57978
57987
|
this.currentBoost = null;
|
|
57979
57988
|
this.boosters = [];
|
|
57980
57989
|
}}
|
|
57981
|
-
|
|
57982
|
-
|
|
57983
|
-
|
|
57990
|
+
>Annuler</span
|
|
57991
|
+
>
|
|
57992
|
+
`}
|
|
57984
57993
|
</section>
|
|
57985
57994
|
|
|
57986
57995
|
<section class="panel" style="border: 1px solid ${this.metadata.color}"></section>
|
|
@@ -57996,6 +58005,8 @@ class ChatbotElement extends s$3 {
|
|
|
57996
58005
|
super(...args);
|
|
57997
58006
|
this.code = 'common';
|
|
57998
58007
|
this.firstOpenDelay = 60000;
|
|
58008
|
+
this.apiUrl = _config.API_URL;
|
|
58009
|
+
this.commonExperience = _config.COMMON_EXPERIENCE;
|
|
57999
58010
|
this.boosters = [];
|
|
58000
58011
|
this.loading = false;
|
|
58001
58012
|
this.resultState = 'open';
|
|
@@ -58007,7 +58018,7 @@ class ChatbotElement extends s$3 {
|
|
|
58007
58018
|
properties: {
|
|
58008
58019
|
digipair,
|
|
58009
58020
|
reasoning: 'conversation',
|
|
58010
|
-
apiUrl:
|
|
58021
|
+
apiUrl: API_URL$1
|
|
58011
58022
|
}
|
|
58012
58023
|
});
|
|
58013
58024
|
this.alreadyOpened = false;
|
|
@@ -58021,7 +58032,7 @@ class ChatbotElement extends s$3 {
|
|
|
58021
58032
|
}
|
|
58022
58033
|
};
|
|
58023
58034
|
this.executeScene = async (digipair, reasoning, input = {})=>{
|
|
58024
|
-
const response = await fetch(`${
|
|
58035
|
+
const response = await fetch(`${API_URL$1}/${digipair}/${reasoning}`, {
|
|
58025
58036
|
method: 'POST',
|
|
58026
58037
|
headers: {
|
|
58027
58038
|
'Content-Type': 'application/json'
|
|
@@ -58039,6 +58050,12 @@ __decorate$3([
|
|
|
58039
58050
|
__decorate$3([
|
|
58040
58051
|
n$3()
|
|
58041
58052
|
], ChatbotElement.prototype, "firstOpenDelay", void 0);
|
|
58053
|
+
__decorate$3([
|
|
58054
|
+
n$3()
|
|
58055
|
+
], ChatbotElement.prototype, "apiUrl", void 0);
|
|
58056
|
+
__decorate$3([
|
|
58057
|
+
n$3()
|
|
58058
|
+
], ChatbotElement.prototype, "commonExperience", void 0);
|
|
58042
58059
|
__decorate$3([
|
|
58043
58060
|
r$1(),
|
|
58044
58061
|
__metadata("design:type", Array)
|
|
@@ -58212,8 +58229,12 @@ const styles = i$5`
|
|
|
58212
58229
|
|
|
58213
58230
|
*/
|
|
58214
58231
|
|
|
58232
|
+
let API_URL;
|
|
58233
|
+
let COMMON_EXPERIENCE;
|
|
58215
58234
|
class DigipairFullElement extends s$3 {
|
|
58216
58235
|
connectedCallback() {
|
|
58236
|
+
API_URL = this.apiUrl;
|
|
58237
|
+
COMMON_EXPERIENCE = this.commonExperience;
|
|
58217
58238
|
super.connectedCallback();
|
|
58218
58239
|
this.loadUser();
|
|
58219
58240
|
this.loadBoosters();
|
|
@@ -58227,7 +58248,7 @@ class DigipairFullElement extends s$3 {
|
|
|
58227
58248
|
}
|
|
58228
58249
|
}
|
|
58229
58250
|
async loadBoosters() {
|
|
58230
|
-
this.cacheBoosters = (await this.executeScene(
|
|
58251
|
+
this.cacheBoosters = (await this.executeScene(COMMON_EXPERIENCE, 'boosts', {
|
|
58231
58252
|
digipair: this.code
|
|
58232
58253
|
})).map(({ name, metadata })=>metadata == null ? void 0 : metadata.boosts.map((boost)=>_extends({}, boost, {
|
|
58233
58254
|
scene: name,
|
|
@@ -58246,7 +58267,7 @@ class DigipairFullElement extends s$3 {
|
|
|
58246
58267
|
digipair: this.code,
|
|
58247
58268
|
reasoning: boost.scene,
|
|
58248
58269
|
input: {},
|
|
58249
|
-
apiUrl:
|
|
58270
|
+
apiUrl: API_URL
|
|
58250
58271
|
}
|
|
58251
58272
|
}
|
|
58252
58273
|
}));
|
|
@@ -58255,7 +58276,7 @@ class DigipairFullElement extends s$3 {
|
|
|
58255
58276
|
this.isDigipairLoading = true;
|
|
58256
58277
|
const digipair = this.code;
|
|
58257
58278
|
const reasoning = 'metadata';
|
|
58258
|
-
const metadata = await this.executeScene(
|
|
58279
|
+
const metadata = await this.executeScene(COMMON_EXPERIENCE, reasoning, {
|
|
58259
58280
|
digipair
|
|
58260
58281
|
});
|
|
58261
58282
|
this.metadata = _extends({}, metadata, {
|
|
@@ -58413,6 +58434,8 @@ class DigipairFullElement extends s$3 {
|
|
|
58413
58434
|
constructor(...args){
|
|
58414
58435
|
super(...args);
|
|
58415
58436
|
this.code = 'common';
|
|
58437
|
+
this.apiUrl = _config.API_URL;
|
|
58438
|
+
this.commonExperience = _config.COMMON_EXPERIENCE;
|
|
58416
58439
|
this.boosters = [];
|
|
58417
58440
|
this.loading = false;
|
|
58418
58441
|
this.currentBoost = null;
|
|
@@ -58423,14 +58446,14 @@ class DigipairFullElement extends s$3 {
|
|
|
58423
58446
|
properties: {
|
|
58424
58447
|
digipair,
|
|
58425
58448
|
reasoning: 'conversation',
|
|
58426
|
-
apiUrl:
|
|
58449
|
+
apiUrl: API_URL
|
|
58427
58450
|
}
|
|
58428
58451
|
});
|
|
58429
58452
|
this.cacheBoosters = [];
|
|
58430
58453
|
this.userId = null;
|
|
58431
58454
|
this.isDigipairLoading = false;
|
|
58432
58455
|
this.executeScene = async (digipair, reasoning, input = {})=>{
|
|
58433
|
-
const response = await fetch(`${
|
|
58456
|
+
const response = await fetch(`${API_URL}/${digipair}/${reasoning}`, {
|
|
58434
58457
|
method: 'POST',
|
|
58435
58458
|
headers: {
|
|
58436
58459
|
'Content-Type': 'application/json'
|
|
@@ -58445,6 +58468,12 @@ DigipairFullElement.styles = styles;
|
|
|
58445
58468
|
__decorate$3([
|
|
58446
58469
|
n$3()
|
|
58447
58470
|
], DigipairFullElement.prototype, "code", void 0);
|
|
58471
|
+
__decorate$3([
|
|
58472
|
+
n$3()
|
|
58473
|
+
], DigipairFullElement.prototype, "apiUrl", void 0);
|
|
58474
|
+
__decorate$3([
|
|
58475
|
+
n$3()
|
|
58476
|
+
], DigipairFullElement.prototype, "commonExperience", void 0);
|
|
58448
58477
|
__decorate$3([
|
|
58449
58478
|
r$1(),
|
|
58450
58479
|
__metadata("design:type", Array)
|
package/index.esm2.js
CHANGED
|
@@ -51862,14 +51862,14 @@ function indent(str, spaces) {
|
|
|
51862
51862
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
51863
51863
|
// match is required
|
|
51864
51864
|
if (!match) {
|
|
51865
|
-
return
|
|
51865
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
|
51866
51866
|
v: nextMatch1
|
|
51867
51867
|
};
|
|
51868
51868
|
}
|
|
51869
51869
|
var token = match.token, offset = match.offset;
|
|
51870
51870
|
i1 += offset;
|
|
51871
51871
|
if (token === " ") {
|
|
51872
|
-
return
|
|
51872
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
|
51873
51873
|
}
|
|
51874
51874
|
tokens1 = _to_consumable_array$9(tokens1).concat([
|
|
51875
51875
|
token
|
|
@@ -51888,7 +51888,7 @@ function indent(str, spaces) {
|
|
|
51888
51888
|
if (contextKeys.some(function(el) {
|
|
51889
51889
|
return el.startsWith(name);
|
|
51890
51890
|
})) {
|
|
51891
|
-
return
|
|
51891
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
|
51892
51892
|
}
|
|
51893
51893
|
if (dateTimeIdentifiers.some(function(el) {
|
|
51894
51894
|
return el === name;
|
|
@@ -51907,9 +51907,9 @@ function indent(str, spaces) {
|
|
|
51907
51907
|
if (dateTimeIdentifiers.some(function(el) {
|
|
51908
51908
|
return el.startsWith(name);
|
|
51909
51909
|
})) {
|
|
51910
|
-
return
|
|
51910
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
|
51911
51911
|
}
|
|
51912
|
-
return
|
|
51912
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
|
51913
51913
|
v: nextMatch1
|
|
51914
51914
|
};
|
|
51915
51915
|
};
|
|
@@ -57739,8 +57739,12 @@ const config = {
|
|
|
57739
57739
|
}
|
|
57740
57740
|
};
|
|
57741
57741
|
|
|
57742
|
+
let API_URL$1;
|
|
57743
|
+
let COMMON_EXPERIENCE$1;
|
|
57742
57744
|
class ChatbotElement extends s$3 {
|
|
57743
57745
|
connectedCallback() {
|
|
57746
|
+
API_URL$1 = this.apiUrl;
|
|
57747
|
+
COMMON_EXPERIENCE$1 = this.commonExperience;
|
|
57744
57748
|
super.connectedCallback();
|
|
57745
57749
|
this.loadUser();
|
|
57746
57750
|
this.boostListener();
|
|
@@ -57761,7 +57765,7 @@ class ChatbotElement extends s$3 {
|
|
|
57761
57765
|
}
|
|
57762
57766
|
async boostListener() {
|
|
57763
57767
|
const digipair = this.code;
|
|
57764
|
-
const boosts = (await this.executeScene(
|
|
57768
|
+
const boosts = (await this.executeScene(COMMON_EXPERIENCE$1, 'boosts', {
|
|
57765
57769
|
digipair
|
|
57766
57770
|
})).map(({ name, metadata })=>metadata == null ? void 0 : metadata.boosts.map((boost)=>_extends({}, boost, {
|
|
57767
57771
|
scene: name,
|
|
@@ -57793,7 +57797,7 @@ class ChatbotElement extends s$3 {
|
|
|
57793
57797
|
digipair: this.code,
|
|
57794
57798
|
reasoning: boost.scene,
|
|
57795
57799
|
input: {},
|
|
57796
|
-
apiUrl:
|
|
57800
|
+
apiUrl: API_URL$1
|
|
57797
57801
|
}
|
|
57798
57802
|
}
|
|
57799
57803
|
}));
|
|
@@ -57807,7 +57811,7 @@ class ChatbotElement extends s$3 {
|
|
|
57807
57811
|
this.isDigipairLoading = true;
|
|
57808
57812
|
const digipair = this.code;
|
|
57809
57813
|
const reasoning = 'metadata';
|
|
57810
|
-
const metadata = await this.executeScene(
|
|
57814
|
+
const metadata = await this.executeScene(COMMON_EXPERIENCE$1, reasoning, {
|
|
57811
57815
|
digipair
|
|
57812
57816
|
});
|
|
57813
57817
|
this.metadata = _extends({}, metadata, {
|
|
@@ -57949,18 +57953,23 @@ class ChatbotElement extends s$3 {
|
|
|
57949
57953
|
|
|
57950
57954
|
<section class="actions ${this.loading ? 'loading' : ''}">
|
|
57951
57955
|
${!this.currentBoost ? this.boosters.map((boost)=>x`
|
|
57952
|
-
<span
|
|
57956
|
+
<span
|
|
57957
|
+
class="action"
|
|
57958
|
+
style="border: 1px solid ${this.metadata.color}"
|
|
57959
|
+
@click=${()=>this.executeBoost(boost)}
|
|
57960
|
+
>${boost.name}</span
|
|
57961
|
+
>
|
|
57953
57962
|
`) : x`
|
|
57954
|
-
|
|
57955
|
-
|
|
57956
|
-
|
|
57957
|
-
|
|
57963
|
+
<span
|
|
57964
|
+
class="action"
|
|
57965
|
+
style="border: 1px solid ${this.metadata.color}"
|
|
57966
|
+
@click=${()=>{
|
|
57958
57967
|
this.currentBoost = null;
|
|
57959
57968
|
this.boosters = [];
|
|
57960
57969
|
}}
|
|
57961
|
-
|
|
57962
|
-
|
|
57963
|
-
|
|
57970
|
+
>Annuler</span
|
|
57971
|
+
>
|
|
57972
|
+
`}
|
|
57964
57973
|
</section>
|
|
57965
57974
|
|
|
57966
57975
|
<section class="panel" style="border: 1px solid ${this.metadata.color}"></section>
|
|
@@ -57976,6 +57985,8 @@ class ChatbotElement extends s$3 {
|
|
|
57976
57985
|
super(...args);
|
|
57977
57986
|
this.code = 'common';
|
|
57978
57987
|
this.firstOpenDelay = 60000;
|
|
57988
|
+
this.apiUrl = _config.API_URL;
|
|
57989
|
+
this.commonExperience = _config.COMMON_EXPERIENCE;
|
|
57979
57990
|
this.boosters = [];
|
|
57980
57991
|
this.loading = false;
|
|
57981
57992
|
this.resultState = 'open';
|
|
@@ -57987,7 +57998,7 @@ class ChatbotElement extends s$3 {
|
|
|
57987
57998
|
properties: {
|
|
57988
57999
|
digipair,
|
|
57989
58000
|
reasoning: 'conversation',
|
|
57990
|
-
apiUrl:
|
|
58001
|
+
apiUrl: API_URL$1
|
|
57991
58002
|
}
|
|
57992
58003
|
});
|
|
57993
58004
|
this.alreadyOpened = false;
|
|
@@ -58001,7 +58012,7 @@ class ChatbotElement extends s$3 {
|
|
|
58001
58012
|
}
|
|
58002
58013
|
};
|
|
58003
58014
|
this.executeScene = async (digipair, reasoning, input = {})=>{
|
|
58004
|
-
const response = await fetch(`${
|
|
58015
|
+
const response = await fetch(`${API_URL$1}/${digipair}/${reasoning}`, {
|
|
58005
58016
|
method: 'POST',
|
|
58006
58017
|
headers: {
|
|
58007
58018
|
'Content-Type': 'application/json'
|
|
@@ -58019,6 +58030,12 @@ __decorate$3([
|
|
|
58019
58030
|
__decorate$3([
|
|
58020
58031
|
n$3()
|
|
58021
58032
|
], ChatbotElement.prototype, "firstOpenDelay", void 0);
|
|
58033
|
+
__decorate$3([
|
|
58034
|
+
n$3()
|
|
58035
|
+
], ChatbotElement.prototype, "apiUrl", void 0);
|
|
58036
|
+
__decorate$3([
|
|
58037
|
+
n$3()
|
|
58038
|
+
], ChatbotElement.prototype, "commonExperience", void 0);
|
|
58022
58039
|
__decorate$3([
|
|
58023
58040
|
r$1(),
|
|
58024
58041
|
__metadata("design:type", Array)
|
|
@@ -58192,8 +58209,12 @@ const styles = i$5`
|
|
|
58192
58209
|
|
|
58193
58210
|
*/
|
|
58194
58211
|
|
|
58212
|
+
let API_URL;
|
|
58213
|
+
let COMMON_EXPERIENCE;
|
|
58195
58214
|
class DigipairFullElement extends s$3 {
|
|
58196
58215
|
connectedCallback() {
|
|
58216
|
+
API_URL = this.apiUrl;
|
|
58217
|
+
COMMON_EXPERIENCE = this.commonExperience;
|
|
58197
58218
|
super.connectedCallback();
|
|
58198
58219
|
this.loadUser();
|
|
58199
58220
|
this.loadBoosters();
|
|
@@ -58207,7 +58228,7 @@ class DigipairFullElement extends s$3 {
|
|
|
58207
58228
|
}
|
|
58208
58229
|
}
|
|
58209
58230
|
async loadBoosters() {
|
|
58210
|
-
this.cacheBoosters = (await this.executeScene(
|
|
58231
|
+
this.cacheBoosters = (await this.executeScene(COMMON_EXPERIENCE, 'boosts', {
|
|
58211
58232
|
digipair: this.code
|
|
58212
58233
|
})).map(({ name, metadata })=>metadata == null ? void 0 : metadata.boosts.map((boost)=>_extends({}, boost, {
|
|
58213
58234
|
scene: name,
|
|
@@ -58226,7 +58247,7 @@ class DigipairFullElement extends s$3 {
|
|
|
58226
58247
|
digipair: this.code,
|
|
58227
58248
|
reasoning: boost.scene,
|
|
58228
58249
|
input: {},
|
|
58229
|
-
apiUrl:
|
|
58250
|
+
apiUrl: API_URL
|
|
58230
58251
|
}
|
|
58231
58252
|
}
|
|
58232
58253
|
}));
|
|
@@ -58235,7 +58256,7 @@ class DigipairFullElement extends s$3 {
|
|
|
58235
58256
|
this.isDigipairLoading = true;
|
|
58236
58257
|
const digipair = this.code;
|
|
58237
58258
|
const reasoning = 'metadata';
|
|
58238
|
-
const metadata = await this.executeScene(
|
|
58259
|
+
const metadata = await this.executeScene(COMMON_EXPERIENCE, reasoning, {
|
|
58239
58260
|
digipair
|
|
58240
58261
|
});
|
|
58241
58262
|
this.metadata = _extends({}, metadata, {
|
|
@@ -58393,6 +58414,8 @@ class DigipairFullElement extends s$3 {
|
|
|
58393
58414
|
constructor(...args){
|
|
58394
58415
|
super(...args);
|
|
58395
58416
|
this.code = 'common';
|
|
58417
|
+
this.apiUrl = _config.API_URL;
|
|
58418
|
+
this.commonExperience = _config.COMMON_EXPERIENCE;
|
|
58396
58419
|
this.boosters = [];
|
|
58397
58420
|
this.loading = false;
|
|
58398
58421
|
this.currentBoost = null;
|
|
@@ -58403,14 +58426,14 @@ class DigipairFullElement extends s$3 {
|
|
|
58403
58426
|
properties: {
|
|
58404
58427
|
digipair,
|
|
58405
58428
|
reasoning: 'conversation',
|
|
58406
|
-
apiUrl:
|
|
58429
|
+
apiUrl: API_URL
|
|
58407
58430
|
}
|
|
58408
58431
|
});
|
|
58409
58432
|
this.cacheBoosters = [];
|
|
58410
58433
|
this.userId = null;
|
|
58411
58434
|
this.isDigipairLoading = false;
|
|
58412
58435
|
this.executeScene = async (digipair, reasoning, input = {})=>{
|
|
58413
|
-
const response = await fetch(`${
|
|
58436
|
+
const response = await fetch(`${API_URL}/${digipair}/${reasoning}`, {
|
|
58414
58437
|
method: 'POST',
|
|
58415
58438
|
headers: {
|
|
58416
58439
|
'Content-Type': 'application/json'
|
|
@@ -58425,6 +58448,12 @@ DigipairFullElement.styles = styles;
|
|
|
58425
58448
|
__decorate$3([
|
|
58426
58449
|
n$3()
|
|
58427
58450
|
], DigipairFullElement.prototype, "code", void 0);
|
|
58451
|
+
__decorate$3([
|
|
58452
|
+
n$3()
|
|
58453
|
+
], DigipairFullElement.prototype, "apiUrl", void 0);
|
|
58454
|
+
__decorate$3([
|
|
58455
|
+
n$3()
|
|
58456
|
+
], DigipairFullElement.prototype, "commonExperience", void 0);
|
|
58428
58457
|
__decorate$3([
|
|
58429
58458
|
r$1(),
|
|
58430
58459
|
__metadata("design:type", Array)
|
|
@@ -5,6 +5,8 @@ import { LitElement, TemplateResult } from 'lit';
|
|
|
5
5
|
import './chat.element';
|
|
6
6
|
export declare class DigipairFullElement extends LitElement {
|
|
7
7
|
code: string;
|
|
8
|
+
apiUrl: string;
|
|
9
|
+
commonExperience: string;
|
|
8
10
|
private boosters;
|
|
9
11
|
private loading;
|
|
10
12
|
private currentBoost;
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -22,6 +22,24 @@
|
|
|
22
22
|
"schema": {
|
|
23
23
|
"type": "string"
|
|
24
24
|
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "apiUrl",
|
|
28
|
+
"summary": "Adresse de la factory",
|
|
29
|
+
"required": false,
|
|
30
|
+
"description": "Adresse URL de la factory",
|
|
31
|
+
"schema": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "commonExperience",
|
|
37
|
+
"summary": "Digipair commun",
|
|
38
|
+
"required": false,
|
|
39
|
+
"description": "Digipair qui partage les raisonnements communs avec tous les chatbots",
|
|
40
|
+
"schema": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
}
|
|
25
43
|
}
|
|
26
44
|
],
|
|
27
45
|
"x-events": []
|
|
@@ -41,6 +59,24 @@
|
|
|
41
59
|
"schema": {
|
|
42
60
|
"type": "string"
|
|
43
61
|
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "apiUrl",
|
|
65
|
+
"summary": "Adresse de la factory",
|
|
66
|
+
"required": false,
|
|
67
|
+
"description": "Adresse URL de la factory",
|
|
68
|
+
"schema": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "commonExperience",
|
|
74
|
+
"summary": "Digipair commun",
|
|
75
|
+
"required": false,
|
|
76
|
+
"description": "Digipair qui partage les raisonnements communs avec tous les chatbots",
|
|
77
|
+
"schema": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
}
|
|
44
80
|
}
|
|
45
81
|
],
|
|
46
82
|
"x-events": []
|