@hivegpt/hiveai-angular 0.0.171 → 0.0.172
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 +40 -4
- 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 +41 -5
- package/fesm2015/hivegpt-hiveai-angular.js +40 -4
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -815,11 +815,46 @@
|
|
|
815
815
|
this.eventSubscription = this.conversation
|
|
816
816
|
.getUserSpecificNotification()
|
|
817
817
|
.subscribe(function (res) {
|
|
818
|
-
|
|
819
|
-
|
|
818
|
+
// Check if OtherFields exists in the response
|
|
819
|
+
if (res.OtherFields) {
|
|
820
|
+
var _e = res.OtherFields, conversation_id = _e.conversation_id, bot_id = _e.bot_id, answer = _e.answer, web_results = _e.web_results, financial_graphs = _e.financial_graphs, execution_graphs = _e.execution_graphs, online_search_terms = _e.online_search_terms;
|
|
821
|
+
// Handle the fields based on their presence
|
|
822
|
+
if (answer) {
|
|
823
|
+
_this.isChatingWithAi = false;
|
|
824
|
+
console.log('Answer:', answer);
|
|
825
|
+
_this.chatLog.push({
|
|
826
|
+
type: 'ai',
|
|
827
|
+
message: _this.processMessageForDisplay(answer),
|
|
828
|
+
time: formatNow(_this.timezone),
|
|
829
|
+
});
|
|
830
|
+
_this.showFeedBackIconsIndex = _this.chatLog.length - 1;
|
|
831
|
+
_this.cdr.markForCheck();
|
|
832
|
+
_this.scrollToBottom();
|
|
833
|
+
}
|
|
834
|
+
if (web_results && Array.isArray(web_results)) {
|
|
835
|
+
console.log('Web Results:', web_results);
|
|
836
|
+
// Process web results as needed
|
|
837
|
+
}
|
|
838
|
+
if (financial_graphs && Array.isArray(financial_graphs)) {
|
|
839
|
+
console.log('Financial Graphs:', financial_graphs);
|
|
840
|
+
// Process financial graphs as needed
|
|
841
|
+
}
|
|
842
|
+
if (execution_graphs && Array.isArray(execution_graphs)) {
|
|
843
|
+
console.log('Execution Graphs:', execution_graphs);
|
|
844
|
+
// Process execution graphs as needed
|
|
845
|
+
}
|
|
846
|
+
if (online_search_terms && Array.isArray(online_search_terms)) {
|
|
847
|
+
console.log('Online Search Terms:', online_search_terms);
|
|
848
|
+
// Process online search terms as needed
|
|
849
|
+
}
|
|
850
|
+
// Add any other fields and their processing here
|
|
851
|
+
}
|
|
852
|
+
else {
|
|
853
|
+
console.warn('OtherFields is missing in the response');
|
|
854
|
+
}
|
|
820
855
|
}, function (err) {
|
|
821
856
|
_this.eventSubscription.unsubscribe();
|
|
822
|
-
console.error('Error in fetching data from socket');
|
|
857
|
+
console.error('Error in fetching data from socket', err);
|
|
823
858
|
});
|
|
824
859
|
};
|
|
825
860
|
ChatDrawerComponent.prototype.initializeSocketAndListen = function () {
|
|
@@ -1079,7 +1114,8 @@
|
|
|
1079
1114
|
})
|
|
1080
1115
|
// Retrieve its body as ReadableStream
|
|
1081
1116
|
.then(function (response) {
|
|
1082
|
-
return
|
|
1117
|
+
//return this.readAllChunks(response.body);
|
|
1118
|
+
return rxjs.of(null);
|
|
1083
1119
|
})
|
|
1084
1120
|
.catch(function (err) {
|
|
1085
1121
|
console.error('Err: ', err);
|