@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.
- package/README.md +100 -82
- package/dist/ApiClient.js +33 -52
- package/dist/api/APIKeysApi.js +72 -51
- package/dist/api/EmbeddersApi.js +93 -63
- package/dist/api/MemoriesApi.js +263 -80
- package/dist/api/RerankersApi.js +262 -0
- package/dist/api/SpacesApi.js +100 -66
- package/dist/api/SystemApi.js +24 -18
- package/dist/api/UsersApi.js +100 -26
- package/dist/client.js +26 -1
- package/dist/index.js +181 -0
- package/dist/model/AbstractReply.js +138 -0
- package/dist/model/ApiKeyResponse.js +5 -5
- package/dist/model/BatchMemoryCreationRequest.js +5 -5
- package/dist/model/BatchMemoryDeletionRequest.js +5 -5
- package/dist/model/BatchMemoryRetrievalRequest.js +5 -5
- package/dist/model/BinaryContent.js +129 -0
- package/dist/model/ChunkReference.js +152 -0
- package/dist/model/ChunkingConfiguration.js +115 -0
- package/dist/model/ContextItem.js +136 -0
- package/dist/model/CreateApiKeyRequest.js +5 -5
- package/dist/model/CreateApiKeyResponse.js +5 -5
- package/dist/model/DistributionType.js +58 -0
- package/dist/model/EmbedderCreationRequest.js +20 -9
- package/dist/model/EmbedderResponse.js +20 -9
- package/dist/model/EmbedderWeight.js +125 -0
- package/dist/model/GoodMemStatus.js +129 -0
- package/dist/model/LengthMeasurement.js +63 -0
- package/dist/model/ListApiKeysResponse.js +5 -5
- package/dist/model/ListEmbeddersResponse.js +5 -5
- package/dist/model/ListRerankersResponse.js +132 -0
- package/dist/model/ListSpacesResponse.js +5 -5
- package/dist/model/Memory.js +23 -15
- package/dist/model/MemoryChunkResponse.js +240 -0
- package/dist/model/MemoryCreationRequest.js +21 -9
- package/dist/model/MemoryListResponse.js +5 -5
- package/dist/model/Modality.js +4 -4
- package/dist/model/PostProcessor.js +125 -0
- package/dist/model/ProviderType.js +9 -4
- package/dist/model/RecursiveChunkingConfiguration.js +165 -0
- package/dist/model/RerankerCreationRequest.js +266 -0
- package/dist/model/RerankerResponse.js +316 -0
- package/dist/model/ResultSetBoundary.js +153 -0
- package/dist/model/RetrieveMemoryEvent.js +148 -0
- package/dist/model/RetrieveMemoryRequest.js +219 -0
- package/dist/model/RetrievedItem.js +106 -0
- package/dist/model/SentenceChunkingConfiguration.js +141 -0
- package/dist/model/SeparatorKeepStrategy.js +63 -0
- package/dist/model/Space.js +19 -5
- package/dist/model/SpaceCreationRequest.js +19 -5
- package/dist/model/SpaceEmbedder.js +5 -5
- package/dist/model/SpaceEmbedderConfig.js +5 -5
- package/dist/model/SpaceKey.js +145 -0
- package/dist/model/SystemInitResponse.js +5 -5
- package/dist/model/UpdateApiKeyRequest.js +5 -5
- package/dist/model/UpdateEmbedderRequest.js +5 -5
- package/dist/model/UpdateRerankerRequest.js +226 -0
- package/dist/model/UpdateSpaceRequest.js +22 -44
- package/dist/model/UserResponse.js +5 -5
- package/dist/streaming.js +649 -0
- package/package.json +4 -36
|
@@ -16,11 +16,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
16
16
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
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
|
-
*
|
|
19
|
+
*
|
|
20
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
21
21
|
*
|
|
22
|
-
* The version of the OpenAPI document:
|
|
23
|
-
*
|
|
22
|
+
* The version of the OpenAPI document:
|
|
23
|
+
*
|
|
24
24
|
*
|
|
25
25
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
26
|
* https://openapi-generator.tech
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The ListEmbeddersResponse model module.
|
|
32
32
|
* @module model/ListEmbeddersResponse
|
|
33
|
-
* @version
|
|
33
|
+
* @version 1.0.0
|
|
34
34
|
*/
|
|
35
35
|
var ListEmbeddersResponse = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -0,0 +1,132 @@
|
|
|
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 _RerankerResponse = _interopRequireDefault(require("./RerankerResponse"));
|
|
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 ListRerankersResponse model module.
|
|
32
|
+
* @module model/ListRerankersResponse
|
|
33
|
+
* @version 1.0.0
|
|
34
|
+
*/
|
|
35
|
+
var ListRerankersResponse = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>ListRerankersResponse</code>.
|
|
38
|
+
* Response containing a list of rerankers
|
|
39
|
+
* @alias module:model/ListRerankersResponse
|
|
40
|
+
* @param rerankers {Array.<module:model/RerankerResponse>} List of reranker configurations
|
|
41
|
+
*/
|
|
42
|
+
function ListRerankersResponse(rerankers) {
|
|
43
|
+
_classCallCheck(this, ListRerankersResponse);
|
|
44
|
+
ListRerankersResponse.initialize(this, rerankers);
|
|
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(ListRerankersResponse, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, rerankers) {
|
|
55
|
+
obj['rerankers'] = rerankers;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a <code>ListRerankersResponse</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/ListRerankersResponse} obj Optional instance to populate.
|
|
63
|
+
* @return {module:model/ListRerankersResponse} The populated <code>ListRerankersResponse</code> instance.
|
|
64
|
+
*/
|
|
65
|
+
}, {
|
|
66
|
+
key: "constructFromObject",
|
|
67
|
+
value: function constructFromObject(data, obj) {
|
|
68
|
+
if (data) {
|
|
69
|
+
obj = obj || new ListRerankersResponse();
|
|
70
|
+
if (data.hasOwnProperty('rerankers')) {
|
|
71
|
+
obj['rerankers'] = _ApiClient["default"].convertToType(data['rerankers'], [_RerankerResponse["default"]]);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>ListRerankersResponse</code>.
|
|
79
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
80
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListRerankersResponse</code>.
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "validateJSON",
|
|
84
|
+
value: function validateJSON(data) {
|
|
85
|
+
// check to make sure all required properties are present in the JSON string
|
|
86
|
+
var _iterator = _createForOfIteratorHelper(ListRerankersResponse.RequiredProperties),
|
|
87
|
+
_step;
|
|
88
|
+
try {
|
|
89
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
90
|
+
var property = _step.value;
|
|
91
|
+
if (!data.hasOwnProperty(property)) {
|
|
92
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
} catch (err) {
|
|
96
|
+
_iterator.e(err);
|
|
97
|
+
} finally {
|
|
98
|
+
_iterator.f();
|
|
99
|
+
}
|
|
100
|
+
if (data['rerankers']) {
|
|
101
|
+
// data not null
|
|
102
|
+
// ensure the json data is an array
|
|
103
|
+
if (!Array.isArray(data['rerankers'])) {
|
|
104
|
+
throw new Error("Expected the field `rerankers` to be an array in the JSON data but got " + data['rerankers']);
|
|
105
|
+
}
|
|
106
|
+
// validate the optional field `rerankers` (array)
|
|
107
|
+
var _iterator2 = _createForOfIteratorHelper(data['rerankers']),
|
|
108
|
+
_step2;
|
|
109
|
+
try {
|
|
110
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
111
|
+
var item = _step2.value;
|
|
112
|
+
_RerankerResponse["default"].validateJSON(item);
|
|
113
|
+
}
|
|
114
|
+
} catch (err) {
|
|
115
|
+
_iterator2.e(err);
|
|
116
|
+
} finally {
|
|
117
|
+
_iterator2.f();
|
|
118
|
+
}
|
|
119
|
+
;
|
|
120
|
+
}
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
}]);
|
|
124
|
+
}();
|
|
125
|
+
ListRerankersResponse.RequiredProperties = ["rerankers"];
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* List of reranker configurations
|
|
129
|
+
* @member {Array.<module:model/RerankerResponse>} rerankers
|
|
130
|
+
*/
|
|
131
|
+
ListRerankersResponse.prototype['rerankers'] = undefined;
|
|
132
|
+
var _default = exports["default"] = ListRerankersResponse;
|
|
@@ -16,11 +16,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
16
16
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
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
|
-
*
|
|
19
|
+
*
|
|
20
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
21
21
|
*
|
|
22
|
-
* The version of the OpenAPI document:
|
|
23
|
-
*
|
|
22
|
+
* The version of the OpenAPI document:
|
|
23
|
+
*
|
|
24
24
|
*
|
|
25
25
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
26
|
* https://openapi-generator.tech
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The ListSpacesResponse model module.
|
|
32
32
|
* @module model/ListSpacesResponse
|
|
33
|
-
* @version
|
|
33
|
+
* @version 1.0.0
|
|
34
34
|
*/
|
|
35
35
|
var ListSpacesResponse = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
package/dist/model/Memory.js
CHANGED
|
@@ -5,6 +5,7 @@ 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
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; } } }; }
|
|
@@ -15,11 +16,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
15
16
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
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); } /**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
20
21
|
*
|
|
21
|
-
* The version of the OpenAPI document:
|
|
22
|
-
*
|
|
22
|
+
* The version of the OpenAPI document:
|
|
23
|
+
*
|
|
23
24
|
*
|
|
24
25
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
26
|
* https://openapi-generator.tech
|
|
@@ -29,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
30
|
/**
|
|
30
31
|
* The Memory model module.
|
|
31
32
|
* @module model/Memory
|
|
32
|
-
* @version
|
|
33
|
+
* @version 1.0.0
|
|
33
34
|
*/
|
|
34
35
|
var Memory = /*#__PURE__*/function () {
|
|
35
36
|
/**
|
|
@@ -87,7 +88,7 @@ var Memory = /*#__PURE__*/function () {
|
|
|
87
88
|
obj['spaceId'] = _ApiClient["default"].convertToType(data['spaceId'], 'String');
|
|
88
89
|
}
|
|
89
90
|
if (data.hasOwnProperty('originalContent')) {
|
|
90
|
-
obj['originalContent'] = _ApiClient["default"].convertToType(data['originalContent'],
|
|
91
|
+
obj['originalContent'] = _ApiClient["default"].convertToType(data['originalContent'], File);
|
|
91
92
|
}
|
|
92
93
|
if (data.hasOwnProperty('originalContentRef')) {
|
|
93
94
|
obj['originalContentRef'] = _ApiClient["default"].convertToType(data['originalContentRef'], 'String');
|
|
@@ -99,9 +100,7 @@ var Memory = /*#__PURE__*/function () {
|
|
|
99
100
|
obj['processingStatus'] = _ApiClient["default"].convertToType(data['processingStatus'], 'String');
|
|
100
101
|
}
|
|
101
102
|
if (data.hasOwnProperty('metadata')) {
|
|
102
|
-
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'],
|
|
103
|
-
'String': Object
|
|
104
|
-
});
|
|
103
|
+
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
|
|
105
104
|
}
|
|
106
105
|
if (data.hasOwnProperty('createdAt')) {
|
|
107
106
|
obj['createdAt'] = _ApiClient["default"].convertToType(data['createdAt'], 'Number');
|
|
@@ -115,6 +114,9 @@ var Memory = /*#__PURE__*/function () {
|
|
|
115
114
|
if (data.hasOwnProperty('updatedById')) {
|
|
116
115
|
obj['updatedById'] = _ApiClient["default"].convertToType(data['updatedById'], 'String');
|
|
117
116
|
}
|
|
117
|
+
if (data.hasOwnProperty('chunkingConfig')) {
|
|
118
|
+
obj['chunkingConfig'] = _ChunkingConfiguration["default"].constructFromObject(data['chunkingConfig']);
|
|
119
|
+
}
|
|
118
120
|
}
|
|
119
121
|
return obj;
|
|
120
122
|
}
|
|
@@ -151,10 +153,6 @@ var Memory = /*#__PURE__*/function () {
|
|
|
151
153
|
throw new Error("Expected the field `spaceId` to be a primitive type in the JSON string but got " + data['spaceId']);
|
|
152
154
|
}
|
|
153
155
|
// ensure the json data is a string
|
|
154
|
-
if (data['originalContent'] && !(typeof data['originalContent'] === 'string' || data['originalContent'] instanceof String)) {
|
|
155
|
-
throw new Error("Expected the field `originalContent` to be a primitive type in the JSON string but got " + data['originalContent']);
|
|
156
|
-
}
|
|
157
|
-
// ensure the json data is a string
|
|
158
156
|
if (data['originalContentRef'] && !(typeof data['originalContentRef'] === 'string' || data['originalContentRef'] instanceof String)) {
|
|
159
157
|
throw new Error("Expected the field `originalContentRef` to be a primitive type in the JSON string but got " + data['originalContentRef']);
|
|
160
158
|
}
|
|
@@ -174,6 +172,11 @@ var Memory = /*#__PURE__*/function () {
|
|
|
174
172
|
if (data['updatedById'] && !(typeof data['updatedById'] === 'string' || data['updatedById'] instanceof String)) {
|
|
175
173
|
throw new Error("Expected the field `updatedById` to be a primitive type in the JSON string but got " + data['updatedById']);
|
|
176
174
|
}
|
|
175
|
+
// validate the optional field `chunkingConfig`
|
|
176
|
+
if (data['chunkingConfig']) {
|
|
177
|
+
// data not null
|
|
178
|
+
_ChunkingConfiguration["default"].validateJSON(data['chunkingConfig']);
|
|
179
|
+
}
|
|
177
180
|
return true;
|
|
178
181
|
}
|
|
179
182
|
}]);
|
|
@@ -194,7 +197,7 @@ Memory.prototype['spaceId'] = undefined;
|
|
|
194
197
|
|
|
195
198
|
/**
|
|
196
199
|
* Original content (only included if requested)
|
|
197
|
-
* @member {
|
|
200
|
+
* @member {File} originalContent
|
|
198
201
|
*/
|
|
199
202
|
Memory.prototype['originalContent'] = undefined;
|
|
200
203
|
|
|
@@ -218,7 +221,7 @@ Memory.prototype['processingStatus'] = undefined;
|
|
|
218
221
|
|
|
219
222
|
/**
|
|
220
223
|
* Additional metadata for the memory
|
|
221
|
-
* @member {Object
|
|
224
|
+
* @member {Object} metadata
|
|
222
225
|
*/
|
|
223
226
|
Memory.prototype['metadata'] = undefined;
|
|
224
227
|
|
|
@@ -245,4 +248,9 @@ Memory.prototype['createdById'] = undefined;
|
|
|
245
248
|
* @member {String} updatedById
|
|
246
249
|
*/
|
|
247
250
|
Memory.prototype['updatedById'] = undefined;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @member {module:model/ChunkingConfiguration} chunkingConfig
|
|
254
|
+
*/
|
|
255
|
+
Memory.prototype['chunkingConfig'] = undefined;
|
|
248
256
|
var _default = exports["default"] = Memory;
|
|
@@ -0,0 +1,240 @@
|
|
|
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
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
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
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
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
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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
|
+
*
|
|
19
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
20
|
+
*
|
|
21
|
+
* The version of the OpenAPI document:
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The MemoryChunkResponse model module.
|
|
31
|
+
* @module model/MemoryChunkResponse
|
|
32
|
+
* @version 1.0.0
|
|
33
|
+
*/
|
|
34
|
+
var MemoryChunkResponse = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>MemoryChunkResponse</code>.
|
|
37
|
+
* Memory chunk information
|
|
38
|
+
* @alias module:model/MemoryChunkResponse
|
|
39
|
+
* @param chunkId {String} Unique identifier of the memory chunk
|
|
40
|
+
* @param memoryId {String} ID of the memory this chunk belongs to
|
|
41
|
+
* @param chunkSequenceNumber {Number} Sequence number of this chunk within the memory
|
|
42
|
+
* @param chunkText {String} The text content of this chunk
|
|
43
|
+
* @param vectorStatus {String} Status of vector processing for this chunk
|
|
44
|
+
* @param createdAt {Number} Creation timestamp (milliseconds since epoch)
|
|
45
|
+
* @param updatedAt {Number} Last update timestamp (milliseconds since epoch)
|
|
46
|
+
* @param createdById {String} ID of the user who created the chunk
|
|
47
|
+
* @param updatedById {String} ID of the user who last updated the chunk
|
|
48
|
+
*/
|
|
49
|
+
function MemoryChunkResponse(chunkId, memoryId, chunkSequenceNumber, chunkText, vectorStatus, createdAt, updatedAt, createdById, updatedById) {
|
|
50
|
+
_classCallCheck(this, MemoryChunkResponse);
|
|
51
|
+
MemoryChunkResponse.initialize(this, chunkId, memoryId, chunkSequenceNumber, chunkText, vectorStatus, createdAt, updatedAt, createdById, updatedById);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Initializes the fields of this object.
|
|
56
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
57
|
+
* Only for internal use.
|
|
58
|
+
*/
|
|
59
|
+
return _createClass(MemoryChunkResponse, null, [{
|
|
60
|
+
key: "initialize",
|
|
61
|
+
value: function initialize(obj, chunkId, memoryId, chunkSequenceNumber, chunkText, vectorStatus, createdAt, updatedAt, createdById, updatedById) {
|
|
62
|
+
obj['chunkId'] = chunkId;
|
|
63
|
+
obj['memoryId'] = memoryId;
|
|
64
|
+
obj['chunkSequenceNumber'] = chunkSequenceNumber;
|
|
65
|
+
obj['chunkText'] = chunkText;
|
|
66
|
+
obj['vectorStatus'] = vectorStatus;
|
|
67
|
+
obj['createdAt'] = createdAt;
|
|
68
|
+
obj['updatedAt'] = updatedAt;
|
|
69
|
+
obj['createdById'] = createdById;
|
|
70
|
+
obj['updatedById'] = updatedById;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Constructs a <code>MemoryChunkResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
75
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @param {module:model/MemoryChunkResponse} obj Optional instance to populate.
|
|
78
|
+
* @return {module:model/MemoryChunkResponse} The populated <code>MemoryChunkResponse</code> instance.
|
|
79
|
+
*/
|
|
80
|
+
}, {
|
|
81
|
+
key: "constructFromObject",
|
|
82
|
+
value: function constructFromObject(data, obj) {
|
|
83
|
+
if (data) {
|
|
84
|
+
obj = obj || new MemoryChunkResponse();
|
|
85
|
+
if (data.hasOwnProperty('chunkId')) {
|
|
86
|
+
obj['chunkId'] = _ApiClient["default"].convertToType(data['chunkId'], 'String');
|
|
87
|
+
}
|
|
88
|
+
if (data.hasOwnProperty('memoryId')) {
|
|
89
|
+
obj['memoryId'] = _ApiClient["default"].convertToType(data['memoryId'], 'String');
|
|
90
|
+
}
|
|
91
|
+
if (data.hasOwnProperty('chunkSequenceNumber')) {
|
|
92
|
+
obj['chunkSequenceNumber'] = _ApiClient["default"].convertToType(data['chunkSequenceNumber'], 'Number');
|
|
93
|
+
}
|
|
94
|
+
if (data.hasOwnProperty('chunkText')) {
|
|
95
|
+
obj['chunkText'] = _ApiClient["default"].convertToType(data['chunkText'], 'String');
|
|
96
|
+
}
|
|
97
|
+
if (data.hasOwnProperty('vectorStatus')) {
|
|
98
|
+
obj['vectorStatus'] = _ApiClient["default"].convertToType(data['vectorStatus'], 'String');
|
|
99
|
+
}
|
|
100
|
+
if (data.hasOwnProperty('startOffset')) {
|
|
101
|
+
obj['startOffset'] = _ApiClient["default"].convertToType(data['startOffset'], 'Number');
|
|
102
|
+
}
|
|
103
|
+
if (data.hasOwnProperty('endOffset')) {
|
|
104
|
+
obj['endOffset'] = _ApiClient["default"].convertToType(data['endOffset'], 'Number');
|
|
105
|
+
}
|
|
106
|
+
if (data.hasOwnProperty('createdAt')) {
|
|
107
|
+
obj['createdAt'] = _ApiClient["default"].convertToType(data['createdAt'], 'Number');
|
|
108
|
+
}
|
|
109
|
+
if (data.hasOwnProperty('updatedAt')) {
|
|
110
|
+
obj['updatedAt'] = _ApiClient["default"].convertToType(data['updatedAt'], 'Number');
|
|
111
|
+
}
|
|
112
|
+
if (data.hasOwnProperty('createdById')) {
|
|
113
|
+
obj['createdById'] = _ApiClient["default"].convertToType(data['createdById'], 'String');
|
|
114
|
+
}
|
|
115
|
+
if (data.hasOwnProperty('updatedById')) {
|
|
116
|
+
obj['updatedById'] = _ApiClient["default"].convertToType(data['updatedById'], 'String');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return obj;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Validates the JSON data with respect to <code>MemoryChunkResponse</code>.
|
|
124
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
125
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>MemoryChunkResponse</code>.
|
|
126
|
+
*/
|
|
127
|
+
}, {
|
|
128
|
+
key: "validateJSON",
|
|
129
|
+
value: function validateJSON(data) {
|
|
130
|
+
// check to make sure all required properties are present in the JSON string
|
|
131
|
+
var _iterator = _createForOfIteratorHelper(MemoryChunkResponse.RequiredProperties),
|
|
132
|
+
_step;
|
|
133
|
+
try {
|
|
134
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
135
|
+
var property = _step.value;
|
|
136
|
+
if (!data.hasOwnProperty(property)) {
|
|
137
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
// ensure the json data is a string
|
|
141
|
+
} catch (err) {
|
|
142
|
+
_iterator.e(err);
|
|
143
|
+
} finally {
|
|
144
|
+
_iterator.f();
|
|
145
|
+
}
|
|
146
|
+
if (data['chunkId'] && !(typeof data['chunkId'] === 'string' || data['chunkId'] instanceof String)) {
|
|
147
|
+
throw new Error("Expected the field `chunkId` to be a primitive type in the JSON string but got " + data['chunkId']);
|
|
148
|
+
}
|
|
149
|
+
// ensure the json data is a string
|
|
150
|
+
if (data['memoryId'] && !(typeof data['memoryId'] === 'string' || data['memoryId'] instanceof String)) {
|
|
151
|
+
throw new Error("Expected the field `memoryId` to be a primitive type in the JSON string but got " + data['memoryId']);
|
|
152
|
+
}
|
|
153
|
+
// ensure the json data is a string
|
|
154
|
+
if (data['chunkText'] && !(typeof data['chunkText'] === 'string' || data['chunkText'] instanceof String)) {
|
|
155
|
+
throw new Error("Expected the field `chunkText` to be a primitive type in the JSON string but got " + data['chunkText']);
|
|
156
|
+
}
|
|
157
|
+
// ensure the json data is a string
|
|
158
|
+
if (data['vectorStatus'] && !(typeof data['vectorStatus'] === 'string' || data['vectorStatus'] instanceof String)) {
|
|
159
|
+
throw new Error("Expected the field `vectorStatus` to be a primitive type in the JSON string but got " + data['vectorStatus']);
|
|
160
|
+
}
|
|
161
|
+
// ensure the json data is a string
|
|
162
|
+
if (data['createdById'] && !(typeof data['createdById'] === 'string' || data['createdById'] instanceof String)) {
|
|
163
|
+
throw new Error("Expected the field `createdById` to be a primitive type in the JSON string but got " + data['createdById']);
|
|
164
|
+
}
|
|
165
|
+
// ensure the json data is a string
|
|
166
|
+
if (data['updatedById'] && !(typeof data['updatedById'] === 'string' || data['updatedById'] instanceof String)) {
|
|
167
|
+
throw new Error("Expected the field `updatedById` to be a primitive type in the JSON string but got " + data['updatedById']);
|
|
168
|
+
}
|
|
169
|
+
return true;
|
|
170
|
+
}
|
|
171
|
+
}]);
|
|
172
|
+
}();
|
|
173
|
+
MemoryChunkResponse.RequiredProperties = ["chunkId", "memoryId", "chunkSequenceNumber", "chunkText", "vectorStatus", "createdAt", "updatedAt", "createdById", "updatedById"];
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Unique identifier of the memory chunk
|
|
177
|
+
* @member {String} chunkId
|
|
178
|
+
*/
|
|
179
|
+
MemoryChunkResponse.prototype['chunkId'] = undefined;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* ID of the memory this chunk belongs to
|
|
183
|
+
* @member {String} memoryId
|
|
184
|
+
*/
|
|
185
|
+
MemoryChunkResponse.prototype['memoryId'] = undefined;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Sequence number of this chunk within the memory
|
|
189
|
+
* @member {Number} chunkSequenceNumber
|
|
190
|
+
*/
|
|
191
|
+
MemoryChunkResponse.prototype['chunkSequenceNumber'] = undefined;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The text content of this chunk
|
|
195
|
+
* @member {String} chunkText
|
|
196
|
+
*/
|
|
197
|
+
MemoryChunkResponse.prototype['chunkText'] = undefined;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Status of vector processing for this chunk
|
|
201
|
+
* @member {String} vectorStatus
|
|
202
|
+
*/
|
|
203
|
+
MemoryChunkResponse.prototype['vectorStatus'] = undefined;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Start offset of this chunk in the original content
|
|
207
|
+
* @member {Number} startOffset
|
|
208
|
+
*/
|
|
209
|
+
MemoryChunkResponse.prototype['startOffset'] = undefined;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* End offset of this chunk in the original content
|
|
213
|
+
* @member {Number} endOffset
|
|
214
|
+
*/
|
|
215
|
+
MemoryChunkResponse.prototype['endOffset'] = undefined;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Creation timestamp (milliseconds since epoch)
|
|
219
|
+
* @member {Number} createdAt
|
|
220
|
+
*/
|
|
221
|
+
MemoryChunkResponse.prototype['createdAt'] = undefined;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Last update timestamp (milliseconds since epoch)
|
|
225
|
+
* @member {Number} updatedAt
|
|
226
|
+
*/
|
|
227
|
+
MemoryChunkResponse.prototype['updatedAt'] = undefined;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* ID of the user who created the chunk
|
|
231
|
+
* @member {String} createdById
|
|
232
|
+
*/
|
|
233
|
+
MemoryChunkResponse.prototype['createdById'] = undefined;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* ID of the user who last updated the chunk
|
|
237
|
+
* @member {String} updatedById
|
|
238
|
+
*/
|
|
239
|
+
MemoryChunkResponse.prototype['updatedById'] = undefined;
|
|
240
|
+
var _default = exports["default"] = MemoryChunkResponse;
|
|
@@ -5,6 +5,7 @@ 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
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; } } }; }
|
|
@@ -15,11 +16,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
15
16
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
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); } /**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
20
21
|
*
|
|
21
|
-
* The version of the OpenAPI document:
|
|
22
|
-
*
|
|
22
|
+
* The version of the OpenAPI document:
|
|
23
|
+
*
|
|
23
24
|
*
|
|
24
25
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
26
|
* https://openapi-generator.tech
|
|
@@ -29,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
30
|
/**
|
|
30
31
|
* The MemoryCreationRequest model module.
|
|
31
32
|
* @module model/MemoryCreationRequest
|
|
32
|
-
* @version
|
|
33
|
+
* @version 1.0.0
|
|
33
34
|
*/
|
|
34
35
|
var MemoryCreationRequest = /*#__PURE__*/function () {
|
|
35
36
|
/**
|
|
@@ -87,9 +88,10 @@ var MemoryCreationRequest = /*#__PURE__*/function () {
|
|
|
87
88
|
obj['contentType'] = _ApiClient["default"].convertToType(data['contentType'], 'String');
|
|
88
89
|
}
|
|
89
90
|
if (data.hasOwnProperty('metadata')) {
|
|
90
|
-
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'],
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('chunkingConfig')) {
|
|
94
|
+
obj['chunkingConfig'] = _ChunkingConfiguration["default"].constructFromObject(data['chunkingConfig']);
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
return obj;
|
|
@@ -138,6 +140,11 @@ var MemoryCreationRequest = /*#__PURE__*/function () {
|
|
|
138
140
|
if (data['contentType'] && !(typeof data['contentType'] === 'string' || data['contentType'] instanceof String)) {
|
|
139
141
|
throw new Error("Expected the field `contentType` to be a primitive type in the JSON string but got " + data['contentType']);
|
|
140
142
|
}
|
|
143
|
+
// validate the optional field `chunkingConfig`
|
|
144
|
+
if (data['chunkingConfig']) {
|
|
145
|
+
// data not null
|
|
146
|
+
_ChunkingConfiguration["default"].validateJSON(data['chunkingConfig']);
|
|
147
|
+
}
|
|
141
148
|
return true;
|
|
142
149
|
}
|
|
143
150
|
}]);
|
|
@@ -181,7 +188,12 @@ MemoryCreationRequest.prototype['contentType'] = undefined;
|
|
|
181
188
|
|
|
182
189
|
/**
|
|
183
190
|
* Additional metadata for the memory
|
|
184
|
-
* @member {Object
|
|
191
|
+
* @member {Object} metadata
|
|
185
192
|
*/
|
|
186
193
|
MemoryCreationRequest.prototype['metadata'] = undefined;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @member {module:model/ChunkingConfiguration} chunkingConfig
|
|
197
|
+
*/
|
|
198
|
+
MemoryCreationRequest.prototype['chunkingConfig'] = undefined;
|
|
187
199
|
var _default = exports["default"] = MemoryCreationRequest;
|
|
@@ -16,11 +16,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
16
16
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
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
|
-
*
|
|
19
|
+
*
|
|
20
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
21
21
|
*
|
|
22
|
-
* The version of the OpenAPI document:
|
|
23
|
-
*
|
|
22
|
+
* The version of the OpenAPI document:
|
|
23
|
+
*
|
|
24
24
|
*
|
|
25
25
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
26
|
* https://openapi-generator.tech
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The MemoryListResponse model module.
|
|
32
32
|
* @module model/MemoryListResponse
|
|
33
|
-
* @version
|
|
33
|
+
* @version 1.0.0
|
|
34
34
|
*/
|
|
35
35
|
var MemoryListResponse = /*#__PURE__*/function () {
|
|
36
36
|
/**
|