@opensearch-project/opensearch 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/OpenSearchApi.d.ts +162 -3
- package/api/_core/count.js +1 -1
- package/api/_core/createPit.d.ts +1 -2
- package/api/_core/deleteAllPits.d.ts +2 -2
- package/api/_core/deleteByQuery.d.ts +2 -1
- package/api/_core/deleteByQuery.js +1 -1
- package/api/_core/deletePit.d.ts +2 -2
- package/api/_core/getAllPits.d.ts +2 -2
- package/api/_core/rankEval.d.ts +1 -1
- package/api/_core/reindex.d.ts +1 -0
- package/api/_core/reindex.js +1 -0
- package/api/_core/renderSearchTemplate.d.ts +1 -1
- package/api/_core/search.d.ts +1 -0
- package/api/_core/searchShards.d.ts +0 -11
- package/api/_core/searchShards.js +0 -1
- package/api/_core/updateByQuery.d.ts +2 -1
- package/api/_core/updateByQuery.js +1 -1
- package/api/_types/_common.aggregations.d.ts +37 -156
- package/api/_types/_common.d.ts +4 -17
- package/api/_types/_core.field_caps.d.ts +1 -1
- package/api/_types/{_core._common.d.ts → _core.pit.d.ts} +0 -12
- package/api/_types/_core.rank_eval.d.ts +3 -3
- package/api/_types/_core.termvectors.d.ts +1 -1
- package/api/_types/{cat._common.d.ts → cat.segment_replication.d.ts} +1 -18
- package/api/_types/cat.snapshots.d.ts +1 -1
- package/api/_types/index.d.ts +233 -0
- package/api/_types/ingest._common.d.ts +3 -40
- package/api/_types/ml._common.d.ts +293 -7
- package/api/_types/nodes.info.d.ts +17 -5
- package/api/asynchronousSearch/delete.js +1 -1
- package/api/asynchronousSearch/get.js +1 -1
- package/api/asynchronousSearch/search.js +4 -4
- package/api/asynchronousSearch/stats.js +1 -1
- package/api/cat/aliases.js +1 -1
- package/api/cat/allPitSegments.d.ts +2 -2
- package/api/cat/allPitSegments.js +1 -1
- package/api/cat/clusterManager.js +1 -1
- package/api/cat/count.js +1 -1
- package/api/cat/fielddata.js +1 -1
- package/api/cat/health.js +1 -1
- package/api/cat/indices.js +2 -2
- package/api/cat/master.js +1 -1
- package/api/cat/nodeattrs.js +1 -1
- package/api/cat/nodes.d.ts +1 -1
- package/api/cat/nodes.js +2 -2
- package/api/cat/pendingTasks.js +1 -1
- package/api/cat/pitSegments.d.ts +2 -2
- package/api/cat/pitSegments.js +1 -1
- package/api/cat/plugins.js +1 -1
- package/api/cat/recovery.js +1 -1
- package/api/cat/repositories.js +1 -1
- package/api/cat/segmentReplication.d.ts +2 -2
- package/api/cat/segmentReplication.js +2 -2
- package/api/cat/shards.js +1 -1
- package/api/cat/snapshots.js +1 -1
- package/api/cat/tasks.js +1 -1
- package/api/cat/templates.js +1 -1
- package/api/cat/threadPool.js +1 -1
- package/api/index.d.ts +76 -4
- package/api/ml/_api.js +108 -0
- package/api/ml/chunkModel.d.ts +37 -0
- package/api/ml/chunkModel.js +53 -0
- package/api/ml/createController.d.ts +39 -0
- package/api/ml/createController.js +50 -0
- package/api/ml/createMemory.d.ts +36 -0
- package/api/ml/createMemory.js +47 -0
- package/api/ml/createMessage.d.ts +42 -0
- package/api/ml/createMessage.js +50 -0
- package/api/ml/createModelMeta.d.ts +46 -0
- package/api/ml/createModelMeta.js +47 -0
- package/api/ml/deleteController.d.ts +30 -0
- package/api/ml/deleteController.js +49 -0
- package/api/ml/deleteMemory.d.ts +31 -0
- package/api/ml/deleteMemory.js +49 -0
- package/api/ml/executeAgent.d.ts +36 -0
- package/api/ml/executeAgent.js +50 -0
- package/api/ml/getAgent.d.ts +30 -0
- package/api/ml/getAgent.js +49 -0
- package/api/ml/getAllMemories.d.ts +34 -0
- package/api/ml/getAllMemories.js +48 -0
- package/api/ml/getAllMessages.d.ts +35 -0
- package/api/ml/getAllMessages.js +51 -0
- package/api/ml/getAllTools.d.ts +28 -0
- package/api/ml/getAllTools.js +45 -0
- package/api/ml/getController.d.ts +34 -0
- package/api/ml/getController.js +49 -0
- package/api/ml/getMemory.d.ts +30 -0
- package/api/ml/getMemory.js +49 -0
- package/api/ml/getMessage.d.ts +30 -0
- package/api/ml/getMessage.js +49 -0
- package/api/ml/getMessageTraces.d.ts +35 -0
- package/api/ml/getMessageTraces.js +51 -0
- package/api/ml/getModel.d.ts +30 -0
- package/api/ml/getModel.js +49 -0
- package/api/ml/getProfile.d.ts +30 -0
- package/api/ml/getProfile.js +47 -0
- package/api/ml/getProfileModels.d.ts +31 -0
- package/api/ml/getProfileModels.js +49 -0
- package/api/ml/getProfileTasks.d.ts +31 -0
- package/api/ml/getProfileTasks.js +49 -0
- package/api/ml/getStats.d.ts +31 -0
- package/api/ml/getStats.js +50 -0
- package/api/ml/getTool.d.ts +30 -0
- package/api/ml/getTool.js +49 -0
- package/api/ml/loadModel.d.ts +33 -0
- package/api/ml/loadModel.js +49 -0
- package/api/ml/predictModel.d.ts +36 -0
- package/api/ml/predictModel.js +50 -0
- package/api/ml/registerModel.d.ts +8 -3
- package/api/ml/registerModelMeta.d.ts +46 -0
- package/api/ml/registerModelMeta.js +47 -0
- package/api/ml/searchAgents.d.ts +36 -0
- package/api/ml/searchAgents.js +47 -0
- package/api/ml/searchMemory.d.ts +36 -0
- package/api/ml/searchMemory.js +47 -0
- package/api/ml/searchMessage.d.ts +37 -0
- package/api/ml/searchMessage.js +50 -0
- package/api/ml/searchModels.js +1 -1
- package/api/ml/searchTasks.d.ts +36 -0
- package/api/ml/searchTasks.js +47 -0
- package/api/ml/undeployModel.d.ts +8 -1
- package/api/ml/undeployModel.js +5 -5
- package/api/ml/unloadModel.d.ts +37 -0
- package/api/ml/unloadModel.js +49 -0
- package/api/ml/updateController.d.ts +37 -0
- package/api/ml/updateController.js +50 -0
- package/api/ml/updateMemory.d.ts +35 -0
- package/api/ml/updateMemory.js +50 -0
- package/api/ml/updateMessage.d.ts +40 -0
- package/api/ml/updateMessage.js +50 -0
- package/api/ml/updateModel.d.ts +44 -0
- package/api/ml/updateModel.js +50 -0
- package/api/ml/uploadChunk.d.ts +37 -0
- package/api/ml/uploadChunk.js +53 -0
- package/api/ml/uploadModel.d.ts +42 -0
- package/api/ml/uploadModel.js +47 -0
- package/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Uploads model chunk.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.chunk_model}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {number} params.chunk_number
|
|
29
|
+
* @param {string} params.model_id
|
|
30
|
+
* @param {object} [params.body]
|
|
31
|
+
*
|
|
32
|
+
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
33
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
34
|
+
*
|
|
35
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
36
|
+
*/
|
|
37
|
+
function chunkModelFunc(params, options, callback) {
|
|
38
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
39
|
+
if (params.chunk_number == null) return handleMissingParam('chunk_number', this, callback);
|
|
40
|
+
if (params.model_id == null) return handleMissingParam('model_id', this, callback);
|
|
41
|
+
|
|
42
|
+
let { body, chunk_number, model_id, ...querystring } = params;
|
|
43
|
+
chunk_number = parsePathParam(chunk_number);
|
|
44
|
+
model_id = parsePathParam(model_id);
|
|
45
|
+
|
|
46
|
+
const path = '/_plugins/_ml/models/' + model_id + '/chunk/' + chunk_number;
|
|
47
|
+
const method = 'POST';
|
|
48
|
+
body = body || '';
|
|
49
|
+
|
|
50
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
module.exports = chunkModelFunc;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { ApiResponse } from '../../lib/Transport'
|
|
18
|
+
import * as Common from '../_types/_common'
|
|
19
|
+
import * as Global from '../_types/_global'
|
|
20
|
+
import * as Ml_Common from '../_types/ml._common'
|
|
21
|
+
|
|
22
|
+
export interface Ml_CreateController_Request extends Global.Params {
|
|
23
|
+
body?: Ml_CreateController_RequestBody;
|
|
24
|
+
model_id: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type Ml_CreateController_RequestBody = {
|
|
28
|
+
user_rate_limiter?: Record<string, Ml_Common.RateLimiter>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Ml_CreateController_Response extends ApiResponse {
|
|
32
|
+
body: Ml_CreateController_ResponseBody;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type Ml_CreateController_ResponseBody = {
|
|
36
|
+
model_id?: Common.Name;
|
|
37
|
+
status?: Ml_Common.Status;
|
|
38
|
+
}
|
|
39
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Creates a controller.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.create_controller}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.model_id
|
|
29
|
+
* @param {object} [params.body]
|
|
30
|
+
*
|
|
31
|
+
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
32
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
33
|
+
*
|
|
34
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
35
|
+
*/
|
|
36
|
+
function createControllerFunc(params, options, callback) {
|
|
37
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
38
|
+
if (params.model_id == null) return handleMissingParam('model_id', this, callback);
|
|
39
|
+
|
|
40
|
+
let { body, model_id, ...querystring } = params;
|
|
41
|
+
model_id = parsePathParam(model_id);
|
|
42
|
+
|
|
43
|
+
const path = '/_plugins/_ml/controllers/' + model_id;
|
|
44
|
+
const method = 'POST';
|
|
45
|
+
body = body || '';
|
|
46
|
+
|
|
47
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = createControllerFunc;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { ApiResponse } from '../../lib/Transport'
|
|
18
|
+
import * as Common from '../_types/_common'
|
|
19
|
+
import * as Global from '../_types/_global'
|
|
20
|
+
|
|
21
|
+
export interface Ml_CreateMemory_Request extends Global.Params {
|
|
22
|
+
body?: Ml_CreateMemory_RequestBody;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type Ml_CreateMemory_RequestBody = {
|
|
26
|
+
name?: Common.Name;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface Ml_CreateMemory_Response extends ApiResponse {
|
|
30
|
+
body: Ml_CreateMemory_ResponseBody;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type Ml_CreateMemory_ResponseBody = {
|
|
34
|
+
memory_id: Common.Name;
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const { normalizeArguments } = require('../utils');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Create a memory.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.create_memory}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} [params]
|
|
28
|
+
* @param {object} [params.body]
|
|
29
|
+
*
|
|
30
|
+
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
31
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
32
|
+
*
|
|
33
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
34
|
+
*/
|
|
35
|
+
function createMemoryFunc(params, options, callback) {
|
|
36
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
|
|
38
|
+
let { body, ...querystring } = params;
|
|
39
|
+
|
|
40
|
+
const path = '/_plugins/_ml/memory';
|
|
41
|
+
const method = 'POST';
|
|
42
|
+
body = body || '';
|
|
43
|
+
|
|
44
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = createMemoryFunc;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { ApiResponse } from '../../lib/Transport'
|
|
18
|
+
import * as Common from '../_types/_common'
|
|
19
|
+
import * as Global from '../_types/_global'
|
|
20
|
+
import * as Ml_Common from '../_types/ml._common'
|
|
21
|
+
|
|
22
|
+
export interface Ml_CreateMessage_Request extends Global.Params {
|
|
23
|
+
body?: Ml_CreateMessage_RequestBody;
|
|
24
|
+
memory_id: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type Ml_CreateMessage_RequestBody = {
|
|
28
|
+
additional_info?: Ml_Common.AdditionalInfo;
|
|
29
|
+
input?: string;
|
|
30
|
+
origin?: string;
|
|
31
|
+
prompt_template?: string;
|
|
32
|
+
response?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface Ml_CreateMessage_Response extends ApiResponse {
|
|
36
|
+
body: Ml_CreateMessage_ResponseBody;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type Ml_CreateMessage_ResponseBody = {
|
|
40
|
+
message_id: Common.Name;
|
|
41
|
+
}
|
|
42
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Create a message.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.create_message}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.memory_id
|
|
29
|
+
* @param {object} [params.body]
|
|
30
|
+
*
|
|
31
|
+
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
32
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
33
|
+
*
|
|
34
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
35
|
+
*/
|
|
36
|
+
function createMessageFunc(params, options, callback) {
|
|
37
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
38
|
+
if (params.memory_id == null) return handleMissingParam('memory_id', this, callback);
|
|
39
|
+
|
|
40
|
+
let { body, memory_id, ...querystring } = params;
|
|
41
|
+
memory_id = parsePathParam(memory_id);
|
|
42
|
+
|
|
43
|
+
const path = '/_plugins/_ml/memory/' + memory_id + '/messages';
|
|
44
|
+
const method = 'POST';
|
|
45
|
+
body = body || '';
|
|
46
|
+
|
|
47
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = createMessageFunc;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { ApiResponse } from '../../lib/Transport'
|
|
18
|
+
import * as Common from '../_types/_common'
|
|
19
|
+
import * as Global from '../_types/_global'
|
|
20
|
+
import * as Ml_Common from '../_types/ml._common'
|
|
21
|
+
|
|
22
|
+
export interface Ml_CreateModelMeta_Request extends Global.Params {
|
|
23
|
+
body?: Ml_CreateModelMeta_RequestBody;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type Ml_CreateModelMeta_RequestBody = {
|
|
27
|
+
description?: string;
|
|
28
|
+
model_config: Ml_Common.ModelConfig;
|
|
29
|
+
model_content_hash_value: string;
|
|
30
|
+
model_format: Ml_Common.ModelFormat;
|
|
31
|
+
model_group_id?: Common.Id;
|
|
32
|
+
name: string;
|
|
33
|
+
total_chunks: number;
|
|
34
|
+
url?: string;
|
|
35
|
+
version: Common.VersionString;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface Ml_CreateModelMeta_Response extends ApiResponse {
|
|
39
|
+
body: Ml_CreateModelMeta_ResponseBody;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type Ml_CreateModelMeta_ResponseBody = {
|
|
43
|
+
model_id: string;
|
|
44
|
+
status: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const { normalizeArguments } = require('../utils');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Registers model metadata.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.create_model_meta}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} [params]
|
|
28
|
+
* @param {object} [params.body]
|
|
29
|
+
*
|
|
30
|
+
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
31
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
32
|
+
*
|
|
33
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
34
|
+
*/
|
|
35
|
+
function createModelMetaFunc(params, options, callback) {
|
|
36
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
|
|
38
|
+
let { body, ...querystring } = params;
|
|
39
|
+
|
|
40
|
+
const path = '/_plugins/_ml/models/meta';
|
|
41
|
+
const method = 'POST';
|
|
42
|
+
body = body || '';
|
|
43
|
+
|
|
44
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = createModelMetaFunc;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { ApiResponse } from '../../lib/Transport'
|
|
18
|
+
import * as Common from '../_types/_common'
|
|
19
|
+
import * as Global from '../_types/_global'
|
|
20
|
+
|
|
21
|
+
export interface Ml_DeleteController_Request extends Global.Params {
|
|
22
|
+
model_id: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Ml_DeleteController_Response extends ApiResponse {
|
|
26
|
+
body: Ml_DeleteController_ResponseBody;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type Ml_DeleteController_ResponseBody = Common.WriteResponseBase
|
|
30
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Deletes a controller.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.delete_controller}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.model_id
|
|
29
|
+
*
|
|
30
|
+
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
31
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
32
|
+
*
|
|
33
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
34
|
+
*/
|
|
35
|
+
function deleteControllerFunc(params, options, callback) {
|
|
36
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
if (params.model_id == null) return handleMissingParam('model_id', this, callback);
|
|
38
|
+
|
|
39
|
+
let { body, model_id, ...querystring } = params;
|
|
40
|
+
model_id = parsePathParam(model_id);
|
|
41
|
+
|
|
42
|
+
const path = '/_plugins/_ml/controllers/' + model_id;
|
|
43
|
+
const method = 'DELETE';
|
|
44
|
+
body = body || '';
|
|
45
|
+
|
|
46
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
module.exports = deleteControllerFunc;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { ApiResponse } from '../../lib/Transport'
|
|
18
|
+
import * as Global from '../_types/_global'
|
|
19
|
+
|
|
20
|
+
export interface Ml_DeleteMemory_Request extends Global.Params {
|
|
21
|
+
memory_id: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface Ml_DeleteMemory_Response extends ApiResponse {
|
|
25
|
+
body: Ml_DeleteMemory_ResponseBody;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type Ml_DeleteMemory_ResponseBody = {
|
|
29
|
+
success: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Delete a memory.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.delete_memory}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.memory_id
|
|
29
|
+
*
|
|
30
|
+
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
31
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
32
|
+
*
|
|
33
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
34
|
+
*/
|
|
35
|
+
function deleteMemoryFunc(params, options, callback) {
|
|
36
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
if (params.memory_id == null) return handleMissingParam('memory_id', this, callback);
|
|
38
|
+
|
|
39
|
+
let { body, memory_id, ...querystring } = params;
|
|
40
|
+
memory_id = parsePathParam(memory_id);
|
|
41
|
+
|
|
42
|
+
const path = '/_plugins/_ml/memory/' + memory_id;
|
|
43
|
+
const method = 'DELETE';
|
|
44
|
+
body = body || '';
|
|
45
|
+
|
|
46
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
module.exports = deleteMemoryFunc;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { ApiResponse } from '../../lib/Transport'
|
|
18
|
+
import * as Global from '../_types/_global'
|
|
19
|
+
import * as Ml_Common from '../_types/ml._common'
|
|
20
|
+
|
|
21
|
+
export interface Ml_ExecuteAgent_Request extends Global.Params {
|
|
22
|
+
agent_id: string;
|
|
23
|
+
body?: Ml_ExecuteAgent_RequestBody;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type Ml_ExecuteAgent_RequestBody = {
|
|
27
|
+
parameters: Ml_Common.Parameters;
|
|
28
|
+
'parameters.verbose'?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Ml_ExecuteAgent_Response extends ApiResponse {
|
|
32
|
+
body: Ml_ExecuteAgent_ResponseBody;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type Ml_ExecuteAgent_ResponseBody = Ml_Common.PredictResponse
|
|
36
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Execute an agent.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.execute_agent}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.agent_id
|
|
29
|
+
* @param {object} [params.body]
|
|
30
|
+
*
|
|
31
|
+
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
32
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
33
|
+
*
|
|
34
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
35
|
+
*/
|
|
36
|
+
function executeAgentFunc(params, options, callback) {
|
|
37
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
38
|
+
if (params.agent_id == null) return handleMissingParam('agent_id', this, callback);
|
|
39
|
+
|
|
40
|
+
let { body, agent_id, ...querystring } = params;
|
|
41
|
+
agent_id = parsePathParam(agent_id);
|
|
42
|
+
|
|
43
|
+
const path = '/_plugins/_ml/agents/' + agent_id + '/_execute';
|
|
44
|
+
const method = 'POST';
|
|
45
|
+
body = body || '';
|
|
46
|
+
|
|
47
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = executeAgentFunc;
|