@memori.ai/memori-api-client 0.8.3 → 0.10.0

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.
@@ -2747,6 +2747,75 @@ var nlp = (function (apiUrl) {
2747
2747
  }
2748
2748
 
2749
2749
  return checkWords;
2750
+ }(),
2751
+
2752
+ /**
2753
+ * Tries to suggest the answer for a question, using as much content as possible from the session's associated Memori object.
2754
+ * @param {string} sessionId The session ID
2755
+ * @param {string} text Text of the sentence.
2756
+ */
2757
+ suggestAnswer: function () {
2758
+ var _suggestAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(sessionId, text) {
2759
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
2760
+ while (1) {
2761
+ switch (_context6.prev = _context6.next) {
2762
+ case 0:
2763
+ return _context6.abrupt("return", apiFetcher("/SuggestAnswer/" + sessionId, {
2764
+ method: 'POST',
2765
+ apiUrl: apiUrl,
2766
+ body: {
2767
+ text: text
2768
+ }
2769
+ }));
2770
+
2771
+ case 1:
2772
+ case "end":
2773
+ return _context6.stop();
2774
+ }
2775
+ }
2776
+ }, _callee6);
2777
+ }));
2778
+
2779
+ function suggestAnswer(_x14, _x15) {
2780
+ return _suggestAnswer.apply(this, arguments);
2781
+ }
2782
+
2783
+ return suggestAnswer;
2784
+ }(),
2785
+
2786
+ /**
2787
+ * Tries to suggest questions for an answer.
2788
+ * Differently from ```SuggestAnswer```, no content from the session's associated Memori object is used.
2789
+ * @param {string} sessionId The session ID
2790
+ * @param {string} text Text of the sentence.
2791
+ */
2792
+ suggestQuestions: function () {
2793
+ var _suggestQuestions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(sessionId, text) {
2794
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2795
+ while (1) {
2796
+ switch (_context7.prev = _context7.next) {
2797
+ case 0:
2798
+ return _context7.abrupt("return", apiFetcher("/SuggestQuestions/" + sessionId, {
2799
+ method: 'POST',
2800
+ apiUrl: apiUrl,
2801
+ body: {
2802
+ text: text
2803
+ }
2804
+ }));
2805
+
2806
+ case 1:
2807
+ case "end":
2808
+ return _context7.stop();
2809
+ }
2810
+ }
2811
+ }, _callee7);
2812
+ }));
2813
+
2814
+ function suggestQuestions(_x16, _x17) {
2815
+ return _suggestQuestions.apply(this, arguments);
2816
+ }
2817
+
2818
+ return suggestQuestions;
2750
2819
  }()
2751
2820
  };
2752
2821
  });