bibot 1.0.36 → 1.0.38
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/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) {
|
@@ -4114,16 +4117,12 @@ var PredefinedQuestions = function PredefinedQuestions(_ref) {
|
|
4114
4117
|
return createElement("div", {
|
4115
4118
|
key: index,
|
4116
4119
|
style: {
|
4117
|
-
backgroundColor: '
|
4120
|
+
backgroundColor: 'transparent',
|
4118
4121
|
border: "0.5px solid " + (chatBubbleConfig ? (_chatBubbleConfig$col = chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color) != null ? _chatBubbleConfig$col : '#dedede' : '#000'),
|
4119
4122
|
fontSize: '16px',
|
4120
|
-
margin: '
|
4123
|
+
margin: '7px',
|
4121
4124
|
textAlign: 'start',
|
4122
|
-
maxHeight: '40px',
|
4123
|
-
overflow: 'hidden',
|
4124
4125
|
padding: '10px',
|
4125
|
-
display: 'flex',
|
4126
|
-
alignItems: 'center',
|
4127
4126
|
borderRadius: '6px',
|
4128
4127
|
cursor: 'pointer'
|
4129
4128
|
},
|