Skip to content

Commit dbc2727

Browse files
committed
Update APIs to 8.2-SNAPSHOT
1 parent 2b08af5 commit dbc2727

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

elasticsearch/_async/client/ml.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,6 +2144,7 @@ async def infer_trained_model_deployment(
21442144
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
21452145
] = None,
21462146
human: t.Optional[bool] = None,
2147+
inference_config: t.Optional[t.Mapping[str, t.Any]] = None,
21472148
pretty: t.Optional[bool] = None,
21482149
timeout: t.Optional[t.Union[int, str]] = None,
21492150
) -> ObjectApiResponse[t.Any]:
@@ -2156,6 +2157,8 @@ async def infer_trained_model_deployment(
21562157
:param docs: An array of objects to pass to the model for inference. The objects
21572158
should contain a field matching your configured trained model input. Typically,
21582159
the field name is `text_field`. Currently, only a single value is allowed.
2160+
:param inference_config: The inference configuration updates to apply on the
2161+
API call
21592162
:param timeout: Controls the amount of time to wait for inference results.
21602163
"""
21612164
if model_id in SKIP_IN_PATH:
@@ -2173,6 +2176,8 @@ async def infer_trained_model_deployment(
21732176
__query["filter_path"] = filter_path
21742177
if human is not None:
21752178
__query["human"] = human
2179+
if inference_config is not None:
2180+
__body["inference_config"] = inference_config
21762181
if pretty is not None:
21772182
__query["pretty"] = pretty
21782183
if timeout is not None:

elasticsearch/_async/client/transform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ async def update_transform(
569569
human: t.Optional[bool] = None,
570570
meta: t.Optional[t.Mapping[str, t.Any]] = None,
571571
pretty: t.Optional[bool] = None,
572-
retention_policy: t.Optional[t.Mapping[str, t.Any]] = None,
572+
retention_policy: t.Optional[t.Union[None, t.Mapping[str, t.Any]]] = None,
573573
settings: t.Optional[t.Mapping[str, t.Any]] = None,
574574
source: t.Optional[t.Mapping[str, t.Any]] = None,
575575
sync: t.Optional[t.Mapping[str, t.Any]] = None,

elasticsearch/_sync/client/ml.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,6 +2144,7 @@ def infer_trained_model_deployment(
21442144
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
21452145
] = None,
21462146
human: t.Optional[bool] = None,
2147+
inference_config: t.Optional[t.Mapping[str, t.Any]] = None,
21472148
pretty: t.Optional[bool] = None,
21482149
timeout: t.Optional[t.Union[int, str]] = None,
21492150
) -> ObjectApiResponse[t.Any]:
@@ -2156,6 +2157,8 @@ def infer_trained_model_deployment(
21562157
:param docs: An array of objects to pass to the model for inference. The objects
21572158
should contain a field matching your configured trained model input. Typically,
21582159
the field name is `text_field`. Currently, only a single value is allowed.
2160+
:param inference_config: The inference configuration updates to apply on the
2161+
API call
21592162
:param timeout: Controls the amount of time to wait for inference results.
21602163
"""
21612164
if model_id in SKIP_IN_PATH:
@@ -2173,6 +2176,8 @@ def infer_trained_model_deployment(
21732176
__query["filter_path"] = filter_path
21742177
if human is not None:
21752178
__query["human"] = human
2179+
if inference_config is not None:
2180+
__body["inference_config"] = inference_config
21762181
if pretty is not None:
21772182
__query["pretty"] = pretty
21782183
if timeout is not None:

elasticsearch/_sync/client/transform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def update_transform(
569569
human: t.Optional[bool] = None,
570570
meta: t.Optional[t.Mapping[str, t.Any]] = None,
571571
pretty: t.Optional[bool] = None,
572-
retention_policy: t.Optional[t.Mapping[str, t.Any]] = None,
572+
retention_policy: t.Optional[t.Union[None, t.Mapping[str, t.Any]]] = None,
573573
settings: t.Optional[t.Mapping[str, t.Any]] = None,
574574
source: t.Optional[t.Mapping[str, t.Any]] = None,
575575
sync: t.Optional[t.Mapping[str, t.Any]] = None,

0 commit comments

Comments
 (0)