@pairsystems/goodmem-client 1.0.5 → 1.0.6
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 +3 -0
- package/dist/api/EmbeddersApi.js +6 -6
- package/dist/api/LLMsApi.js +2 -2
- package/dist/api/MemoriesApi.js +26 -14
- package/dist/api/RerankersApi.js +4 -4
- package/dist/index.js +21 -0
- package/dist/model/BatchMemoryResponse.js +132 -0
- package/dist/model/BatchMemoryResult.js +151 -0
- package/dist/model/CreateApiKeyRequest.js +13 -0
- package/dist/model/EmbedderCreationRequest.js +14 -1
- package/dist/model/ErrorDetail.js +125 -0
- package/dist/model/LLMCreationRequest.js +17 -6
- package/dist/model/MemoryCreationRequest.js +13 -0
- package/dist/model/RerankerCreationRequest.js +13 -0
- package/dist/model/SpaceCreationRequest.js +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -342,6 +342,8 @@ Class | Method | HTTP request | Description
|
|
|
342
342
|
- [GoodMemClient.BackgroundJobSummary](docs/BackgroundJobSummary.md)
|
|
343
343
|
- [GoodMemClient.BatchMemoryCreationRequest](docs/BatchMemoryCreationRequest.md)
|
|
344
344
|
- [GoodMemClient.BatchMemoryDeletionRequest](docs/BatchMemoryDeletionRequest.md)
|
|
345
|
+
- [GoodMemClient.BatchMemoryResponse](docs/BatchMemoryResponse.md)
|
|
346
|
+
- [GoodMemClient.BatchMemoryResult](docs/BatchMemoryResult.md)
|
|
345
347
|
- [GoodMemClient.BatchMemoryRetrievalRequest](docs/BatchMemoryRetrievalRequest.md)
|
|
346
348
|
- [GoodMemClient.BinaryContent](docs/BinaryContent.md)
|
|
347
349
|
- [GoodMemClient.ChunkReference](docs/ChunkReference.md)
|
|
@@ -356,6 +358,7 @@ Class | Method | HTTP request | Description
|
|
|
356
358
|
- [GoodMemClient.EmbedderResponse](docs/EmbedderResponse.md)
|
|
357
359
|
- [GoodMemClient.EmbedderWeight](docs/EmbedderWeight.md)
|
|
358
360
|
- [GoodMemClient.EndpointAuthentication](docs/EndpointAuthentication.md)
|
|
361
|
+
- [GoodMemClient.ErrorDetail](docs/ErrorDetail.md)
|
|
359
362
|
- [GoodMemClient.GcpAdcAuth](docs/GcpAdcAuth.md)
|
|
360
363
|
- [GoodMemClient.GoodMemStatus](docs/GoodMemStatus.md)
|
|
361
364
|
- [GoodMemClient.LLMCapabilities](docs/LLMCapabilities.md)
|
package/dist/api/EmbeddersApi.js
CHANGED
|
@@ -47,7 +47,7 @@ var EmbeddersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Create a new embedder
|
|
50
|
-
* Creates a new embedder configuration for vectorizing content. Embedders represent connections to different embedding API services (like OpenAI, vLLM, etc.) and include all the necessary configuration to use them with memory spaces. DUPLICATE DETECTION: Returns ALREADY_EXISTS if another embedder exists with identical {owner_id, provider_type, endpoint_url, api_path, model_identifier, credentials_fingerprint} after URL canonicalization. Uniqueness is enforced per-owner, allowing different users to have identical configurations. Credentials are hashed (SHA-256) for uniqueness while remaining encrypted. The api_path field defaults to '/embeddings'
|
|
50
|
+
* Creates a new embedder configuration for vectorizing content. Embedders represent connections to different embedding API services (like OpenAI, vLLM, etc.) and include all the necessary configuration to use them with memory spaces. DUPLICATE DETECTION: Returns HTTP 409 Conflict (ALREADY_EXISTS) if another embedder exists with identical {owner_id, provider_type, endpoint_url, api_path, model_identifier, credentials_fingerprint} after URL canonicalization. Uniqueness is enforced per-owner, allowing different users to have identical configurations. Credentials are hashed (SHA-256) for uniqueness while remaining encrypted. The api_path field defaults to '/v2/embed' for Cohere, '/embed' for TEI, and '/embeddings' for other providers when omitted. Requires CREATE_EMBEDDER_OWN permission (or CREATE_EMBEDDER_ANY for admin users).
|
|
51
51
|
* @param {module:model/EmbedderCreationRequest} embedderCreationRequest Embedder configuration details
|
|
52
52
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmbedderResponse} and HTTP response
|
|
53
53
|
*/
|
|
@@ -72,7 +72,7 @@ var EmbeddersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Create a new embedder
|
|
75
|
-
* Creates a new embedder configuration for vectorizing content. Embedders represent connections to different embedding API services (like OpenAI, vLLM, etc.) and include all the necessary configuration to use them with memory spaces. DUPLICATE DETECTION: Returns ALREADY_EXISTS if another embedder exists with identical {owner_id, provider_type, endpoint_url, api_path, model_identifier, credentials_fingerprint} after URL canonicalization. Uniqueness is enforced per-owner, allowing different users to have identical configurations. Credentials are hashed (SHA-256) for uniqueness while remaining encrypted. The api_path field defaults to '/embeddings'
|
|
75
|
+
* Creates a new embedder configuration for vectorizing content. Embedders represent connections to different embedding API services (like OpenAI, vLLM, etc.) and include all the necessary configuration to use them with memory spaces. DUPLICATE DETECTION: Returns HTTP 409 Conflict (ALREADY_EXISTS) if another embedder exists with identical {owner_id, provider_type, endpoint_url, api_path, model_identifier, credentials_fingerprint} after URL canonicalization. Uniqueness is enforced per-owner, allowing different users to have identical configurations. Credentials are hashed (SHA-256) for uniqueness while remaining encrypted. The api_path field defaults to '/v2/embed' for Cohere, '/embed' for TEI, and '/embeddings' for other providers when omitted. Requires CREATE_EMBEDDER_OWN permission (or CREATE_EMBEDDER_ANY for admin users).
|
|
76
76
|
* @param {module:model/EmbedderCreationRequest} embedderCreationRequest Embedder configuration details
|
|
77
77
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmbedderResponse}
|
|
78
78
|
*/
|
|
@@ -86,7 +86,7 @@ var EmbeddersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* Delete an embedder
|
|
89
|
-
* Permanently deletes an embedder configuration. This operation cannot be undone and removes the embedder record and securely deletes stored credentials. IMPORTANT: This does NOT invalidate or delete embeddings previously created with this embedder - existing embeddings remain accessible. Requires DELETE_EMBEDDER_OWN permission for embedders you own (or DELETE_EMBEDDER_ANY for admin users).
|
|
89
|
+
* Permanently deletes an embedder configuration. This operation cannot be undone and removes the embedder record and securely deletes stored credentials. IMPORTANT: This does NOT invalidate or delete embeddings previously created with this embedder - existing embeddings remain accessible. CONFLICT: Returns HTTP 409 Conflict if the embedder is still referenced by a space. Requires DELETE_EMBEDDER_OWN permission for embedders you own (or DELETE_EMBEDDER_ANY for admin users).
|
|
90
90
|
* @param {String} id The unique identifier of the embedder to delete
|
|
91
91
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
92
92
|
*/
|
|
@@ -113,7 +113,7 @@ var EmbeddersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* Delete an embedder
|
|
116
|
-
* Permanently deletes an embedder configuration. This operation cannot be undone and removes the embedder record and securely deletes stored credentials. IMPORTANT: This does NOT invalidate or delete embeddings previously created with this embedder - existing embeddings remain accessible. Requires DELETE_EMBEDDER_OWN permission for embedders you own (or DELETE_EMBEDDER_ANY for admin users).
|
|
116
|
+
* Permanently deletes an embedder configuration. This operation cannot be undone and removes the embedder record and securely deletes stored credentials. IMPORTANT: This does NOT invalidate or delete embeddings previously created with this embedder - existing embeddings remain accessible. CONFLICT: Returns HTTP 409 Conflict if the embedder is still referenced by a space. Requires DELETE_EMBEDDER_OWN permission for embedders you own (or DELETE_EMBEDDER_ANY for admin users).
|
|
117
117
|
* @param {String} id The unique identifier of the embedder to delete
|
|
118
118
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
119
119
|
*/
|
|
@@ -214,7 +214,7 @@ var EmbeddersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
216
|
* Update an embedder
|
|
217
|
-
* Updates an existing embedder configuration including display information, endpoint configuration, model parameters, credentials, and labels. All fields are optional - only specified fields will be updated. IMPORTANT: provider_type is IMMUTABLE after creation and cannot be changed. CRITICAL: Returns FAILED_PRECONDITION if attempting to update core fields (dimensionality, distribution_type, model_identifier) while the embedder is actively referenced by spaces or ingestion jobs. Requires UPDATE_EMBEDDER_OWN permission for embedders you own (or UPDATE_EMBEDDER_ANY for admin users).
|
|
217
|
+
* Updates an existing embedder configuration including display information, endpoint configuration, model parameters, credentials, and labels. All fields are optional - only specified fields will be updated. IMPORTANT: provider_type is IMMUTABLE after creation and cannot be changed. CRITICAL: Returns HTTP 412 Precondition Failed (FAILED_PRECONDITION) if attempting to update core fields (dimensionality, distribution_type, model_identifier) while the embedder is actively referenced by spaces or ingestion jobs. DUPLICATE DETECTION: Returns HTTP 409 Conflict (ALREADY_EXISTS) if the update would create a duplicate embedder with the same provider, endpoint, model, dimensionality, distribution, and credentials for this owner. Requires UPDATE_EMBEDDER_OWN permission for embedders you own (or UPDATE_EMBEDDER_ANY for admin users).
|
|
218
218
|
* @param {String} id The unique identifier of the embedder to update
|
|
219
219
|
* @param {module:model/UpdateEmbedderRequest} updateEmbedderRequest Embedder update details
|
|
220
220
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmbedderResponse} and HTTP response
|
|
@@ -246,7 +246,7 @@ var EmbeddersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
248
|
* Update an embedder
|
|
249
|
-
* Updates an existing embedder configuration including display information, endpoint configuration, model parameters, credentials, and labels. All fields are optional - only specified fields will be updated. IMPORTANT: provider_type is IMMUTABLE after creation and cannot be changed. CRITICAL: Returns FAILED_PRECONDITION if attempting to update core fields (dimensionality, distribution_type, model_identifier) while the embedder is actively referenced by spaces or ingestion jobs. Requires UPDATE_EMBEDDER_OWN permission for embedders you own (or UPDATE_EMBEDDER_ANY for admin users).
|
|
249
|
+
* Updates an existing embedder configuration including display information, endpoint configuration, model parameters, credentials, and labels. All fields are optional - only specified fields will be updated. IMPORTANT: provider_type is IMMUTABLE after creation and cannot be changed. CRITICAL: Returns HTTP 412 Precondition Failed (FAILED_PRECONDITION) if attempting to update core fields (dimensionality, distribution_type, model_identifier) while the embedder is actively referenced by spaces or ingestion jobs. DUPLICATE DETECTION: Returns HTTP 409 Conflict (ALREADY_EXISTS) if the update would create a duplicate embedder with the same provider, endpoint, model, dimensionality, distribution, and credentials for this owner. Requires UPDATE_EMBEDDER_OWN permission for embedders you own (or UPDATE_EMBEDDER_ANY for admin users).
|
|
250
250
|
* @param {String} id The unique identifier of the embedder to update
|
|
251
251
|
* @param {module:model/UpdateEmbedderRequest} updateEmbedderRequest Embedder update details
|
|
252
252
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmbedderResponse}
|
package/dist/api/LLMsApi.js
CHANGED
|
@@ -48,7 +48,7 @@ var LLMsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Create a new LLM
|
|
51
|
-
* Creates a new LLM configuration for text generation services. LLMs represent connections to different language model API services (like OpenAI, vLLM, etc.) and include all the necessary configuration to use them for text generation. DUPLICATE DETECTION: Returns ALREADY_EXISTS if another LLM exists with identical {endpoint_url, api_path, model_identifier} after URL canonicalization. The api_path field defaults to '/v1/chat/completions' if omitted. Requires CREATE_LLM_OWN permission (or CREATE_LLM_ANY for admin users).
|
|
51
|
+
* Creates a new LLM configuration for text generation services. LLMs represent connections to different language model API services (like OpenAI, vLLM, etc.) and include all the necessary configuration to use them for text generation. DUPLICATE DETECTION: Returns HTTP 409 Conflict (ALREADY_EXISTS) if another LLM exists with identical {endpoint_url, api_path, model_identifier} after URL canonicalization. The api_path field defaults to '/v1/chat/completions' if omitted. Requires CREATE_LLM_OWN permission (or CREATE_LLM_ANY for admin users).
|
|
52
52
|
* @param {module:model/LLMCreationRequest} lLMCreationRequest LLM configuration details
|
|
53
53
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateLLMResponse} and HTTP response
|
|
54
54
|
*/
|
|
@@ -73,7 +73,7 @@ var LLMsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* Create a new LLM
|
|
76
|
-
* Creates a new LLM configuration for text generation services. LLMs represent connections to different language model API services (like OpenAI, vLLM, etc.) and include all the necessary configuration to use them for text generation. DUPLICATE DETECTION: Returns ALREADY_EXISTS if another LLM exists with identical {endpoint_url, api_path, model_identifier} after URL canonicalization. The api_path field defaults to '/v1/chat/completions' if omitted. Requires CREATE_LLM_OWN permission (or CREATE_LLM_ANY for admin users).
|
|
76
|
+
* Creates a new LLM configuration for text generation services. LLMs represent connections to different language model API services (like OpenAI, vLLM, etc.) and include all the necessary configuration to use them for text generation. DUPLICATE DETECTION: Returns HTTP 409 Conflict (ALREADY_EXISTS) if another LLM exists with identical {endpoint_url, api_path, model_identifier} after URL canonicalization. The api_path field defaults to '/v1/chat/completions' if omitted. Requires CREATE_LLM_OWN permission (or CREATE_LLM_ANY for admin users).
|
|
77
77
|
* @param {module:model/LLMCreationRequest} lLMCreationRequest LLM configuration details
|
|
78
78
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateLLMResponse}
|
|
79
79
|
*/
|
package/dist/api/MemoriesApi.js
CHANGED
|
@@ -7,6 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _BatchMemoryCreationRequest = _interopRequireDefault(require("../model/BatchMemoryCreationRequest"));
|
|
9
9
|
var _BatchMemoryDeletionRequest = _interopRequireDefault(require("../model/BatchMemoryDeletionRequest"));
|
|
10
|
+
var _BatchMemoryResponse = _interopRequireDefault(require("../model/BatchMemoryResponse"));
|
|
10
11
|
var _BatchMemoryRetrievalRequest = _interopRequireDefault(require("../model/BatchMemoryRetrievalRequest"));
|
|
11
12
|
var _Memory = _interopRequireDefault(require("../model/Memory"));
|
|
12
13
|
var _MemoryCreationRequest = _interopRequireDefault(require("../model/MemoryCreationRequest"));
|
|
@@ -53,7 +54,7 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
53
54
|
* Create multiple memories in a batch
|
|
54
55
|
* Creates multiple memories in a single operation, with individual success/failure results.
|
|
55
56
|
* @param {module:model/BatchMemoryCreationRequest} batchMemoryCreationRequest Batch memory creation details
|
|
56
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
57
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchMemoryResponse} and HTTP response
|
|
57
58
|
*/
|
|
58
59
|
return _createClass(MemoriesApi, [{
|
|
59
60
|
key: "batchCreateMemoryWithHttpInfo",
|
|
@@ -70,7 +71,7 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
70
71
|
var authNames = [];
|
|
71
72
|
var contentTypes = ['application/json'];
|
|
72
73
|
var accepts = ['application/json'];
|
|
73
|
-
var returnType =
|
|
74
|
+
var returnType = _BatchMemoryResponse["default"];
|
|
74
75
|
return this.apiClient.callApi('/v1/memories:batchCreate', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
75
76
|
}
|
|
76
77
|
|
|
@@ -78,7 +79,7 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
78
79
|
* Create multiple memories in a batch
|
|
79
80
|
* Creates multiple memories in a single operation, with individual success/failure results.
|
|
80
81
|
* @param {module:model/BatchMemoryCreationRequest} batchMemoryCreationRequest Batch memory creation details
|
|
81
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
82
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchMemoryResponse}
|
|
82
83
|
*/
|
|
83
84
|
}, {
|
|
84
85
|
key: "batchCreateMemory",
|
|
@@ -92,7 +93,7 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
92
93
|
* Delete multiple memories by ID
|
|
93
94
|
* Deletes multiple memories in a single operation, with success/failure results for each ID.
|
|
94
95
|
* @param {module:model/BatchMemoryDeletionRequest} batchMemoryDeletionRequest Batch memory deletion details
|
|
95
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
96
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchMemoryResponse} and HTTP response
|
|
96
97
|
*/
|
|
97
98
|
}, {
|
|
98
99
|
key: "batchDeleteMemoryWithHttpInfo",
|
|
@@ -109,7 +110,7 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
109
110
|
var authNames = [];
|
|
110
111
|
var contentTypes = ['application/json'];
|
|
111
112
|
var accepts = ['application/json'];
|
|
112
|
-
var returnType =
|
|
113
|
+
var returnType = _BatchMemoryResponse["default"];
|
|
113
114
|
return this.apiClient.callApi('/v1/memories:batchDelete', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
114
115
|
}
|
|
115
116
|
|
|
@@ -117,7 +118,7 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
117
118
|
* Delete multiple memories by ID
|
|
118
119
|
* Deletes multiple memories in a single operation, with success/failure results for each ID.
|
|
119
120
|
* @param {module:model/BatchMemoryDeletionRequest} batchMemoryDeletionRequest Batch memory deletion details
|
|
120
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
121
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchMemoryResponse}
|
|
121
122
|
*/
|
|
122
123
|
}, {
|
|
123
124
|
key: "batchDeleteMemory",
|
|
@@ -131,7 +132,7 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
131
132
|
* Get multiple memories by ID
|
|
132
133
|
* Retrieves multiple memories in a single operation, with individual success/failure results.
|
|
133
134
|
* @param {module:model/BatchMemoryRetrievalRequest} batchMemoryRetrievalRequest Batch memory retrieval details
|
|
134
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
135
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchMemoryResponse} and HTTP response
|
|
135
136
|
*/
|
|
136
137
|
}, {
|
|
137
138
|
key: "batchGetMemoryWithHttpInfo",
|
|
@@ -148,7 +149,7 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
148
149
|
var authNames = [];
|
|
149
150
|
var contentTypes = ['application/json'];
|
|
150
151
|
var accepts = ['application/json'];
|
|
151
|
-
var returnType =
|
|
152
|
+
var returnType = _BatchMemoryResponse["default"];
|
|
152
153
|
return this.apiClient.callApi('/v1/memories:batchGet', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
153
154
|
}
|
|
154
155
|
|
|
@@ -156,7 +157,7 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
156
157
|
* Get multiple memories by ID
|
|
157
158
|
* Retrieves multiple memories in a single operation, with individual success/failure results.
|
|
158
159
|
* @param {module:model/BatchMemoryRetrievalRequest} batchMemoryRetrievalRequest Batch memory retrieval details
|
|
159
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
160
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchMemoryResponse}
|
|
160
161
|
*/
|
|
161
162
|
}, {
|
|
162
163
|
key: "batchGetMemory",
|
|
@@ -406,6 +407,7 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
406
407
|
* Streams semantic retrieval results based on query and context. Supports SSE (text/event-stream) and NDJSON (application/x-ndjson) formats.
|
|
407
408
|
* @param {String} message Primary query/message for semantic search
|
|
408
409
|
* @param {Object} opts Optional parameters
|
|
410
|
+
* @param {String} [accept] Response format: 'text/event-stream' for Server-Sent Events or 'application/x-ndjson' for newline-delimited JSON
|
|
409
411
|
* @param {String} [spaceIds] Comma-separated list of space UUIDs to search within
|
|
410
412
|
* @param {String} [filter] Optional filter expression applied to every space ID supplied via the query parameter. Use the POST variant if you need distinct filters per space.
|
|
411
413
|
* @param {Number} [requestedSize] Maximum number of memories to retrieve
|
|
@@ -443,7 +445,9 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
443
445
|
'pp_max_results': opts['ppMaxResults'],
|
|
444
446
|
'pp_chronological_resort': opts['ppChronologicalResort']
|
|
445
447
|
};
|
|
446
|
-
var headerParams = {
|
|
448
|
+
var headerParams = {
|
|
449
|
+
'Accept': opts['accept']
|
|
450
|
+
};
|
|
447
451
|
var formParams = {};
|
|
448
452
|
var authNames = [];
|
|
449
453
|
var contentTypes = [];
|
|
@@ -457,6 +461,7 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
457
461
|
* Streams semantic retrieval results based on query and context. Supports SSE (text/event-stream) and NDJSON (application/x-ndjson) formats.
|
|
458
462
|
* @param {String} message Primary query/message for semantic search
|
|
459
463
|
* @param {Object} opts Optional parameters
|
|
464
|
+
* @param {String} opts.accept Response format: 'text/event-stream' for Server-Sent Events or 'application/x-ndjson' for newline-delimited JSON
|
|
460
465
|
* @param {String} opts.spaceIds Comma-separated list of space UUIDs to search within
|
|
461
466
|
* @param {String} opts.filter Optional filter expression applied to every space ID supplied via the query parameter. Use the POST variant if you need distinct filters per space.
|
|
462
467
|
* @param {Number} opts.requestedSize Maximum number of memories to retrieve
|
|
@@ -482,11 +487,14 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
482
487
|
* Advanced semantic memory retrieval with JSON
|
|
483
488
|
* Streams semantic retrieval results with full feature support including context items and embedder weight overrides. Supports SSE (text/event-stream) and NDJSON (application/x-ndjson) formats.
|
|
484
489
|
* @param {module:model/RetrieveMemoryRequest} retrieveMemoryRequest Request body with query, context, and space configurations
|
|
490
|
+
* @param {Object} opts Optional parameters
|
|
491
|
+
* @param {String} [accept] Response format: 'text/event-stream' for Server-Sent Events or 'application/x-ndjson' for newline-delimited JSON
|
|
485
492
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
486
493
|
*/
|
|
487
494
|
}, {
|
|
488
495
|
key: "retrieveMemoryAdvancedWithHttpInfo",
|
|
489
|
-
value: function retrieveMemoryAdvancedWithHttpInfo(retrieveMemoryRequest) {
|
|
496
|
+
value: function retrieveMemoryAdvancedWithHttpInfo(retrieveMemoryRequest, opts) {
|
|
497
|
+
opts = opts || {};
|
|
490
498
|
var postBody = retrieveMemoryRequest;
|
|
491
499
|
// verify the required parameter 'retrieveMemoryRequest' is set
|
|
492
500
|
if (retrieveMemoryRequest === undefined || retrieveMemoryRequest === null) {
|
|
@@ -494,7 +502,9 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
494
502
|
}
|
|
495
503
|
var pathParams = {};
|
|
496
504
|
var queryParams = {};
|
|
497
|
-
var headerParams = {
|
|
505
|
+
var headerParams = {
|
|
506
|
+
'Accept': opts['accept']
|
|
507
|
+
};
|
|
498
508
|
var formParams = {};
|
|
499
509
|
var authNames = [];
|
|
500
510
|
var contentTypes = ['application/json'];
|
|
@@ -507,12 +517,14 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
507
517
|
* Advanced semantic memory retrieval with JSON
|
|
508
518
|
* Streams semantic retrieval results with full feature support including context items and embedder weight overrides. Supports SSE (text/event-stream) and NDJSON (application/x-ndjson) formats.
|
|
509
519
|
* @param {module:model/RetrieveMemoryRequest} retrieveMemoryRequest Request body with query, context, and space configurations
|
|
520
|
+
* @param {Object} opts Optional parameters
|
|
521
|
+
* @param {String} opts.accept Response format: 'text/event-stream' for Server-Sent Events or 'application/x-ndjson' for newline-delimited JSON
|
|
510
522
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
511
523
|
*/
|
|
512
524
|
}, {
|
|
513
525
|
key: "retrieveMemoryAdvanced",
|
|
514
|
-
value: function retrieveMemoryAdvanced(retrieveMemoryRequest) {
|
|
515
|
-
return this.retrieveMemoryAdvancedWithHttpInfo(retrieveMemoryRequest).then(function (response_and_data) {
|
|
526
|
+
value: function retrieveMemoryAdvanced(retrieveMemoryRequest, opts) {
|
|
527
|
+
return this.retrieveMemoryAdvancedWithHttpInfo(retrieveMemoryRequest, opts).then(function (response_and_data) {
|
|
516
528
|
return response_and_data.data;
|
|
517
529
|
});
|
|
518
530
|
}
|
package/dist/api/RerankersApi.js
CHANGED
|
@@ -47,7 +47,7 @@ var RerankersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Create a new reranker
|
|
50
|
-
* Creates a new reranker configuration for ranking search results. Rerankers represent connections to different reranking API services (like TEI, OpenAI, etc.) and include all the necessary configuration to use them for result ranking. DUPLICATE DETECTION: Returns ALREADY_EXISTS if another reranker exists with identical {owner_id, provider_type, endpoint_url, api_path, model_identifier, credentials_fingerprint} after URL canonicalization. Uniqueness is enforced per-owner, allowing different users to have identical configurations. Credentials are hashed (SHA-256) for uniqueness while remaining encrypted. DEFAULTS: api_path defaults to '/rerank' if omitted; supported_modalities defaults to [TEXT] if omitted. Requires CREATE_RERANKER_OWN permission (or CREATE_RERANKER_ANY for admin users). This operation is NOT idempotent - each request creates a new reranker record.
|
|
50
|
+
* Creates a new reranker configuration for ranking search results. Rerankers represent connections to different reranking API services (like TEI, OpenAI, etc.) and include all the necessary configuration to use them for result ranking. DUPLICATE DETECTION: Returns HTTP 409 Conflict (ALREADY_EXISTS) if another reranker exists with identical {owner_id, provider_type, endpoint_url, api_path, model_identifier, credentials_fingerprint} after URL canonicalization. Uniqueness is enforced per-owner, allowing different users to have identical configurations. Credentials are hashed (SHA-256) for uniqueness while remaining encrypted. DEFAULTS: api_path defaults to '/rerank' if omitted; supported_modalities defaults to [TEXT] if omitted. Requires CREATE_RERANKER_OWN permission (or CREATE_RERANKER_ANY for admin users). This operation is NOT idempotent - each request creates a new reranker record.
|
|
51
51
|
* @param {module:model/RerankerCreationRequest} rerankerCreationRequest Reranker configuration details
|
|
52
52
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RerankerResponse} and HTTP response
|
|
53
53
|
*/
|
|
@@ -72,7 +72,7 @@ var RerankersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Create a new reranker
|
|
75
|
-
* Creates a new reranker configuration for ranking search results. Rerankers represent connections to different reranking API services (like TEI, OpenAI, etc.) and include all the necessary configuration to use them for result ranking. DUPLICATE DETECTION: Returns ALREADY_EXISTS if another reranker exists with identical {owner_id, provider_type, endpoint_url, api_path, model_identifier, credentials_fingerprint} after URL canonicalization. Uniqueness is enforced per-owner, allowing different users to have identical configurations. Credentials are hashed (SHA-256) for uniqueness while remaining encrypted. DEFAULTS: api_path defaults to '/rerank' if omitted; supported_modalities defaults to [TEXT] if omitted. Requires CREATE_RERANKER_OWN permission (or CREATE_RERANKER_ANY for admin users). This operation is NOT idempotent - each request creates a new reranker record.
|
|
75
|
+
* Creates a new reranker configuration for ranking search results. Rerankers represent connections to different reranking API services (like TEI, OpenAI, etc.) and include all the necessary configuration to use them for result ranking. DUPLICATE DETECTION: Returns HTTP 409 Conflict (ALREADY_EXISTS) if another reranker exists with identical {owner_id, provider_type, endpoint_url, api_path, model_identifier, credentials_fingerprint} after URL canonicalization. Uniqueness is enforced per-owner, allowing different users to have identical configurations. Credentials are hashed (SHA-256) for uniqueness while remaining encrypted. DEFAULTS: api_path defaults to '/rerank' if omitted; supported_modalities defaults to [TEXT] if omitted. Requires CREATE_RERANKER_OWN permission (or CREATE_RERANKER_ANY for admin users). This operation is NOT idempotent - each request creates a new reranker record.
|
|
76
76
|
* @param {module:model/RerankerCreationRequest} rerankerCreationRequest Reranker configuration details
|
|
77
77
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RerankerResponse}
|
|
78
78
|
*/
|
|
@@ -214,7 +214,7 @@ var RerankersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
216
|
* Update a reranker
|
|
217
|
-
* Updates an existing reranker configuration including display information, endpoint configuration, model parameters, credentials, and labels. All fields are optional - only specified fields will be updated. IMMUTABLE FIELDS: provider_type and owner_id cannot be changed after creation. SUPPORTED_MODALITIES UPDATE: If the array contains ≥1 elements, it replaces the stored set; if empty or omitted, no change occurs. Returns ALREADY_EXISTS if update would create duplicate with same {endpoint_url, api_path, model_identifier}. Requires UPDATE_RERANKER_OWN permission for rerankers you own (or UPDATE_RERANKER_ANY for admin users). This operation is idempotent.
|
|
217
|
+
* Updates an existing reranker configuration including display information, endpoint configuration, model parameters, credentials, and labels. All fields are optional - only specified fields will be updated. IMMUTABLE FIELDS: provider_type and owner_id cannot be changed after creation. SUPPORTED_MODALITIES UPDATE: If the array contains ≥1 elements, it replaces the stored set; if empty or omitted, no change occurs. Returns ALREADY_EXISTS if update would create duplicate with same {endpoint_url, api_path, model_identifier} (HTTP 409 Conflict / ALREADY_EXISTS). Requires UPDATE_RERANKER_OWN permission for rerankers you own (or UPDATE_RERANKER_ANY for admin users). This operation is idempotent.
|
|
218
218
|
* @param {String} id The unique identifier of the reranker to update
|
|
219
219
|
* @param {module:model/UpdateRerankerRequest} updateRerankerRequest Updated reranker configuration details
|
|
220
220
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RerankerResponse} and HTTP response
|
|
@@ -246,7 +246,7 @@ var RerankersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
248
|
* Update a reranker
|
|
249
|
-
* Updates an existing reranker configuration including display information, endpoint configuration, model parameters, credentials, and labels. All fields are optional - only specified fields will be updated. IMMUTABLE FIELDS: provider_type and owner_id cannot be changed after creation. SUPPORTED_MODALITIES UPDATE: If the array contains ≥1 elements, it replaces the stored set; if empty or omitted, no change occurs. Returns ALREADY_EXISTS if update would create duplicate with same {endpoint_url, api_path, model_identifier}. Requires UPDATE_RERANKER_OWN permission for rerankers you own (or UPDATE_RERANKER_ANY for admin users). This operation is idempotent.
|
|
249
|
+
* Updates an existing reranker configuration including display information, endpoint configuration, model parameters, credentials, and labels. All fields are optional - only specified fields will be updated. IMMUTABLE FIELDS: provider_type and owner_id cannot be changed after creation. SUPPORTED_MODALITIES UPDATE: If the array contains ≥1 elements, it replaces the stored set; if empty or omitted, no change occurs. Returns ALREADY_EXISTS if update would create duplicate with same {endpoint_url, api_path, model_identifier} (HTTP 409 Conflict / ALREADY_EXISTS). Requires UPDATE_RERANKER_OWN permission for rerankers you own (or UPDATE_RERANKER_ANY for admin users). This operation is idempotent.
|
|
250
250
|
* @param {String} id The unique identifier of the reranker to update
|
|
251
251
|
* @param {module:model/UpdateRerankerRequest} updateRerankerRequest Updated reranker configuration details
|
|
252
252
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RerankerResponse}
|
package/dist/index.js
CHANGED
|
@@ -99,6 +99,18 @@ Object.defineProperty(exports, "BatchMemoryDeletionRequest", {
|
|
|
99
99
|
return _BatchMemoryDeletionRequest["default"];
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
+
Object.defineProperty(exports, "BatchMemoryResponse", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function get() {
|
|
105
|
+
return _BatchMemoryResponse["default"];
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "BatchMemoryResult", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function get() {
|
|
111
|
+
return _BatchMemoryResult["default"];
|
|
112
|
+
}
|
|
113
|
+
});
|
|
102
114
|
Object.defineProperty(exports, "BatchMemoryRetrievalRequest", {
|
|
103
115
|
enumerable: true,
|
|
104
116
|
get: function get() {
|
|
@@ -189,6 +201,12 @@ Object.defineProperty(exports, "EndpointAuthentication", {
|
|
|
189
201
|
return _EndpointAuthentication["default"];
|
|
190
202
|
}
|
|
191
203
|
});
|
|
204
|
+
Object.defineProperty(exports, "ErrorDetail", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function get() {
|
|
207
|
+
return _ErrorDetail["default"];
|
|
208
|
+
}
|
|
209
|
+
});
|
|
192
210
|
Object.defineProperty(exports, "GcpAdcAuth", {
|
|
193
211
|
enumerable: true,
|
|
194
212
|
get: function get() {
|
|
@@ -515,6 +533,8 @@ var _BackgroundJobAttempt = _interopRequireDefault(require("./model/BackgroundJo
|
|
|
515
533
|
var _BackgroundJobSummary = _interopRequireDefault(require("./model/BackgroundJobSummary"));
|
|
516
534
|
var _BatchMemoryCreationRequest = _interopRequireDefault(require("./model/BatchMemoryCreationRequest"));
|
|
517
535
|
var _BatchMemoryDeletionRequest = _interopRequireDefault(require("./model/BatchMemoryDeletionRequest"));
|
|
536
|
+
var _BatchMemoryResponse = _interopRequireDefault(require("./model/BatchMemoryResponse"));
|
|
537
|
+
var _BatchMemoryResult = _interopRequireDefault(require("./model/BatchMemoryResult"));
|
|
518
538
|
var _BatchMemoryRetrievalRequest = _interopRequireDefault(require("./model/BatchMemoryRetrievalRequest"));
|
|
519
539
|
var _BinaryContent = _interopRequireDefault(require("./model/BinaryContent"));
|
|
520
540
|
var _ChunkReference = _interopRequireDefault(require("./model/ChunkReference"));
|
|
@@ -529,6 +549,7 @@ var _EmbedderCreationRequest = _interopRequireDefault(require("./model/EmbedderC
|
|
|
529
549
|
var _EmbedderResponse = _interopRequireDefault(require("./model/EmbedderResponse"));
|
|
530
550
|
var _EmbedderWeight = _interopRequireDefault(require("./model/EmbedderWeight"));
|
|
531
551
|
var _EndpointAuthentication = _interopRequireDefault(require("./model/EndpointAuthentication"));
|
|
552
|
+
var _ErrorDetail = _interopRequireDefault(require("./model/ErrorDetail"));
|
|
532
553
|
var _GcpAdcAuth = _interopRequireDefault(require("./model/GcpAdcAuth"));
|
|
533
554
|
var _GoodMemStatus = _interopRequireDefault(require("./model/GoodMemStatus"));
|
|
534
555
|
var _LLMCapabilities = _interopRequireDefault(require("./model/LLMCapabilities"));
|
|
@@ -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 _BatchMemoryResult = _interopRequireDefault(require("./BatchMemoryResult"));
|
|
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 BatchMemoryResponse model module.
|
|
32
|
+
* @module model/BatchMemoryResponse
|
|
33
|
+
* @version 1.0.0
|
|
34
|
+
*/
|
|
35
|
+
var BatchMemoryResponse = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>BatchMemoryResponse</code>.
|
|
38
|
+
* Response containing per-item results for a batch memories operation
|
|
39
|
+
* @alias module:model/BatchMemoryResponse
|
|
40
|
+
* @param results {Array.<module:model/BatchMemoryResult>} Array of per-item results
|
|
41
|
+
*/
|
|
42
|
+
function BatchMemoryResponse(results) {
|
|
43
|
+
_classCallCheck(this, BatchMemoryResponse);
|
|
44
|
+
BatchMemoryResponse.initialize(this, results);
|
|
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(BatchMemoryResponse, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, results) {
|
|
55
|
+
obj['results'] = results;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a <code>BatchMemoryResponse</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/BatchMemoryResponse} obj Optional instance to populate.
|
|
63
|
+
* @return {module:model/BatchMemoryResponse} The populated <code>BatchMemoryResponse</code> instance.
|
|
64
|
+
*/
|
|
65
|
+
}, {
|
|
66
|
+
key: "constructFromObject",
|
|
67
|
+
value: function constructFromObject(data, obj) {
|
|
68
|
+
if (data) {
|
|
69
|
+
obj = obj || new BatchMemoryResponse();
|
|
70
|
+
if (data.hasOwnProperty('results')) {
|
|
71
|
+
obj['results'] = _ApiClient["default"].convertToType(data['results'], [_BatchMemoryResult["default"]]);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>BatchMemoryResponse</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>BatchMemoryResponse</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(BatchMemoryResponse.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['results']) {
|
|
101
|
+
// data not null
|
|
102
|
+
// ensure the json data is an array
|
|
103
|
+
if (!Array.isArray(data['results'])) {
|
|
104
|
+
throw new Error("Expected the field `results` to be an array in the JSON data but got " + data['results']);
|
|
105
|
+
}
|
|
106
|
+
// validate the optional field `results` (array)
|
|
107
|
+
var _iterator2 = _createForOfIteratorHelper(data['results']),
|
|
108
|
+
_step2;
|
|
109
|
+
try {
|
|
110
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
111
|
+
var item = _step2.value;
|
|
112
|
+
_BatchMemoryResult["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
|
+
BatchMemoryResponse.RequiredProperties = ["results"];
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Array of per-item results
|
|
129
|
+
* @member {Array.<module:model/BatchMemoryResult>} results
|
|
130
|
+
*/
|
|
131
|
+
BatchMemoryResponse.prototype['results'] = undefined;
|
|
132
|
+
var _default = exports["default"] = BatchMemoryResponse;
|
|
@@ -0,0 +1,151 @@
|
|
|
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 _ErrorDetail = _interopRequireDefault(require("./ErrorDetail"));
|
|
9
|
+
var _Memory = _interopRequireDefault(require("./Memory"));
|
|
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 BatchMemoryResult model module.
|
|
33
|
+
* @module model/BatchMemoryResult
|
|
34
|
+
* @version 1.0.0
|
|
35
|
+
*/
|
|
36
|
+
var BatchMemoryResult = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>BatchMemoryResult</code>.
|
|
39
|
+
* Individual item result for a batch memories operation
|
|
40
|
+
* @alias module:model/BatchMemoryResult
|
|
41
|
+
* @param success {Boolean} Whether this individual operation succeeded
|
|
42
|
+
*/
|
|
43
|
+
function BatchMemoryResult(success) {
|
|
44
|
+
_classCallCheck(this, BatchMemoryResult);
|
|
45
|
+
BatchMemoryResult.initialize(this, success);
|
|
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(BatchMemoryResult, null, [{
|
|
54
|
+
key: "initialize",
|
|
55
|
+
value: function initialize(obj, success) {
|
|
56
|
+
obj['success'] = success;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Constructs a <code>BatchMemoryResult</code> from a plain JavaScript object, optionally creating a new instance.
|
|
61
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
62
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
63
|
+
* @param {module:model/BatchMemoryResult} obj Optional instance to populate.
|
|
64
|
+
* @return {module:model/BatchMemoryResult} The populated <code>BatchMemoryResult</code> instance.
|
|
65
|
+
*/
|
|
66
|
+
}, {
|
|
67
|
+
key: "constructFromObject",
|
|
68
|
+
value: function constructFromObject(data, obj) {
|
|
69
|
+
if (data) {
|
|
70
|
+
obj = obj || new BatchMemoryResult();
|
|
71
|
+
if (data.hasOwnProperty('success')) {
|
|
72
|
+
obj['success'] = _ApiClient["default"].convertToType(data['success'], 'Boolean');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('memoryId')) {
|
|
75
|
+
obj['memoryId'] = _ApiClient["default"].convertToType(data['memoryId'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('memory')) {
|
|
78
|
+
obj['memory'] = _Memory["default"].constructFromObject(data['memory']);
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('error')) {
|
|
81
|
+
obj['error'] = _ErrorDetail["default"].constructFromObject(data['error']);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return obj;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Validates the JSON data with respect to <code>BatchMemoryResult</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>BatchMemoryResult</code>.
|
|
91
|
+
*/
|
|
92
|
+
}, {
|
|
93
|
+
key: "validateJSON",
|
|
94
|
+
value: function validateJSON(data) {
|
|
95
|
+
// check to make sure all required properties are present in the JSON string
|
|
96
|
+
var _iterator = _createForOfIteratorHelper(BatchMemoryResult.RequiredProperties),
|
|
97
|
+
_step;
|
|
98
|
+
try {
|
|
99
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
100
|
+
var property = _step.value;
|
|
101
|
+
if (!data.hasOwnProperty(property)) {
|
|
102
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// ensure the json data is a string
|
|
106
|
+
} catch (err) {
|
|
107
|
+
_iterator.e(err);
|
|
108
|
+
} finally {
|
|
109
|
+
_iterator.f();
|
|
110
|
+
}
|
|
111
|
+
if (data['memoryId'] && !(typeof data['memoryId'] === 'string' || data['memoryId'] instanceof String)) {
|
|
112
|
+
throw new Error("Expected the field `memoryId` to be a primitive type in the JSON string but got " + data['memoryId']);
|
|
113
|
+
}
|
|
114
|
+
// validate the optional field `memory`
|
|
115
|
+
if (data['memory']) {
|
|
116
|
+
// data not null
|
|
117
|
+
_Memory["default"].validateJSON(data['memory']);
|
|
118
|
+
}
|
|
119
|
+
// validate the optional field `error`
|
|
120
|
+
if (data['error']) {
|
|
121
|
+
// data not null
|
|
122
|
+
_ErrorDetail["default"].validateJSON(data['error']);
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
}]);
|
|
127
|
+
}();
|
|
128
|
+
BatchMemoryResult.RequiredProperties = ["success"];
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Whether this individual operation succeeded
|
|
132
|
+
* @member {Boolean} success
|
|
133
|
+
*/
|
|
134
|
+
BatchMemoryResult.prototype['success'] = undefined;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Memory ID associated with this result (present for batchGet errors and batchDelete results)
|
|
138
|
+
* @member {String} memoryId
|
|
139
|
+
*/
|
|
140
|
+
BatchMemoryResult.prototype['memoryId'] = undefined;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @member {module:model/Memory} memory
|
|
144
|
+
*/
|
|
145
|
+
BatchMemoryResult.prototype['memory'] = undefined;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @member {module:model/ErrorDetail} error
|
|
149
|
+
*/
|
|
150
|
+
BatchMemoryResult.prototype['error'] = undefined;
|
|
151
|
+
var _default = exports["default"] = BatchMemoryResult;
|
|
@@ -68,6 +68,9 @@ var CreateApiKeyRequest = /*#__PURE__*/function () {
|
|
|
68
68
|
if (data.hasOwnProperty('expiresAt')) {
|
|
69
69
|
obj['expiresAt'] = _ApiClient["default"].convertToType(data['expiresAt'], 'Number');
|
|
70
70
|
}
|
|
71
|
+
if (data.hasOwnProperty('apiKeyId')) {
|
|
72
|
+
obj['apiKeyId'] = _ApiClient["default"].convertToType(data['apiKeyId'], 'String');
|
|
73
|
+
}
|
|
71
74
|
}
|
|
72
75
|
return obj;
|
|
73
76
|
}
|
|
@@ -80,6 +83,10 @@ var CreateApiKeyRequest = /*#__PURE__*/function () {
|
|
|
80
83
|
}, {
|
|
81
84
|
key: "validateJSON",
|
|
82
85
|
value: function validateJSON(data) {
|
|
86
|
+
// ensure the json data is a string
|
|
87
|
+
if (data['apiKeyId'] && !(typeof data['apiKeyId'] === 'string' || data['apiKeyId'] instanceof String)) {
|
|
88
|
+
throw new Error("Expected the field `apiKeyId` to be a primitive type in the JSON string but got " + data['apiKeyId']);
|
|
89
|
+
}
|
|
83
90
|
return true;
|
|
84
91
|
}
|
|
85
92
|
}]);
|
|
@@ -95,4 +102,10 @@ CreateApiKeyRequest.prototype['labels'] = undefined;
|
|
|
95
102
|
* @member {Number} expiresAt
|
|
96
103
|
*/
|
|
97
104
|
CreateApiKeyRequest.prototype['expiresAt'] = undefined;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Optional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.
|
|
108
|
+
* @member {String} apiKeyId
|
|
109
|
+
*/
|
|
110
|
+
CreateApiKeyRequest.prototype['apiKeyId'] = undefined;
|
|
98
111
|
var _default = exports["default"] = CreateApiKeyRequest;
|
|
@@ -130,6 +130,9 @@ var EmbedderCreationRequest = /*#__PURE__*/function () {
|
|
|
130
130
|
if (data.hasOwnProperty('ownerId')) {
|
|
131
131
|
obj['ownerId'] = _ApiClient["default"].convertToType(data['ownerId'], 'String');
|
|
132
132
|
}
|
|
133
|
+
if (data.hasOwnProperty('embedderId')) {
|
|
134
|
+
obj['embedderId'] = _ApiClient["default"].convertToType(data['embedderId'], 'String');
|
|
135
|
+
}
|
|
133
136
|
}
|
|
134
137
|
return obj;
|
|
135
138
|
}
|
|
@@ -198,6 +201,10 @@ var EmbedderCreationRequest = /*#__PURE__*/function () {
|
|
|
198
201
|
if (data['ownerId'] && !(typeof data['ownerId'] === 'string' || data['ownerId'] instanceof String)) {
|
|
199
202
|
throw new Error("Expected the field `ownerId` to be a primitive type in the JSON string but got " + data['ownerId']);
|
|
200
203
|
}
|
|
204
|
+
// ensure the json data is a string
|
|
205
|
+
if (data['embedderId'] && !(typeof data['embedderId'] === 'string' || data['embedderId'] instanceof String)) {
|
|
206
|
+
throw new Error("Expected the field `embedderId` to be a primitive type in the JSON string but got " + data['embedderId']);
|
|
207
|
+
}
|
|
201
208
|
return true;
|
|
202
209
|
}
|
|
203
210
|
}]);
|
|
@@ -233,7 +240,7 @@ EmbedderCreationRequest.prototype['providerType'] = undefined;
|
|
|
233
240
|
EmbedderCreationRequest.prototype['endpointUrl'] = undefined;
|
|
234
241
|
|
|
235
242
|
/**
|
|
236
|
-
* API path for embeddings request (defaults
|
|
243
|
+
* API path for embeddings request (defaults: Cohere /v2/embed, TEI /embed, others /embeddings)
|
|
237
244
|
* @member {String} apiPath
|
|
238
245
|
*/
|
|
239
246
|
EmbedderCreationRequest.prototype['apiPath'] = undefined;
|
|
@@ -295,4 +302,10 @@ EmbedderCreationRequest.prototype['monitoringEndpoint'] = undefined;
|
|
|
295
302
|
* @member {String} ownerId
|
|
296
303
|
*/
|
|
297
304
|
EmbedderCreationRequest.prototype['ownerId'] = undefined;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Optional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.
|
|
308
|
+
* @member {String} embedderId
|
|
309
|
+
*/
|
|
310
|
+
EmbedderCreationRequest.prototype['embedderId'] = undefined;
|
|
298
311
|
var _default = exports["default"] = EmbedderCreationRequest;
|
|
@@ -0,0 +1,125 @@
|
|
|
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 ErrorDetail model module.
|
|
31
|
+
* @module model/ErrorDetail
|
|
32
|
+
* @version 1.0.0
|
|
33
|
+
*/
|
|
34
|
+
var ErrorDetail = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>ErrorDetail</code>.
|
|
37
|
+
* Structured error details for an individual batch operation result
|
|
38
|
+
* @alias module:model/ErrorDetail
|
|
39
|
+
* @param code {Number} Numeric error code (typically an HTTP or gRPC-derived status code)
|
|
40
|
+
* @param message {String} Human-readable error message
|
|
41
|
+
*/
|
|
42
|
+
function ErrorDetail(code, message) {
|
|
43
|
+
_classCallCheck(this, ErrorDetail);
|
|
44
|
+
ErrorDetail.initialize(this, code, message);
|
|
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(ErrorDetail, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, code, message) {
|
|
55
|
+
obj['code'] = code;
|
|
56
|
+
obj['message'] = message;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Constructs a <code>ErrorDetail</code> from a plain JavaScript object, optionally creating a new instance.
|
|
61
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
62
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
63
|
+
* @param {module:model/ErrorDetail} obj Optional instance to populate.
|
|
64
|
+
* @return {module:model/ErrorDetail} The populated <code>ErrorDetail</code> instance.
|
|
65
|
+
*/
|
|
66
|
+
}, {
|
|
67
|
+
key: "constructFromObject",
|
|
68
|
+
value: function constructFromObject(data, obj) {
|
|
69
|
+
if (data) {
|
|
70
|
+
obj = obj || new ErrorDetail();
|
|
71
|
+
if (data.hasOwnProperty('code')) {
|
|
72
|
+
obj['code'] = _ApiClient["default"].convertToType(data['code'], 'Number');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('message')) {
|
|
75
|
+
obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return obj;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Validates the JSON data with respect to <code>ErrorDetail</code>.
|
|
83
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
84
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ErrorDetail</code>.
|
|
85
|
+
*/
|
|
86
|
+
}, {
|
|
87
|
+
key: "validateJSON",
|
|
88
|
+
value: function validateJSON(data) {
|
|
89
|
+
// check to make sure all required properties are present in the JSON string
|
|
90
|
+
var _iterator = _createForOfIteratorHelper(ErrorDetail.RequiredProperties),
|
|
91
|
+
_step;
|
|
92
|
+
try {
|
|
93
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
94
|
+
var property = _step.value;
|
|
95
|
+
if (!data.hasOwnProperty(property)) {
|
|
96
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// ensure the json data is a string
|
|
100
|
+
} catch (err) {
|
|
101
|
+
_iterator.e(err);
|
|
102
|
+
} finally {
|
|
103
|
+
_iterator.f();
|
|
104
|
+
}
|
|
105
|
+
if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
|
|
106
|
+
throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
}]);
|
|
111
|
+
}();
|
|
112
|
+
ErrorDetail.RequiredProperties = ["code", "message"];
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Numeric error code (typically an HTTP or gRPC-derived status code)
|
|
116
|
+
* @member {Number} code
|
|
117
|
+
*/
|
|
118
|
+
ErrorDetail.prototype['code'] = undefined;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Human-readable error message
|
|
122
|
+
* @member {String} message
|
|
123
|
+
*/
|
|
124
|
+
ErrorDetail.prototype['message'] = undefined;
|
|
125
|
+
var _default = exports["default"] = ErrorDetail;
|
|
@@ -45,11 +45,10 @@ var LLMCreationRequest = /*#__PURE__*/function () {
|
|
|
45
45
|
* @param providerType {module:model/LLMProviderType}
|
|
46
46
|
* @param endpointUrl {String} API endpoint URL
|
|
47
47
|
* @param modelIdentifier {String} Model identifier
|
|
48
|
-
* @param capabilities {module:model/LLMCapabilities}
|
|
49
48
|
*/
|
|
50
|
-
function LLMCreationRequest(displayName, providerType, endpointUrl, modelIdentifier
|
|
49
|
+
function LLMCreationRequest(displayName, providerType, endpointUrl, modelIdentifier) {
|
|
51
50
|
_classCallCheck(this, LLMCreationRequest);
|
|
52
|
-
LLMCreationRequest.initialize(this, displayName, providerType, endpointUrl, modelIdentifier
|
|
51
|
+
LLMCreationRequest.initialize(this, displayName, providerType, endpointUrl, modelIdentifier);
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
/**
|
|
@@ -59,12 +58,11 @@ var LLMCreationRequest = /*#__PURE__*/function () {
|
|
|
59
58
|
*/
|
|
60
59
|
return _createClass(LLMCreationRequest, null, [{
|
|
61
60
|
key: "initialize",
|
|
62
|
-
value: function initialize(obj, displayName, providerType, endpointUrl, modelIdentifier
|
|
61
|
+
value: function initialize(obj, displayName, providerType, endpointUrl, modelIdentifier) {
|
|
63
62
|
obj['displayName'] = displayName;
|
|
64
63
|
obj['providerType'] = providerType;
|
|
65
64
|
obj['endpointUrl'] = endpointUrl;
|
|
66
65
|
obj['modelIdentifier'] = modelIdentifier;
|
|
67
|
-
obj['capabilities'] = capabilities;
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
/**
|
|
@@ -134,6 +132,9 @@ var LLMCreationRequest = /*#__PURE__*/function () {
|
|
|
134
132
|
if (data.hasOwnProperty('ownerId')) {
|
|
135
133
|
obj['ownerId'] = _ApiClient["default"].convertToType(data['ownerId'], 'String');
|
|
136
134
|
}
|
|
135
|
+
if (data.hasOwnProperty('llmId')) {
|
|
136
|
+
obj['llmId'] = _ApiClient["default"].convertToType(data['llmId'], 'String');
|
|
137
|
+
}
|
|
137
138
|
}
|
|
138
139
|
return obj;
|
|
139
140
|
}
|
|
@@ -212,11 +213,15 @@ var LLMCreationRequest = /*#__PURE__*/function () {
|
|
|
212
213
|
if (data['ownerId'] && !(typeof data['ownerId'] === 'string' || data['ownerId'] instanceof String)) {
|
|
213
214
|
throw new Error("Expected the field `ownerId` to be a primitive type in the JSON string but got " + data['ownerId']);
|
|
214
215
|
}
|
|
216
|
+
// ensure the json data is a string
|
|
217
|
+
if (data['llmId'] && !(typeof data['llmId'] === 'string' || data['llmId'] instanceof String)) {
|
|
218
|
+
throw new Error("Expected the field `llmId` to be a primitive type in the JSON string but got " + data['llmId']);
|
|
219
|
+
}
|
|
215
220
|
return true;
|
|
216
221
|
}
|
|
217
222
|
}]);
|
|
218
223
|
}();
|
|
219
|
-
LLMCreationRequest.RequiredProperties = ["displayName", "providerType", "endpointUrl", "modelIdentifier"
|
|
224
|
+
LLMCreationRequest.RequiredProperties = ["displayName", "providerType", "endpointUrl", "modelIdentifier"];
|
|
220
225
|
|
|
221
226
|
/**
|
|
222
227
|
* @member {Object} validate
|
|
@@ -314,4 +319,10 @@ LLMCreationRequest.prototype['clientConfig'] = undefined;
|
|
|
314
319
|
* @member {String} ownerId
|
|
315
320
|
*/
|
|
316
321
|
LLMCreationRequest.prototype['ownerId'] = undefined;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Optional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.
|
|
325
|
+
* @member {String} llmId
|
|
326
|
+
*/
|
|
327
|
+
LLMCreationRequest.prototype['llmId'] = undefined;
|
|
317
328
|
var _default = exports["default"] = LLMCreationRequest;
|
|
@@ -72,6 +72,9 @@ var MemoryCreationRequest = /*#__PURE__*/function () {
|
|
|
72
72
|
if (data.hasOwnProperty('validate')) {
|
|
73
73
|
obj['validate'] = _ApiClient["default"].convertToType(data['validate'], Object);
|
|
74
74
|
}
|
|
75
|
+
if (data.hasOwnProperty('memoryId')) {
|
|
76
|
+
obj['memoryId'] = _ApiClient["default"].convertToType(data['memoryId'], 'String');
|
|
77
|
+
}
|
|
75
78
|
if (data.hasOwnProperty('spaceId')) {
|
|
76
79
|
obj['spaceId'] = _ApiClient["default"].convertToType(data['spaceId'], 'String');
|
|
77
80
|
}
|
|
@@ -121,6 +124,10 @@ var MemoryCreationRequest = /*#__PURE__*/function () {
|
|
|
121
124
|
} finally {
|
|
122
125
|
_iterator.f();
|
|
123
126
|
}
|
|
127
|
+
if (data['memoryId'] && !(typeof data['memoryId'] === 'string' || data['memoryId'] instanceof String)) {
|
|
128
|
+
throw new Error("Expected the field `memoryId` to be a primitive type in the JSON string but got " + data['memoryId']);
|
|
129
|
+
}
|
|
130
|
+
// ensure the json data is a string
|
|
124
131
|
if (data['spaceId'] && !(typeof data['spaceId'] === 'string' || data['spaceId'] instanceof String)) {
|
|
125
132
|
throw new Error("Expected the field `spaceId` to be a primitive type in the JSON string but got " + data['spaceId']);
|
|
126
133
|
}
|
|
@@ -156,6 +163,12 @@ MemoryCreationRequest.RequiredProperties = ["spaceId", "contentType"];
|
|
|
156
163
|
*/
|
|
157
164
|
MemoryCreationRequest.prototype['validate'] = undefined;
|
|
158
165
|
|
|
166
|
+
/**
|
|
167
|
+
* Optional client-provided UUID for the memory. If omitted, the server generates one. Returns ALREADY_EXISTS if the ID is already in use.
|
|
168
|
+
* @member {String} memoryId
|
|
169
|
+
*/
|
|
170
|
+
MemoryCreationRequest.prototype['memoryId'] = undefined;
|
|
171
|
+
|
|
159
172
|
/**
|
|
160
173
|
* ID of the space where this memory will be stored
|
|
161
174
|
* @member {String} spaceId
|
|
@@ -116,6 +116,9 @@ var RerankerCreationRequest = /*#__PURE__*/function () {
|
|
|
116
116
|
if (data.hasOwnProperty('ownerId')) {
|
|
117
117
|
obj['ownerId'] = _ApiClient["default"].convertToType(data['ownerId'], 'String');
|
|
118
118
|
}
|
|
119
|
+
if (data.hasOwnProperty('rerankerId')) {
|
|
120
|
+
obj['rerankerId'] = _ApiClient["default"].convertToType(data['rerankerId'], 'String');
|
|
121
|
+
}
|
|
119
122
|
}
|
|
120
123
|
return obj;
|
|
121
124
|
}
|
|
@@ -184,6 +187,10 @@ var RerankerCreationRequest = /*#__PURE__*/function () {
|
|
|
184
187
|
if (data['ownerId'] && !(typeof data['ownerId'] === 'string' || data['ownerId'] instanceof String)) {
|
|
185
188
|
throw new Error("Expected the field `ownerId` to be a primitive type in the JSON string but got " + data['ownerId']);
|
|
186
189
|
}
|
|
190
|
+
// ensure the json data is a string
|
|
191
|
+
if (data['rerankerId'] && !(typeof data['rerankerId'] === 'string' || data['rerankerId'] instanceof String)) {
|
|
192
|
+
throw new Error("Expected the field `rerankerId` to be a primitive type in the JSON string but got " + data['rerankerId']);
|
|
193
|
+
}
|
|
187
194
|
return true;
|
|
188
195
|
}
|
|
189
196
|
}]);
|
|
@@ -264,4 +271,10 @@ RerankerCreationRequest.prototype['monitoringEndpoint'] = undefined;
|
|
|
264
271
|
* @member {String} ownerId
|
|
265
272
|
*/
|
|
266
273
|
RerankerCreationRequest.prototype['ownerId'] = undefined;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Optional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.
|
|
277
|
+
* @member {String} rerankerId
|
|
278
|
+
*/
|
|
279
|
+
RerankerCreationRequest.prototype['rerankerId'] = undefined;
|
|
267
280
|
var _default = exports["default"] = RerankerCreationRequest;
|
|
@@ -88,6 +88,9 @@ var SpaceCreationRequest = /*#__PURE__*/function () {
|
|
|
88
88
|
if (data.hasOwnProperty('defaultChunkingConfig')) {
|
|
89
89
|
obj['defaultChunkingConfig'] = _ChunkingConfiguration["default"].constructFromObject(data['defaultChunkingConfig']);
|
|
90
90
|
}
|
|
91
|
+
if (data.hasOwnProperty('spaceId')) {
|
|
92
|
+
obj['spaceId'] = _ApiClient["default"].convertToType(data['spaceId'], 'String');
|
|
93
|
+
}
|
|
91
94
|
}
|
|
92
95
|
return obj;
|
|
93
96
|
}
|
|
@@ -149,6 +152,10 @@ var SpaceCreationRequest = /*#__PURE__*/function () {
|
|
|
149
152
|
// data not null
|
|
150
153
|
_ChunkingConfiguration["default"].validateJSON(data['defaultChunkingConfig']);
|
|
151
154
|
}
|
|
155
|
+
// ensure the json data is a string
|
|
156
|
+
if (data['spaceId'] && !(typeof data['spaceId'] === 'string' || data['spaceId'] instanceof String)) {
|
|
157
|
+
throw new Error("Expected the field `spaceId` to be a primitive type in the JSON string but got " + data['spaceId']);
|
|
158
|
+
}
|
|
152
159
|
return true;
|
|
153
160
|
}
|
|
154
161
|
}]);
|
|
@@ -189,4 +196,10 @@ SpaceCreationRequest.prototype['ownerId'] = undefined;
|
|
|
189
196
|
* @member {module:model/ChunkingConfiguration} defaultChunkingConfig
|
|
190
197
|
*/
|
|
191
198
|
SpaceCreationRequest.prototype['defaultChunkingConfig'] = undefined;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Optional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.
|
|
202
|
+
* @member {String} spaceId
|
|
203
|
+
*/
|
|
204
|
+
SpaceCreationRequest.prototype['spaceId'] = undefined;
|
|
192
205
|
var _default = exports["default"] = SpaceCreationRequest;
|