bibot 1.0.35 → 1.0.37
Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.modern.js
CHANGED
@@ -3283,6 +3283,7 @@ var resources;
|
|
3283
3283
|
resources["predefinedQ"] = "/predefined-q";
|
3284
3284
|
resources["timeoutQ"] = "/timeout-q";
|
3285
3285
|
resources["q"] = "/q";
|
3286
|
+
resources["predefinedQstatistics"] = "/predefined-questions-statistics";
|
3286
3287
|
})(resources || (resources = {}));
|
3287
3288
|
|
3288
3289
|
var inferenceBaseURL = endpoints.inference;
|
@@ -3576,7 +3577,8 @@ var askBiBot = function askBiBot(data) {
|
|
3576
3577
|
var recordPredefinedQ = function recordPredefinedQ(data) {
|
3577
3578
|
try {
|
3578
3579
|
return Promise.resolve(_catch(function () {
|
3579
|
-
var path =
|
3580
|
+
var path = "" + domain.inference + resources.predefinedQstatistics;
|
3581
|
+
console.log(data, 'here');
|
3580
3582
|
return Promise.resolve(pluginAxiosInstance.post(path, data)).then(function (response) {
|
3581
3583
|
console.log(response, 'here is the res');
|
3582
3584
|
return response.data;
|
@@ -3658,10 +3660,11 @@ var useBiBotChatBot = function useBiBotChatBot(_ref) {
|
|
3658
3660
|
setIsLoading(true);
|
3659
3661
|
var input = question.question.trim();
|
3660
3662
|
recordPredefinedQ({
|
3661
|
-
client_id: clientId,
|
3662
|
-
question: question.question
|
3663
|
+
"client_id": clientId,
|
3664
|
+
"question": question.question,
|
3665
|
+
"q_n_a_id": question.q_n_a_id
|
3663
3666
|
});
|
3664
|
-
console.log(question.question, client_id);
|
3667
|
+
console.log(question.question, client_id, question.q_n_a_id);
|
3665
3668
|
setUserInput('');
|
3666
3669
|
if (input === question.question) {
|
3667
3670
|
setMessages(function (messages) {
|
@@ -4116,15 +4119,15 @@ var PredefinedQuestions = function PredefinedQuestions(_ref) {
|
|
4116
4119
|
style: {
|
4117
4120
|
backgroundColor: '#fff',
|
4118
4121
|
border: "0.5px solid " + (chatBubbleConfig ? (_chatBubbleConfig$col = chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color) != null ? _chatBubbleConfig$col : '#dedede' : '#000'),
|
4119
|
-
fontSize:
|
4120
|
-
margin:
|
4122
|
+
fontSize: '16px',
|
4123
|
+
margin: '5px',
|
4121
4124
|
textAlign: 'start',
|
4122
4125
|
maxHeight: '40px',
|
4123
4126
|
overflow: 'hidden',
|
4124
|
-
padding:
|
4127
|
+
padding: '10px',
|
4125
4128
|
display: 'flex',
|
4126
4129
|
alignItems: 'center',
|
4127
|
-
borderRadius:
|
4130
|
+
borderRadius: '6px',
|
4128
4131
|
cursor: 'pointer'
|
4129
4132
|
},
|
4130
4133
|
onClick: function onClick() {
|