bibot 1.0.36 → 1.0.37

Sign up to get free protection for your applications and to get access to all the features.
@@ -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) {