@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
|
@@ -0,0 +1,316 @@
|
|
|
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
|
+
var _ProviderType = _interopRequireDefault(require("./ProviderType"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
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); }
|
|
12
|
+
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; } } }; }
|
|
13
|
+
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; } }
|
|
14
|
+
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; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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); } /**
|
|
20
|
+
*
|
|
21
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
22
|
+
*
|
|
23
|
+
* The version of the OpenAPI document:
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The RerankerResponse model module.
|
|
33
|
+
* @module model/RerankerResponse
|
|
34
|
+
* @version 1.0.0
|
|
35
|
+
*/
|
|
36
|
+
var RerankerResponse = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>RerankerResponse</code>.
|
|
39
|
+
* Reranker configuration information
|
|
40
|
+
* @alias module:model/RerankerResponse
|
|
41
|
+
* @param rerankerId {String} Unique identifier of the reranker
|
|
42
|
+
* @param displayName {String} User-facing name of the reranker
|
|
43
|
+
* @param providerType {module:model/ProviderType}
|
|
44
|
+
* @param endpointUrl {String} API endpoint URL
|
|
45
|
+
* @param apiPath {String} API path for reranking request
|
|
46
|
+
* @param modelIdentifier {String} Model identifier
|
|
47
|
+
* @param ownerId {String} Owner ID of the reranker
|
|
48
|
+
* @param createdAt {Number} Creation timestamp (milliseconds since epoch)
|
|
49
|
+
* @param updatedAt {Number} Last update timestamp (milliseconds since epoch)
|
|
50
|
+
* @param createdById {String} ID of the user who created the reranker
|
|
51
|
+
* @param updatedById {String} ID of the user who last updated the reranker
|
|
52
|
+
*/
|
|
53
|
+
function RerankerResponse(rerankerId, displayName, providerType, endpointUrl, apiPath, modelIdentifier, ownerId, createdAt, updatedAt, createdById, updatedById) {
|
|
54
|
+
_classCallCheck(this, RerankerResponse);
|
|
55
|
+
RerankerResponse.initialize(this, rerankerId, displayName, providerType, endpointUrl, apiPath, modelIdentifier, ownerId, createdAt, updatedAt, createdById, updatedById);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Initializes the fields of this object.
|
|
60
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
61
|
+
* Only for internal use.
|
|
62
|
+
*/
|
|
63
|
+
return _createClass(RerankerResponse, null, [{
|
|
64
|
+
key: "initialize",
|
|
65
|
+
value: function initialize(obj, rerankerId, displayName, providerType, endpointUrl, apiPath, modelIdentifier, ownerId, createdAt, updatedAt, createdById, updatedById) {
|
|
66
|
+
obj['rerankerId'] = rerankerId;
|
|
67
|
+
obj['displayName'] = displayName;
|
|
68
|
+
obj['providerType'] = providerType;
|
|
69
|
+
obj['endpointUrl'] = endpointUrl;
|
|
70
|
+
obj['apiPath'] = apiPath;
|
|
71
|
+
obj['modelIdentifier'] = modelIdentifier;
|
|
72
|
+
obj['ownerId'] = ownerId;
|
|
73
|
+
obj['createdAt'] = createdAt;
|
|
74
|
+
obj['updatedAt'] = updatedAt;
|
|
75
|
+
obj['createdById'] = createdById;
|
|
76
|
+
obj['updatedById'] = updatedById;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Constructs a <code>RerankerResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
81
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
82
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
83
|
+
* @param {module:model/RerankerResponse} obj Optional instance to populate.
|
|
84
|
+
* @return {module:model/RerankerResponse} The populated <code>RerankerResponse</code> instance.
|
|
85
|
+
*/
|
|
86
|
+
}, {
|
|
87
|
+
key: "constructFromObject",
|
|
88
|
+
value: function constructFromObject(data, obj) {
|
|
89
|
+
if (data) {
|
|
90
|
+
obj = obj || new RerankerResponse();
|
|
91
|
+
if (data.hasOwnProperty('rerankerId')) {
|
|
92
|
+
obj['rerankerId'] = _ApiClient["default"].convertToType(data['rerankerId'], 'String');
|
|
93
|
+
}
|
|
94
|
+
if (data.hasOwnProperty('displayName')) {
|
|
95
|
+
obj['displayName'] = _ApiClient["default"].convertToType(data['displayName'], 'String');
|
|
96
|
+
}
|
|
97
|
+
if (data.hasOwnProperty('description')) {
|
|
98
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
99
|
+
}
|
|
100
|
+
if (data.hasOwnProperty('providerType')) {
|
|
101
|
+
obj['providerType'] = _ProviderType["default"].constructFromObject(data['providerType']);
|
|
102
|
+
}
|
|
103
|
+
if (data.hasOwnProperty('endpointUrl')) {
|
|
104
|
+
obj['endpointUrl'] = _ApiClient["default"].convertToType(data['endpointUrl'], 'String');
|
|
105
|
+
}
|
|
106
|
+
if (data.hasOwnProperty('apiPath')) {
|
|
107
|
+
obj['apiPath'] = _ApiClient["default"].convertToType(data['apiPath'], 'String');
|
|
108
|
+
}
|
|
109
|
+
if (data.hasOwnProperty('modelIdentifier')) {
|
|
110
|
+
obj['modelIdentifier'] = _ApiClient["default"].convertToType(data['modelIdentifier'], 'String');
|
|
111
|
+
}
|
|
112
|
+
if (data.hasOwnProperty('supportedModalities')) {
|
|
113
|
+
obj['supportedModalities'] = _ApiClient["default"].convertToType(data['supportedModalities'], [_Modality["default"]]);
|
|
114
|
+
}
|
|
115
|
+
if (data.hasOwnProperty('labels')) {
|
|
116
|
+
obj['labels'] = _ApiClient["default"].convertToType(data['labels'], {
|
|
117
|
+
'String': 'String'
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
if (data.hasOwnProperty('version')) {
|
|
121
|
+
obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
|
|
122
|
+
}
|
|
123
|
+
if (data.hasOwnProperty('monitoringEndpoint')) {
|
|
124
|
+
obj['monitoringEndpoint'] = _ApiClient["default"].convertToType(data['monitoringEndpoint'], 'String');
|
|
125
|
+
}
|
|
126
|
+
if (data.hasOwnProperty('ownerId')) {
|
|
127
|
+
obj['ownerId'] = _ApiClient["default"].convertToType(data['ownerId'], 'String');
|
|
128
|
+
}
|
|
129
|
+
if (data.hasOwnProperty('createdAt')) {
|
|
130
|
+
obj['createdAt'] = _ApiClient["default"].convertToType(data['createdAt'], 'Number');
|
|
131
|
+
}
|
|
132
|
+
if (data.hasOwnProperty('updatedAt')) {
|
|
133
|
+
obj['updatedAt'] = _ApiClient["default"].convertToType(data['updatedAt'], 'Number');
|
|
134
|
+
}
|
|
135
|
+
if (data.hasOwnProperty('createdById')) {
|
|
136
|
+
obj['createdById'] = _ApiClient["default"].convertToType(data['createdById'], 'String');
|
|
137
|
+
}
|
|
138
|
+
if (data.hasOwnProperty('updatedById')) {
|
|
139
|
+
obj['updatedById'] = _ApiClient["default"].convertToType(data['updatedById'], 'String');
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return obj;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Validates the JSON data with respect to <code>RerankerResponse</code>.
|
|
147
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
148
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>RerankerResponse</code>.
|
|
149
|
+
*/
|
|
150
|
+
}, {
|
|
151
|
+
key: "validateJSON",
|
|
152
|
+
value: function validateJSON(data) {
|
|
153
|
+
// check to make sure all required properties are present in the JSON string
|
|
154
|
+
var _iterator = _createForOfIteratorHelper(RerankerResponse.RequiredProperties),
|
|
155
|
+
_step;
|
|
156
|
+
try {
|
|
157
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
158
|
+
var property = _step.value;
|
|
159
|
+
if (!data.hasOwnProperty(property)) {
|
|
160
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// ensure the json data is a string
|
|
164
|
+
} catch (err) {
|
|
165
|
+
_iterator.e(err);
|
|
166
|
+
} finally {
|
|
167
|
+
_iterator.f();
|
|
168
|
+
}
|
|
169
|
+
if (data['rerankerId'] && !(typeof data['rerankerId'] === 'string' || data['rerankerId'] instanceof String)) {
|
|
170
|
+
throw new Error("Expected the field `rerankerId` to be a primitive type in the JSON string but got " + data['rerankerId']);
|
|
171
|
+
}
|
|
172
|
+
// ensure the json data is a string
|
|
173
|
+
if (data['displayName'] && !(typeof data['displayName'] === 'string' || data['displayName'] instanceof String)) {
|
|
174
|
+
throw new Error("Expected the field `displayName` to be a primitive type in the JSON string but got " + data['displayName']);
|
|
175
|
+
}
|
|
176
|
+
// ensure the json data is a string
|
|
177
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
178
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
179
|
+
}
|
|
180
|
+
// ensure the json data is a string
|
|
181
|
+
if (data['endpointUrl'] && !(typeof data['endpointUrl'] === 'string' || data['endpointUrl'] instanceof String)) {
|
|
182
|
+
throw new Error("Expected the field `endpointUrl` to be a primitive type in the JSON string but got " + data['endpointUrl']);
|
|
183
|
+
}
|
|
184
|
+
// ensure the json data is a string
|
|
185
|
+
if (data['apiPath'] && !(typeof data['apiPath'] === 'string' || data['apiPath'] instanceof String)) {
|
|
186
|
+
throw new Error("Expected the field `apiPath` to be a primitive type in the JSON string but got " + data['apiPath']);
|
|
187
|
+
}
|
|
188
|
+
// ensure the json data is a string
|
|
189
|
+
if (data['modelIdentifier'] && !(typeof data['modelIdentifier'] === 'string' || data['modelIdentifier'] instanceof String)) {
|
|
190
|
+
throw new Error("Expected the field `modelIdentifier` to be a primitive type in the JSON string but got " + data['modelIdentifier']);
|
|
191
|
+
}
|
|
192
|
+
// ensure the json data is an array
|
|
193
|
+
if (!Array.isArray(data['supportedModalities'])) {
|
|
194
|
+
throw new Error("Expected the field `supportedModalities` to be an array in the JSON data but got " + data['supportedModalities']);
|
|
195
|
+
}
|
|
196
|
+
// ensure the json data is a string
|
|
197
|
+
if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
|
|
198
|
+
throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
|
|
199
|
+
}
|
|
200
|
+
// ensure the json data is a string
|
|
201
|
+
if (data['monitoringEndpoint'] && !(typeof data['monitoringEndpoint'] === 'string' || data['monitoringEndpoint'] instanceof String)) {
|
|
202
|
+
throw new Error("Expected the field `monitoringEndpoint` to be a primitive type in the JSON string but got " + data['monitoringEndpoint']);
|
|
203
|
+
}
|
|
204
|
+
// ensure the json data is a string
|
|
205
|
+
if (data['ownerId'] && !(typeof data['ownerId'] === 'string' || data['ownerId'] instanceof String)) {
|
|
206
|
+
throw new Error("Expected the field `ownerId` to be a primitive type in the JSON string but got " + data['ownerId']);
|
|
207
|
+
}
|
|
208
|
+
// ensure the json data is a string
|
|
209
|
+
if (data['createdById'] && !(typeof data['createdById'] === 'string' || data['createdById'] instanceof String)) {
|
|
210
|
+
throw new Error("Expected the field `createdById` to be a primitive type in the JSON string but got " + data['createdById']);
|
|
211
|
+
}
|
|
212
|
+
// ensure the json data is a string
|
|
213
|
+
if (data['updatedById'] && !(typeof data['updatedById'] === 'string' || data['updatedById'] instanceof String)) {
|
|
214
|
+
throw new Error("Expected the field `updatedById` to be a primitive type in the JSON string but got " + data['updatedById']);
|
|
215
|
+
}
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
218
|
+
}]);
|
|
219
|
+
}();
|
|
220
|
+
RerankerResponse.RequiredProperties = ["rerankerId", "displayName", "providerType", "endpointUrl", "apiPath", "modelIdentifier", "ownerId", "createdAt", "updatedAt", "createdById", "updatedById"];
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Unique identifier of the reranker
|
|
224
|
+
* @member {String} rerankerId
|
|
225
|
+
*/
|
|
226
|
+
RerankerResponse.prototype['rerankerId'] = undefined;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* User-facing name of the reranker
|
|
230
|
+
* @member {String} displayName
|
|
231
|
+
*/
|
|
232
|
+
RerankerResponse.prototype['displayName'] = undefined;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Description of the reranker
|
|
236
|
+
* @member {String} description
|
|
237
|
+
*/
|
|
238
|
+
RerankerResponse.prototype['description'] = undefined;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @member {module:model/ProviderType} providerType
|
|
242
|
+
*/
|
|
243
|
+
RerankerResponse.prototype['providerType'] = undefined;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* API endpoint URL
|
|
247
|
+
* @member {String} endpointUrl
|
|
248
|
+
*/
|
|
249
|
+
RerankerResponse.prototype['endpointUrl'] = undefined;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* API path for reranking request
|
|
253
|
+
* @member {String} apiPath
|
|
254
|
+
*/
|
|
255
|
+
RerankerResponse.prototype['apiPath'] = undefined;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Model identifier
|
|
259
|
+
* @member {String} modelIdentifier
|
|
260
|
+
*/
|
|
261
|
+
RerankerResponse.prototype['modelIdentifier'] = undefined;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Supported content modalities
|
|
265
|
+
* @member {Array.<module:model/Modality>} supportedModalities
|
|
266
|
+
*/
|
|
267
|
+
RerankerResponse.prototype['supportedModalities'] = undefined;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* User-defined labels for categorization
|
|
271
|
+
* @member {Object.<String, String>} labels
|
|
272
|
+
*/
|
|
273
|
+
RerankerResponse.prototype['labels'] = undefined;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Version information
|
|
277
|
+
* @member {String} version
|
|
278
|
+
*/
|
|
279
|
+
RerankerResponse.prototype['version'] = undefined;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Monitoring endpoint URL
|
|
283
|
+
* @member {String} monitoringEndpoint
|
|
284
|
+
*/
|
|
285
|
+
RerankerResponse.prototype['monitoringEndpoint'] = undefined;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Owner ID of the reranker
|
|
289
|
+
* @member {String} ownerId
|
|
290
|
+
*/
|
|
291
|
+
RerankerResponse.prototype['ownerId'] = undefined;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Creation timestamp (milliseconds since epoch)
|
|
295
|
+
* @member {Number} createdAt
|
|
296
|
+
*/
|
|
297
|
+
RerankerResponse.prototype['createdAt'] = undefined;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Last update timestamp (milliseconds since epoch)
|
|
301
|
+
* @member {Number} updatedAt
|
|
302
|
+
*/
|
|
303
|
+
RerankerResponse.prototype['updatedAt'] = undefined;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* ID of the user who created the reranker
|
|
307
|
+
* @member {String} createdById
|
|
308
|
+
*/
|
|
309
|
+
RerankerResponse.prototype['createdById'] = undefined;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* ID of the user who last updated the reranker
|
|
313
|
+
* @member {String} updatedById
|
|
314
|
+
*/
|
|
315
|
+
RerankerResponse.prototype['updatedById'] = undefined;
|
|
316
|
+
var _default = exports["default"] = RerankerResponse;
|
|
@@ -0,0 +1,153 @@
|
|
|
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 ResultSetBoundary model module.
|
|
31
|
+
* @module model/ResultSetBoundary
|
|
32
|
+
* @version 1.0.0
|
|
33
|
+
*/
|
|
34
|
+
var ResultSetBoundary = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>ResultSetBoundary</code>.
|
|
37
|
+
* Boundary marker for logical result sets in streaming memory retrieval
|
|
38
|
+
* @alias module:model/ResultSetBoundary
|
|
39
|
+
* @param resultSetId {String} Unique identifier for this result set (UUID)
|
|
40
|
+
* @param kind {String} Type of boundary marker
|
|
41
|
+
* @param stageName {String} Free-form label describing the pipeline stage
|
|
42
|
+
*/
|
|
43
|
+
function ResultSetBoundary(resultSetId, kind, stageName) {
|
|
44
|
+
_classCallCheck(this, ResultSetBoundary);
|
|
45
|
+
ResultSetBoundary.initialize(this, resultSetId, kind, stageName);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the fields of this object.
|
|
50
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
51
|
+
* Only for internal use.
|
|
52
|
+
*/
|
|
53
|
+
return _createClass(ResultSetBoundary, null, [{
|
|
54
|
+
key: "initialize",
|
|
55
|
+
value: function initialize(obj, resultSetId, kind, stageName) {
|
|
56
|
+
obj['resultSetId'] = resultSetId;
|
|
57
|
+
obj['kind'] = kind;
|
|
58
|
+
obj['stageName'] = stageName;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>ResultSetBoundary</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/ResultSetBoundary} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/ResultSetBoundary} The populated <code>ResultSetBoundary</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new ResultSetBoundary();
|
|
73
|
+
if (data.hasOwnProperty('resultSetId')) {
|
|
74
|
+
obj['resultSetId'] = _ApiClient["default"].convertToType(data['resultSetId'], 'String');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('kind')) {
|
|
77
|
+
obj['kind'] = _ApiClient["default"].convertToType(data['kind'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('stageName')) {
|
|
80
|
+
obj['stageName'] = _ApiClient["default"].convertToType(data['stageName'], 'String');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('expectedItems')) {
|
|
83
|
+
obj['expectedItems'] = _ApiClient["default"].convertToType(data['expectedItems'], 'Number');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return obj;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Validates the JSON data with respect to <code>ResultSetBoundary</code>.
|
|
91
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
92
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ResultSetBoundary</code>.
|
|
93
|
+
*/
|
|
94
|
+
}, {
|
|
95
|
+
key: "validateJSON",
|
|
96
|
+
value: function validateJSON(data) {
|
|
97
|
+
// check to make sure all required properties are present in the JSON string
|
|
98
|
+
var _iterator = _createForOfIteratorHelper(ResultSetBoundary.RequiredProperties),
|
|
99
|
+
_step;
|
|
100
|
+
try {
|
|
101
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
102
|
+
var property = _step.value;
|
|
103
|
+
if (!data.hasOwnProperty(property)) {
|
|
104
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// ensure the json data is a string
|
|
108
|
+
} catch (err) {
|
|
109
|
+
_iterator.e(err);
|
|
110
|
+
} finally {
|
|
111
|
+
_iterator.f();
|
|
112
|
+
}
|
|
113
|
+
if (data['resultSetId'] && !(typeof data['resultSetId'] === 'string' || data['resultSetId'] instanceof String)) {
|
|
114
|
+
throw new Error("Expected the field `resultSetId` to be a primitive type in the JSON string but got " + data['resultSetId']);
|
|
115
|
+
}
|
|
116
|
+
// ensure the json data is a string
|
|
117
|
+
if (data['kind'] && !(typeof data['kind'] === 'string' || data['kind'] instanceof String)) {
|
|
118
|
+
throw new Error("Expected the field `kind` to be a primitive type in the JSON string but got " + data['kind']);
|
|
119
|
+
}
|
|
120
|
+
// ensure the json data is a string
|
|
121
|
+
if (data['stageName'] && !(typeof data['stageName'] === 'string' || data['stageName'] instanceof String)) {
|
|
122
|
+
throw new Error("Expected the field `stageName` to be a primitive type in the JSON string but got " + data['stageName']);
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
}]);
|
|
127
|
+
}();
|
|
128
|
+
ResultSetBoundary.RequiredProperties = ["resultSetId", "kind", "stageName"];
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Unique identifier for this result set (UUID)
|
|
132
|
+
* @member {String} resultSetId
|
|
133
|
+
*/
|
|
134
|
+
ResultSetBoundary.prototype['resultSetId'] = undefined;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Type of boundary marker
|
|
138
|
+
* @member {String} kind
|
|
139
|
+
*/
|
|
140
|
+
ResultSetBoundary.prototype['kind'] = undefined;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Free-form label describing the pipeline stage
|
|
144
|
+
* @member {String} stageName
|
|
145
|
+
*/
|
|
146
|
+
ResultSetBoundary.prototype['stageName'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Hint for progress tracking - expected number of items in this result set
|
|
150
|
+
* @member {Number} expectedItems
|
|
151
|
+
*/
|
|
152
|
+
ResultSetBoundary.prototype['expectedItems'] = undefined;
|
|
153
|
+
var _default = exports["default"] = ResultSetBoundary;
|
|
@@ -0,0 +1,148 @@
|
|
|
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 _AbstractReply = _interopRequireDefault(require("./AbstractReply"));
|
|
9
|
+
var _GoodMemStatus = _interopRequireDefault(require("./GoodMemStatus"));
|
|
10
|
+
var _Memory = _interopRequireDefault(require("./Memory"));
|
|
11
|
+
var _ResultSetBoundary = _interopRequireDefault(require("./ResultSetBoundary"));
|
|
12
|
+
var _RetrievedItem = _interopRequireDefault(require("./RetrievedItem"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
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); }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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); } /**
|
|
20
|
+
*
|
|
21
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
22
|
+
*
|
|
23
|
+
* The version of the OpenAPI document:
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The RetrieveMemoryEvent model module.
|
|
33
|
+
* @module model/RetrieveMemoryEvent
|
|
34
|
+
* @version 1.0.0
|
|
35
|
+
*/
|
|
36
|
+
var RetrieveMemoryEvent = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>RetrieveMemoryEvent</code>.
|
|
39
|
+
* Streaming event from memory retrieval operation
|
|
40
|
+
* @alias module:model/RetrieveMemoryEvent
|
|
41
|
+
*/
|
|
42
|
+
function RetrieveMemoryEvent() {
|
|
43
|
+
_classCallCheck(this, RetrieveMemoryEvent);
|
|
44
|
+
RetrieveMemoryEvent.initialize(this);
|
|
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(RetrieveMemoryEvent, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj) {}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>RetrieveMemoryEvent</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
+
* @param {module:model/RetrieveMemoryEvent} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/RetrieveMemoryEvent} The populated <code>RetrieveMemoryEvent</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
}, {
|
|
64
|
+
key: "constructFromObject",
|
|
65
|
+
value: function constructFromObject(data, obj) {
|
|
66
|
+
if (data) {
|
|
67
|
+
obj = obj || new RetrieveMemoryEvent();
|
|
68
|
+
if (data.hasOwnProperty('resultSetBoundary')) {
|
|
69
|
+
obj['resultSetBoundary'] = _ResultSetBoundary["default"].constructFromObject(data['resultSetBoundary']);
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('abstractReply')) {
|
|
72
|
+
obj['abstractReply'] = _AbstractReply["default"].constructFromObject(data['abstractReply']);
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('retrievedItem')) {
|
|
75
|
+
obj['retrievedItem'] = _RetrievedItem["default"].constructFromObject(data['retrievedItem']);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('memoryDefinition')) {
|
|
78
|
+
obj['memoryDefinition'] = _Memory["default"].constructFromObject(data['memoryDefinition']);
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('status')) {
|
|
81
|
+
obj['status'] = _GoodMemStatus["default"].constructFromObject(data['status']);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return obj;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Validates the JSON data with respect to <code>RetrieveMemoryEvent</code>.
|
|
89
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
90
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>RetrieveMemoryEvent</code>.
|
|
91
|
+
*/
|
|
92
|
+
}, {
|
|
93
|
+
key: "validateJSON",
|
|
94
|
+
value: function validateJSON(data) {
|
|
95
|
+
// validate the optional field `resultSetBoundary`
|
|
96
|
+
if (data['resultSetBoundary']) {
|
|
97
|
+
// data not null
|
|
98
|
+
_ResultSetBoundary["default"].validateJSON(data['resultSetBoundary']);
|
|
99
|
+
}
|
|
100
|
+
// validate the optional field `abstractReply`
|
|
101
|
+
if (data['abstractReply']) {
|
|
102
|
+
// data not null
|
|
103
|
+
_AbstractReply["default"].validateJSON(data['abstractReply']);
|
|
104
|
+
}
|
|
105
|
+
// validate the optional field `retrievedItem`
|
|
106
|
+
if (data['retrievedItem']) {
|
|
107
|
+
// data not null
|
|
108
|
+
_RetrievedItem["default"].validateJSON(data['retrievedItem']);
|
|
109
|
+
}
|
|
110
|
+
// validate the optional field `memoryDefinition`
|
|
111
|
+
if (data['memoryDefinition']) {
|
|
112
|
+
// data not null
|
|
113
|
+
_Memory["default"].validateJSON(data['memoryDefinition']);
|
|
114
|
+
}
|
|
115
|
+
// validate the optional field `status`
|
|
116
|
+
if (data['status']) {
|
|
117
|
+
// data not null
|
|
118
|
+
_GoodMemStatus["default"].validateJSON(data['status']);
|
|
119
|
+
}
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
}]);
|
|
123
|
+
}();
|
|
124
|
+
/**
|
|
125
|
+
* @member {module:model/ResultSetBoundary} resultSetBoundary
|
|
126
|
+
*/
|
|
127
|
+
RetrieveMemoryEvent.prototype['resultSetBoundary'] = undefined;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @member {module:model/AbstractReply} abstractReply
|
|
131
|
+
*/
|
|
132
|
+
RetrieveMemoryEvent.prototype['abstractReply'] = undefined;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @member {module:model/RetrievedItem} retrievedItem
|
|
136
|
+
*/
|
|
137
|
+
RetrieveMemoryEvent.prototype['retrievedItem'] = undefined;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @member {module:model/Memory} memoryDefinition
|
|
141
|
+
*/
|
|
142
|
+
RetrieveMemoryEvent.prototype['memoryDefinition'] = undefined;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @member {module:model/GoodMemStatus} status
|
|
146
|
+
*/
|
|
147
|
+
RetrieveMemoryEvent.prototype['status'] = undefined;
|
|
148
|
+
var _default = exports["default"] = RetrieveMemoryEvent;
|