@pairsystems/goodmem-client 1.0.0-beta.1 → 1.0.0-dev.cb052d6

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.
Files changed (61) hide show
  1. package/README.md +100 -82
  2. package/dist/ApiClient.js +33 -52
  3. package/dist/api/APIKeysApi.js +72 -51
  4. package/dist/api/EmbeddersApi.js +93 -63
  5. package/dist/api/MemoriesApi.js +263 -80
  6. package/dist/api/RerankersApi.js +262 -0
  7. package/dist/api/SpacesApi.js +100 -66
  8. package/dist/api/SystemApi.js +24 -18
  9. package/dist/api/UsersApi.js +100 -26
  10. package/dist/client.js +26 -1
  11. package/dist/index.js +181 -0
  12. package/dist/model/AbstractReply.js +138 -0
  13. package/dist/model/ApiKeyResponse.js +5 -5
  14. package/dist/model/BatchMemoryCreationRequest.js +5 -5
  15. package/dist/model/BatchMemoryDeletionRequest.js +5 -5
  16. package/dist/model/BatchMemoryRetrievalRequest.js +5 -5
  17. package/dist/model/BinaryContent.js +129 -0
  18. package/dist/model/ChunkReference.js +152 -0
  19. package/dist/model/ChunkingConfiguration.js +115 -0
  20. package/dist/model/ContextItem.js +136 -0
  21. package/dist/model/CreateApiKeyRequest.js +5 -5
  22. package/dist/model/CreateApiKeyResponse.js +5 -5
  23. package/dist/model/DistributionType.js +58 -0
  24. package/dist/model/EmbedderCreationRequest.js +20 -9
  25. package/dist/model/EmbedderResponse.js +20 -9
  26. package/dist/model/EmbedderWeight.js +125 -0
  27. package/dist/model/GoodMemStatus.js +129 -0
  28. package/dist/model/LengthMeasurement.js +63 -0
  29. package/dist/model/ListApiKeysResponse.js +5 -5
  30. package/dist/model/ListEmbeddersResponse.js +5 -5
  31. package/dist/model/ListRerankersResponse.js +132 -0
  32. package/dist/model/ListSpacesResponse.js +5 -5
  33. package/dist/model/Memory.js +23 -15
  34. package/dist/model/MemoryChunkResponse.js +240 -0
  35. package/dist/model/MemoryCreationRequest.js +21 -9
  36. package/dist/model/MemoryListResponse.js +5 -5
  37. package/dist/model/Modality.js +4 -4
  38. package/dist/model/PostProcessor.js +125 -0
  39. package/dist/model/ProviderType.js +9 -4
  40. package/dist/model/RecursiveChunkingConfiguration.js +165 -0
  41. package/dist/model/RerankerCreationRequest.js +266 -0
  42. package/dist/model/RerankerResponse.js +316 -0
  43. package/dist/model/ResultSetBoundary.js +153 -0
  44. package/dist/model/RetrieveMemoryEvent.js +148 -0
  45. package/dist/model/RetrieveMemoryRequest.js +219 -0
  46. package/dist/model/RetrievedItem.js +106 -0
  47. package/dist/model/SentenceChunkingConfiguration.js +141 -0
  48. package/dist/model/SeparatorKeepStrategy.js +63 -0
  49. package/dist/model/Space.js +19 -5
  50. package/dist/model/SpaceCreationRequest.js +19 -5
  51. package/dist/model/SpaceEmbedder.js +5 -5
  52. package/dist/model/SpaceEmbedderConfig.js +5 -5
  53. package/dist/model/SpaceKey.js +145 -0
  54. package/dist/model/SystemInitResponse.js +5 -5
  55. package/dist/model/UpdateApiKeyRequest.js +5 -5
  56. package/dist/model/UpdateEmbedderRequest.js +5 -5
  57. package/dist/model/UpdateRerankerRequest.js +226 -0
  58. package/dist/model/UpdateSpaceRequest.js +22 -44
  59. package/dist/model/UserResponse.js +5 -5
  60. package/dist/streaming.js +649 -0
  61. package/package.json +4 -36
@@ -15,11 +15,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
15
15
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
- * GoodMem API
19
- * API for interacting with the GoodMem service, providing vector-based memory storage and retrieval with multiple embedder support. The service enables creation of memory spaces, storing memories with vector representations, and efficient similarity-based retrieval.
18
+ *
19
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
20
20
  *
