@hivegpt/hiveai-angular 0.0.307 → 0.0.309
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/bundles/hivegpt-hiveai-angular.umd.js +7 -6
- package/bundles/hivegpt-hiveai-angular.umd.js.map +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js.map +1 -1
- package/esm2015/lib/components/chat-drawer/chat-drawer.component.js +8 -7
- package/fesm2015/hivegpt-hiveai-angular.js +7 -6
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1437,19 +1437,20 @@
|
|
|
1437
1437
|
_this.pump(controller, reader, allSuggestions);
|
|
1438
1438
|
});
|
|
1439
1439
|
};
|
|
1440
|
-
ChatDrawerComponent.prototype.submitFeedback = function (flag) {
|
|
1440
|
+
ChatDrawerComponent.prototype.submitFeedback = function (flag, message) {
|
|
1441
1441
|
var _this = this;
|
|
1442
1442
|
this.feedbackDone = true;
|
|
1443
1443
|
this.showFeedBackIconsIndex = null;
|
|
1444
|
-
var
|
|
1444
|
+
var conversation_id = this.conversationService.getKey(this.botId);
|
|
1445
|
+
var url = this.environment.AGENTS_API + "/Conversation/coPilot/" + this.botId + "/conversation/" + conversation_id + "/helpful-response";
|
|
1445
1446
|
fetch(url, {
|
|
1446
1447
|
method: 'POST',
|
|
1447
1448
|
headers: {
|
|
1448
1449
|
'Content-Type': 'application/json',
|
|
1449
|
-
'x-api-key':
|
|
1450
|
+
'x-api-key': 'Conversation_WIz/qAm+EEmfOkFaUA/weA==',
|
|
1450
1451
|
'hive-bot-id': this.botId
|
|
1451
1452
|
},
|
|
1452
|
-
body: JSON.stringify({
|
|
1453
|
+
body: JSON.stringify({ isHelpful: flag, messageId: message.message_id }),
|
|
1453
1454
|
}).then(function () {
|
|
1454
1455
|
if (flag) {
|
|
1455
1456
|
_this.chatLog.push({
|
|
@@ -1495,7 +1496,7 @@
|
|
|
1495
1496
|
if (this.feedbackDone) {
|
|
1496
1497
|
return;
|
|
1497
1498
|
}
|
|
1498
|
-
this.submitFeedback(true);
|
|
1499
|
+
this.submitFeedback(true, this.chatLog[idx]);
|
|
1499
1500
|
this.chatLog[idx].liked = !this.chatLog[idx].liked;
|
|
1500
1501
|
if (this.chatLog[idx].unliked) {
|
|
1501
1502
|
this.chatLog[idx].unliked = !this.chatLog[idx].unliked;
|
|
@@ -1505,7 +1506,7 @@
|
|
|
1505
1506
|
ChatDrawerComponent.prototype.handleDownClick = function (idx) {
|
|
1506
1507
|
if (this.feedbackDone)
|
|
1507
1508
|
return;
|
|
1508
|
-
this.submitFeedback(false);
|
|
1509
|
+
this.submitFeedback(false, this.chatLog[idx]);
|
|
1509
1510
|
this.chatLog[idx].unliked = !this.chatLog[idx].unliked;
|
|
1510
1511
|
if (this.chatLog[idx].liked)
|
|
1511
1512
|
this.chatLog[idx].liked = !this.chatLog[idx].liked;
|