Skip to content

Commit a6bb5f3

Browse files
Auto-generated API code (#2357)
1 parent a94eccc commit a6bb5f3

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

elasticsearch/_async/client/ml.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3303,6 +3303,7 @@ async def put_trained_model_vocabulary(
33033303
human: t.Optional[bool] = None,
33043304
merges: t.Optional[t.Sequence[str]] = None,
33053305
pretty: t.Optional[bool] = None,
3306+
scores: t.Optional[t.Sequence[float]] = None,
33063307
) -> ObjectApiResponse[t.Any]:
33073308
"""
33083309
Creates a trained model vocabulary
@@ -3312,6 +3313,7 @@ async def put_trained_model_vocabulary(
33123313
:param model_id: The unique identifier of the trained model.
33133314
:param vocabulary: The model vocabulary, which must not be empty.
33143315
:param merges: The optional model merges if required by the tokenizer.
3316+
:param scores: The optional vocabulary value scores if required by the tokenizer.
33153317
"""
33163318
if model_id in SKIP_IN_PATH:
33173319
raise ValueError("Empty value passed for parameter 'model_id'")
@@ -3332,6 +3334,8 @@ async def put_trained_model_vocabulary(
33323334
__body["merges"] = merges
33333335
if pretty is not None:
33343336
__query["pretty"] = pretty
3337+
if scores is not None:
3338+
__body["scores"] = scores
33353339
__headers = {"accept": "application/json", "content-type": "application/json"}
33363340
return await self.perform_request( # type: ignore[return-value]
33373341
"PUT", __path, params=__query, headers=__headers, body=__body

elasticsearch/_async/client/transform.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ async def delete_transform(
2929
self,
3030
*,
3131
transform_id: str,
32+
delete_dest_index: t.Optional[bool] = None,
3233
error_trace: t.Optional[bool] = None,
3334
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3435
force: t.Optional[bool] = None,
@@ -42,6 +43,9 @@ async def delete_transform(
4243
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-transform.html>`_
4344
4445
:param transform_id: Identifier for the transform.
46+
:param delete_dest_index: If this value is true, the destination index is deleted
47+
together with the transform. If false, the destination index will not be
48+
deleted
4549
:param force: If this value is false, the transform must be stopped before it
4650
can be deleted. If true, the transform is deleted regardless of its current
4751
state.
@@ -52,6 +56,8 @@ async def delete_transform(
5256
raise ValueError("Empty value passed for parameter 'transform_id'")
5357
__path = f"/_transform/{_quote(transform_id)}"
5458
__query: t.Dict[str, t.Any] = {}
59+
if delete_dest_index is not None:
60+
__query["delete_dest_index"] = delete_dest_index
5561
if error_trace is not None:
5662
__query["error_trace"] = error_trace
5763
if filter_path is not None:

elasticsearch/_sync/client/ml.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3303,6 +3303,7 @@ def put_trained_model_vocabulary(
33033303
human: t.Optional[bool] = None,
33043304
merges: t.Optional[t.Sequence[str]] = None,
33053305
pretty: t.Optional[bool] = None,
3306+
scores: t.Optional[t.Sequence[float]] = None,
33063307
) -> ObjectApiResponse[t.Any]:
33073308
"""
33083309
Creates a trained model vocabulary
@@ -3312,6 +3313,7 @@ def put_trained_model_vocabulary(
33123313
:param model_id: The unique identifier of the trained model.
33133314
:param vocabulary: The model vocabulary, which must not be empty.
33143315
:param merges: The optional model merges if required by the tokenizer.
3316+
:param scores: The optional vocabulary value scores if required by the tokenizer.
33153317
"""
33163318
if model_id in SKIP_IN_PATH:
33173319
raise ValueError("Empty value passed for parameter 'model_id'")
@@ -3332,6 +3334,8 @@ def put_trained_model_vocabulary(
33323334
__body["merges"] = merges
33333335
if pretty is not None:
33343336
__query["pretty"] = pretty
3337+
if scores is not None:
3338+
__body["scores"] = scores
33353339
__headers = {"accept": "application/json", "content-type": "application/json"}
33363340
return self.perform_request( # type: ignore[return-value]
33373341
"PUT", __path, params=__query, headers=__headers, body=__body

elasticsearch/_sync/client/transform.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def delete_transform(
2929
self,
3030
*,
3131
transform_id: str,
32+
delete_dest_index: t.Optional[bool] = None,
3233
error_trace: t.Optional[bool] = None,
3334
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3435
force: t.Optional[bool] = None,
@@ -42,6 +43,9 @@ def delete_transform(
4243
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-transform.html>`_
4344
4445
:param transform_id: Identifier for the transform.
46+
:param delete_dest_index: If this value is true, the destination index is deleted
47+
together with the transform. If false, the destination index will not be
48+
deleted
4549
:param force: If this value is false, the transform must be stopped before it
4650
can be deleted. If true, the transform is deleted regardless of its current
4751
state.
@@ -52,6 +56,8 @@ def delete_transform(
5256
raise ValueError("Empty value passed for parameter 'transform_id'")
5357
__path = f"/_transform/{_quote(transform_id)}"
5458
__query: t.Dict[str, t.Any] = {}
59+
if delete_dest_index is not None:
60+
__query["delete_dest_index"] = delete_dest_index
5561
if error_trace is not None:
5662
__query["error_trace"] = error_trace
5763
if filter_path is not None:

0 commit comments

Comments
 (0)