21
- * The version of the OpenAPI document: v1
22
- * Contact: support@goodmem.io
21
+ * The version of the OpenAPI document:
22
+ *
23
23
  *
24
24
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
25
  * https://openapi-generator.tech
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SpaceEmbedder model module.
31
31
  * @module model/SpaceEmbedder
32
- * @version v1
32
+ * @version 1.0.0
33
33
  */
34
34
  var SpaceEmbedder = /*#__PURE__*/function () {
35
35
  /**
@@ -15,11 +15,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
15
15
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
- * GoodMem API
19
- * API for interacting with the GoodMem service, providing vector-based memory storage and retrieval with multiple embedder support. The service enables creation of memory spaces, storing memories with vector representations, and efficient similarity-based retrieval.
18
+ *
19
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
20
20
  *
21
- * The version of the OpenAPI document: v1
22
- * Contact: support@goodmem.io
21
+ * The version of the OpenAPI document:
22
+ *
23
23
  *
24
24
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
25
  * https://openapi-generator.tech
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SpaceEmbedderConfig model module.
31
31
  * @module model/SpaceEmbedderConfig
32
- * @version v1
32
+ * @version 1.0.0
33
33
  */
34
34
  var SpaceEmbedderConfig = /*#__PURE__*/function () {
35
35
  /**
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _EmbedderWeight = _interopRequireDefault(require("./EmbedderWeight"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
13
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
+ *
20
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21
+ *
22
+ * The version of the OpenAPI document:
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The SpaceKey model module.
32
+ * @module model/SpaceKey
33
+ * @version 1.0.0
34
+ */
35
+ var SpaceKey = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>SpaceKey</code>.
38
+ * Space configuration for retrieval operations with optional embedder weight overrides.
39
+ * @alias module:model/SpaceKey
40
+ * @param spaceId {String} The unique identifier for the space to search.
41
+ */
42
+ function SpaceKey(spaceId) {
43
+ _classCallCheck(this, SpaceKey);
44
+ SpaceKey.initialize(this, spaceId);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(SpaceKey, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, spaceId) {
55
+ obj['spaceId'] = spaceId;
56
+ }
57
+
58
+ /**
59
+ * Constructs a <code>SpaceKey</code> from a plain JavaScript object, optionally creating a new instance.
60
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
61
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
62
+ * @param {module:model/SpaceKey} obj Optional instance to populate.
63
+ * @return {module:model/SpaceKey} The populated <code>SpaceKey</code> instance.
64
+ */
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new SpaceKey();
70
+ if (data.hasOwnProperty('spaceId')) {
71
+ obj['spaceId'] = _ApiClient["default"].convertToType(data['spaceId'], 'String');
72
+ }
73
+ if (data.hasOwnProperty('embedderWeights')) {
74
+ obj['embedderWeights'] = _ApiClient["default"].convertToType(data['embedderWeights'], [_EmbedderWeight["default"]]);
75
+ }
76
+ }
77
+ return obj;
78
+ }
79
+
80
+ /**
81
+ * Validates the JSON data with respect to <code>SpaceKey</code>.
82
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
83
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SpaceKey</code>.
84
+ */
85
+ }, {
86
+ key: "validateJSON",
87
+ value: function validateJSON(data) {
88
+ // check to make sure all required properties are present in the JSON string
89
+ var _iterator = _createForOfIteratorHelper(SpaceKey.RequiredProperties),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var property = _step.value;
94
+ if (!data.hasOwnProperty(property)) {
95
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
96
+ }
97
+ }
98
+ // ensure the json data is a string
99
+ } catch (err) {
100
+ _iterator.e(err);
101
+ } finally {
102
+ _iterator.f();
103
+ }
104
+ if (data['spaceId'] && !(typeof data['spaceId'] === 'string' || data['spaceId'] instanceof String)) {
105
+ throw new Error("Expected the field `spaceId` to be a primitive type in the JSON string but got " + data['spaceId']);
106
+ }
107
+ if (data['embedderWeights']) {
108
+ // data not null
109
+ // ensure the json data is an array
110
+ if (!Array.isArray(data['embedderWeights'])) {
111
+ throw new Error("Expected the field `embedderWeights` to be an array in the JSON data but got " + data['embedderWeights']);
112
+ }
113
+ // validate the optional field `embedderWeights` (array)
114
+ var _iterator2 = _createForOfIteratorHelper(data['embedderWeights']),
115
+ _step2;
116
+ try {
117
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
118
+ var item = _step2.value;
119
+ _EmbedderWeight["default"].validateJSON(item);
120
+ }
121
+ } catch (err) {
122
+ _iterator2.e(err);
123
+ } finally {
124
+ _iterator2.f();
125
+ }
126
+ ;
127
+ }
128
+ return true;
129
+ }
130
+ }]);
131
+ }();
132
+ SpaceKey.RequiredProperties = ["spaceId"];
133
+
134
+ /**
135
+ * The unique identifier for the space to search.
136
+ * @member {String} spaceId
137
+ */
138
+ SpaceKey.prototype['spaceId'] = undefined;
139
+
140
+ /**
141
+ * Optional per-embedder weight overrides for this space. If not specified, database defaults are used.
142
+ * @member {Array.<module:model/EmbedderWeight>} embedderWeights
143
+ */
144
+ SpaceKey.prototype['embedderWeights'] = undefined;
145
+ var _default = exports["default"] = SpaceKey;
@@ -15,11 +15,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
15
15
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
- * GoodMem API
19
- * API for interacting with the GoodMem service, providing vector-based memory storage and retrieval with multiple embedder support. The service enables creation of memory spaces, storing memories with vector representations, and efficient similarity-based retrieval.
18
+ *
19
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
20
20
  *
