bibot 1.0.35 → 1.0.37

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.
@@ -13,5 +13,6 @@ export declare enum resources {
13
13
  chatBubble = "/chat-bubble-config",
14
14
  predefinedQ = "/predefined-q",
15
15
  timeoutQ = "/timeout-q",
16
- q = "/q"
16
+ q = "/q",
17
+ predefinedQstatistics = "/predefined-questions-statistics"
17
18
  }
package/dist/index.js CHANGED
@@ -3286,6 +3286,7 @@ var resources;
3286
3286
  resources["predefinedQ"] = "/predefined-q";
3287
3287
  resources["timeoutQ"] = "/timeout-q";
3288
3288
  resources["q"] = "/q";
3289
+ resources["predefinedQstatistics"] = "/predefined-questions-statistics";
3289
3290
  })(resources || (resources = {}));
3290
3291
 
3291
3292
  var inferenceBaseURL = endpoints.inference;
@@ -3579,7 +3580,8 @@ var askBiBot = function askBiBot(data) {
3579
3580
  var recordPredefinedQ = function recordPredefinedQ(data) {
3580
3581
  try {
3581
3582
  return Promise.resolve(_catch(function () {
3582
- var path = 'https://training.dev.bibot.thespuka.com/v0/training/predefined-questions-statistics';
3583
+ var path = "" + domain.inference + resources.predefinedQstatistics;
3584
+ console.log(data, 'here');
3583
3585
  return Promise.resolve(pluginAxiosInstance.post(path, data)).then(function (response) {
3584
3586
  console.log(response, 'here is the res');
3585
3587
  return response.data;
@@ -3661,10 +3663,11 @@ var useBiBotChatBot = function useBiBotChatBot(_ref) {
3661
3663
  setIsLoading(true);
3662
3664
  var input = question.question.trim();
3663
3665
  recordPredefinedQ({
3664
- client_id: clientId,
3665
- question: question.question
3666
+ "client_id": clientId,
3667
+ "question": question.question,
3668
+ "q_n_a_id": question.q_n_a_id
3666
3669
  });
3667
- console.log(question.question, client_id);
3670
+ console.log(question.question, client_id, question.q_n_a_id);
3668
3671
  setUserInput('');
3669
3672
  if (input === question.question) {
3670
3673
  setMessages(function (messages) {
@@ -4119,15 +4122,15 @@ var PredefinedQuestions = function PredefinedQuestions(_ref) {
4119
4122
  style: {
4120
4123
  backgroundColor: '#fff',
4121
4124
  border: "0.5px solid " + (chatBubbleConfig ? (_chatBubbleConfig$col = chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color) != null ? _chatBubbleConfig$col : '#dedede' : '#000'),
4122
- fontSize: 16,
4123
- margin: 5,
4125
+ fontSize: '16px',
4126
+ margin: '5px',
4124
4127
  textAlign: 'start',
4125
4128
  maxHeight: '40px',
4126
4129
  overflow: 'hidden',
4127
- padding: 10,
4130
+ padding: '10px',
4128
4131
  display: 'flex',
4129
4132
  alignItems: 'center',
4130
- borderRadius: 6,
4133
+ borderRadius: '6px',
4131
4134
  cursor: 'pointer'
4132
4135
  },
4133
4136
  onClick: function onClick() {