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