21
- * The version of the OpenAPI document: v1
22
- * Contact: support@goodmem.io
21
+ * The version of the OpenAPI document:
22
+ *
23
23
  *
24
24
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
25
  * https://openapi-generator.tech
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SystemInitResponse model module.
31
31
  * @module model/SystemInitResponse
32
- * @version v1
32
+ * @version 1.0.0
33
33
  */
34
34
  var SystemInitResponse = /*#__PURE__*/function () {
35
35
  /**
@@ -12,11 +12,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
12
12
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
- * GoodMem API
16
- * API for interacting with the GoodMem service, providing vector-based memory storage and retrieval with multiple embedder support. The service enables creation of memory spaces, storing memories with vector representations, and efficient similarity-based retrieval.
15
+ *
16
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
17
17
  *
18
- * The version of the OpenAPI document: v1
19
- * Contact: support@goodmem.io
18
+ * The version of the OpenAPI document:
19
+ *
20
20
  *
21
21
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
22
  * https://openapi-generator.tech
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The UpdateApiKeyRequest model module.
28
28
  * @module model/UpdateApiKeyRequest
29
- * @version v1
29
+ * @version 1.0.0
30
30
  */
31
31
  var UpdateApiKeyRequest = /*#__PURE__*/function () {
32
32
  /**
@@ -13,11 +13,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
13
13
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
14
14
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
15
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
- * GoodMem API
17
- * API for interacting with the GoodMem service, providing vector-based memory storage and retrieval with multiple embedder support. The service enables creation of memory spaces, storing memories with vector representations, and efficient similarity-based retrieval.
16
+ *
17
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
18
18
  *
19
- * The version of the OpenAPI document: v1
20
- * Contact: support@goodmem.io
19
+ * The version of the OpenAPI document:
20
+ *
21
21
  *
22
22
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
23
  * https://openapi-generator.tech
@@ -27,7 +27,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
27
27
  /**
28
28
  * The UpdateEmbedderRequest model module.
29
29
  * @module model/UpdateEmbedderRequest
30
- * @version v1
30
+ * @version 1.0.0
31
31
  */
32
32
  var UpdateEmbedderRequest = /*#__PURE__*/function () {
33
33
  /**
@@ -0,0 +1,226 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _Modality = _interopRequireDefault(require("./Modality"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
+ *
17
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
18
+ *
19
+ * The version of the OpenAPI document:
20
+ *
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The UpdateRerankerRequest model module.
29
+ * @module model/UpdateRerankerRequest
30
+ * @version 1.0.0
31
+ */
32
+ var UpdateRerankerRequest = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>UpdateRerankerRequest</code>.
35
+ * Request body for updating an existing Reranker. Only fields that should be updated need to be included.
36
+ * @alias module:model/UpdateRerankerRequest
37
+ */
38
+ function UpdateRerankerRequest() {
39
+ _classCallCheck(this, UpdateRerankerRequest);
40
+ UpdateRerankerRequest.initialize(this);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(UpdateRerankerRequest, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>UpdateRerankerRequest</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/UpdateRerankerRequest} obj Optional instance to populate.
57
+ * @return {module:model/UpdateRerankerRequest} The populated <code>UpdateRerankerRequest</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new UpdateRerankerRequest();
64
+ if (data.hasOwnProperty('validateLabelStrategy')) {
65
+ obj['validateLabelStrategy'] = _ApiClient["default"].convertToType(data['validateLabelStrategy'], Object);
66
+ }
67
+ if (data.hasOwnProperty('displayName')) {
68
+ obj['displayName'] = _ApiClient["default"].convertToType(data['displayName'], 'String');
69
+ }
70
+ if (data.hasOwnProperty('description')) {
71
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
72
+ }
73
+ if (data.hasOwnProperty('endpointUrl')) {
74
+ obj['endpointUrl'] = _ApiClient["default"].convertToType(data['endpointUrl'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('apiPath')) {
77
+ obj['apiPath'] = _ApiClient["default"].convertToType(data['apiPath'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('modelIdentifier')) {
80
+ obj['modelIdentifier'] = _ApiClient["default"].convertToType(data['modelIdentifier'], 'String');
81
+ }
82
+ if (data.hasOwnProperty('supportedModalities')) {
83
+ obj['supportedModalities'] = _ApiClient["default"].convertToType(data['supportedModalities'], [_Modality["default"]]);
84
+ }
85
+ if (data.hasOwnProperty('credentials')) {
86
+ obj['credentials'] = _ApiClient["default"].convertToType(data['credentials'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('replaceLabels')) {
89
+ obj['replaceLabels'] = _ApiClient["default"].convertToType(data['replaceLabels'], {
90
+ 'String': 'String'
91
+ });
92
+ }
93
+ if (data.hasOwnProperty('mergeLabels')) {
94
+ obj['mergeLabels'] = _ApiClient["default"].convertToType(data['mergeLabels'], {
95
+ 'String': 'String'
96
+ });
97
+ }
98
+ if (data.hasOwnProperty('version')) {
99
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
100
+ }
101
+ if (data.hasOwnProperty('monitoringEndpoint')) {
102
+ obj['monitoringEndpoint'] = _ApiClient["default"].convertToType(data['monitoringEndpoint'], 'String');
103
+ }
104
+ }
105
+ return obj;
106
+ }
107
+
108
+ /**
109
+ * Validates the JSON data with respect to <code>UpdateRerankerRequest</code>.
110
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
111
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UpdateRerankerRequest</code>.
112
+ */
113
+ }, {
114
+ key: "validateJSON",
115
+ value: function validateJSON(data) {
116
+ // ensure the json data is a string
117
+ if (data['displayName'] && !(typeof data['displayName'] === 'string' || data['displayName'] instanceof String)) {
118
+ throw new Error("Expected the field `displayName` to be a primitive type in the JSON string but got " + data['displayName']);
119
+ }
120
+ // ensure the json data is a string
121
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
122
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
123
+ }
124
+ // ensure the json data is a string
125
+ if (data['endpointUrl'] && !(typeof data['endpointUrl'] === 'string' || data['endpointUrl'] instanceof String)) {
126
+ throw new Error("Expected the field `endpointUrl` to be a primitive type in the JSON string but got " + data['endpointUrl']);
127
+ }
128
+ // ensure the json data is a string
129
+ if (data['apiPath'] && !(typeof data['apiPath'] === 'string' || data['apiPath'] instanceof String)) {
130
+ throw new Error("Expected the field `apiPath` to be a primitive type in the JSON string but got " + data['apiPath']);
131
+ }
132
+ // ensure the json data is a string
133
+ if (data['modelIdentifier'] && !(typeof data['modelIdentifier'] === 'string' || data['modelIdentifier'] instanceof String)) {
134
+ throw new Error("Expected the field `modelIdentifier` to be a primitive type in the JSON string but got " + data['modelIdentifier']);
135
+ }
136
+ // ensure the json data is an array
137
+ if (!Array.isArray(data['supportedModalities'])) {
138
+ throw new Error("Expected the field `supportedModalities` to be an array in the JSON data but got " + data['supportedModalities']);
139
+ }
140
+ // ensure the json data is a string
141
+ if (data['credentials'] && !(typeof data['credentials'] === 'string' || data['credentials'] instanceof String)) {
142
+ throw new Error("Expected the field `credentials` to be a primitive type in the JSON string but got " + data['credentials']);
143
+ }
144
+ // ensure the json data is a string
145
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
146
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
147
+ }
148
+ // ensure the json data is a string
149
+ if (data['monitoringEndpoint'] && !(typeof data['monitoringEndpoint'] === 'string' || data['monitoringEndpoint'] instanceof String)) {
150
+ throw new Error("Expected the field `monitoringEndpoint` to be a primitive type in the JSON string but got " + data['monitoringEndpoint']);
151
+ }
152
+ return true;
153
+ }
154
+ }]);
155
+ }();
156
+ /**
157
+ * @member {Object} validateLabelStrategy
158
+ */
159
+ UpdateRerankerRequest.prototype['validateLabelStrategy'] = undefined;
160
+
161
+ /**
162
+ * User-facing name of the reranker
163
+ * @member {String} displayName
164
+ */
165
+ UpdateRerankerRequest.prototype['displayName'] = undefined;
166
+
167
+ /**
168
+ * Description of the reranker
169
+ * @member {String} description
170
+ */
171
+ UpdateRerankerRequest.prototype['description'] = undefined;
172
+
173
+ /**
174
+ * API endpoint URL
175
+ * @member {String} endpointUrl
176
+ */
177
+ UpdateRerankerRequest.prototype['endpointUrl'] = undefined;
178
+
179
+ /**
180
+ * API path for reranking request
181
+ * @member {String} apiPath
182
+ */
183
+ UpdateRerankerRequest.prototype['apiPath'] = undefined;
184
+
185
+ /**
186
+ * Model identifier
187
+ * @member {String} modelIdentifier
188
+ */
189
+ UpdateRerankerRequest.prototype['modelIdentifier'] = undefined;
190
+
191
+ /**
192
+ * Supported content modalities
193
+ * @member {Array.<module:model/Modality>} supportedModalities
194
+ */
195
+ UpdateRerankerRequest.prototype['supportedModalities'] = undefined;
196
+
197
+ /**
198
+ * API credentials
199
+ * @member {String} credentials
200
+ */
201
+ UpdateRerankerRequest.prototype['credentials'] = undefined;
202
+
203
+ /**
204
+ * Replace all existing labels with these (mutually exclusive with mergeLabels)
205
+ * @member {Object.<String, String>} replaceLabels
206
+ */
207
+ UpdateRerankerRequest.prototype['replaceLabels'] = undefined;
208
+
209
+ /**
210
+ * Merge these labels with existing ones (mutually exclusive with replaceLabels)
211
+ * @member {Object.<String, String>} mergeLabels
212
+ */
213
+ UpdateRerankerRequest.prototype['mergeLabels'] = undefined;
214
+
215
+ /**
216
+ * Version information
217
+ * @member {String} version
218
+ */
219
+ UpdateRerankerRequest.prototype['version'] = undefined;
220
+
221
+ /**
222
+ * Monitoring endpoint URL
223
+ * @member {String} monitoringEndpoint
224
+ */
225
+ UpdateRerankerRequest.prototype['monitoringEndpoint'] = undefined;
226
+ var _default = exports["default"] = UpdateRerankerRequest;
@@ -5,21 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _ChunkingConfiguration = _interopRequireDefault(require("./ChunkingConfiguration"));
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
10
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
11
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
12
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
13
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
14
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
15
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
- * GoodMem API
19
- * API for interacting with the GoodMem service, providing vector-based memory storage and retrieval with multiple embedder support. The service enables creation of memory spaces, storing memories with vector representations, and efficient similarity-based retrieval.
16
+ *
17
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
20
18
  *
21
- * The version of the OpenAPI document: v1
22
- * Contact: support@goodmem.io
19
+ * The version of the OpenAPI document:
20
+ *
23
21
  *
24
22
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
23
  * https://openapi-generator.tech
@@ -29,18 +27,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
27
  /**
30
28
  * The UpdateSpaceRequest model module.
31
29
  * @module model/UpdateSpaceRequest
32
- * @version v1
30
+ * @version 1.0.0
33
31
  */
34
32
  var UpdateSpaceRequest = /*#__PURE__*/function () {
35
33
  /**
36
34
  * Constructs a new <code>UpdateSpaceRequest</code>.
37
35
  * Request parameters for updating a space.
38
36
  * @alias module:model/UpdateSpaceRequest
39
- * @param spaceId {String} The unique identifier of the space to update.
40
37
  */
41
- function UpdateSpaceRequest(spaceId) {
38
+ function UpdateSpaceRequest() {
42
39
  _classCallCheck(this, UpdateSpaceRequest);
43
- UpdateSpaceRequest.initialize(this, spaceId);
40
+ UpdateSpaceRequest.initialize(this);
44
41
  }
45
42
 
46
43
  /**
@@ -50,9 +47,7 @@ var UpdateSpaceRequest = /*#__PURE__*/function () {
50
47
  */
51
48
  return _createClass(UpdateSpaceRequest, null, [{
52
49
  key: "initialize",
53
- value: function initialize(obj, spaceId) {
54
- obj['spaceId'] = spaceId;
55
- }
50
+ value: function initialize(obj) {}
56
51
 
57
52
  /**
58
53
  * Constructs a <code>UpdateSpaceRequest</code> from a plain JavaScript object, optionally creating a new instance.
@@ -69,9 +64,6 @@ var UpdateSpaceRequest = /*#__PURE__*/function () {
69
64
  if (data.hasOwnProperty('validateLabelStrategy')) {
70
65
  obj['validateLabelStrategy'] = _ApiClient["default"].convertToType(data['validateLabelStrategy'], Object);
71
66
  }
72
- if (data.hasOwnProperty('spaceId')) {
73
- obj['spaceId'] = _ApiClient["default"].convertToType(data['spaceId'], 'String');
74
- }
75
67
  if (data.hasOwnProperty('name')) {
76
68
  obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
77
69
  }
@@ -88,6 +80,9 @@ var UpdateSpaceRequest = /*#__PURE__*/function () {
88
80
  'String': 'String'
89
81
  });
90
82
  }
83
+ if (data.hasOwnProperty('defaultChunkingConfig')) {
84
+ obj['defaultChunkingConfig'] = _ChunkingConfiguration["default"].constructFromObject(data['defaultChunkingConfig']);
85
+ }
91
86
  }
92
87
  return obj;
93
88
  }
@@ -100,46 +95,24 @@ var UpdateSpaceRequest = /*#__PURE__*/function () {
100
95
  }, {
101
96
  key: "validateJSON",
102
97
  value: function validateJSON(data) {
103
- // check to make sure all required properties are present in the JSON string
104
- var _iterator = _createForOfIteratorHelper(UpdateSpaceRequest.RequiredProperties),
105
- _step;
106
- try {
107
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
108
- var property = _step.value;
109
- if (!data.hasOwnProperty(property)) {
110
- throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
111
- }
112
- }
113
- // ensure the json data is a string
114
- } catch (err) {
115
- _iterator.e(err);
116
- } finally {
117
- _iterator.f();
118
- }
119
- if (data['spaceId'] && !(typeof data['spaceId'] === 'string' || data['spaceId'] instanceof String)) {
120
- throw new Error("Expected the field `spaceId` to be a primitive type in the JSON string but got " + data['spaceId']);
121
- }
122
98
  // ensure the json data is a string
123
99
  if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
124
100
  throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
125
101
  }
102
+ // validate the optional field `defaultChunkingConfig`
103
+ if (data['defaultChunkingConfig']) {
104
+ // data not null
105
+ _ChunkingConfiguration["default"].validateJSON(data['defaultChunkingConfig']);
106
+ }
126
107
  return true;
127
108
  }
128
109
  }]);
129
110
  }();
130
- UpdateSpaceRequest.RequiredProperties = ["spaceId"];
131
-
132
111
  /**
133
112
  * @member {Object} validateLabelStrategy
134
113
  */
135
114
  UpdateSpaceRequest.prototype['validateLabelStrategy'] = undefined;
136
115
 
137
- /**
138
- * The unique identifier of the space to update.
139
- * @member {String} spaceId
140
- */
141
- UpdateSpaceRequest.prototype['spaceId'] = undefined;
142
-
143
116
  /**
144
117
  * The new name for the space.
145
118
  * @member {String} name
@@ -163,4 +136,9 @@ UpdateSpaceRequest.prototype['replaceLabels'] = undefined;
163
136
  * @member {Object.<String, String>} mergeLabels
164
137
  */
165
138
  UpdateSpaceRequest.prototype['mergeLabels'] = undefined;
139
+
140
+ /**
141
+ * @member {module:model/ChunkingConfiguration} defaultChunkingConfig
142
+ */
143
+ UpdateSpaceRequest.prototype['defaultChunkingConfig'] = undefined;
166
144
  var _default = exports["default"] = UpdateSpaceRequest;