Skip to content

Commit b9da036

Browse files
Auto-generated API code
1 parent 83b3a34 commit b9da036

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

src/Endpoints/Inference.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,48 @@ public function putMistral(?array $params = null)
11551155
}
11561156

11571157

1158+
/**
1159+
* Create an Nvidia inference endpoint
1160+
*
1161+
* @link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-nvidia
1162+
*
1163+
* @param array{
1164+
* task_type: string, // (REQUIRED) The task type
1165+
* nvidia_inference_id: string, // (REQUIRED) The inference ID
1166+
* timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created.
1167+
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
1168+
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
1169+
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
1170+
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1171+
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
1172+
* body: string|array<mixed>, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON.
1173+
* } $params
1174+
*
1175+
* @throws MissingParameterException if a required parameter is missing
1176+
* @throws NoNodeAvailableException if all the hosts are offline
1177+
* @throws ClientResponseException if the status code of response is 4xx
1178+
* @throws ServerResponseException if the status code of response is 5xx
1179+
*
1180+
* @return Elasticsearch|Promise
1181+
*/
1182+
public function putNvidia(?array $params = null)
1183+
{
1184+
$params = $params ?? [];
1185+
$this->checkRequiredParameters(['task_type','nvidia_inference_id','body'], $params);
1186+
$url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['nvidia_inference_id']);
1187+
$method = 'PUT';
1188+
1189+
$url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']);
1190+
$headers = [
1191+
'Accept' => 'application/json',
1192+
'Content-Type' => 'application/json',
1193+
];
1194+
$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1195+
$request = $this->addOtelAttributes($params, ['task_type', 'nvidia_inference_id'], $request, 'inference.put_nvidia');
1196+
return $this->client->sendRequest($request);
1197+
}
1198+
1199+
11581200
/**
11591201
* Create an OpenAI inference endpoint
11601202
*

src/Endpoints/Ml.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2693,6 +2693,7 @@ public function stopDataFrameAnalytics(?array $params = null)
26932693
* datafeed_id: string, // (REQUIRED) The ID of the datafeed to stop
26942694
* allow_no_match?: bool, // Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
26952695
* force?: bool, // True if the datafeed should be forcefully stopped.
2696+
* close_job?: bool, // True if the job associated with the datafeed should be closed.
26962697
* timeout?: int|string, // Controls the time to wait until a datafeed has stopped. Default to 20 seconds
26972698
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
26982699
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
@@ -2716,7 +2717,7 @@ public function stopDatafeed(?array $params = null)
27162717
$url = '/_ml/datafeeds/' . $this->encode($params['datafeed_id']) . '/_stop';
27172718
$method = 'POST';
27182719

2719-
$url = $this->addQueryString($url, $params, ['allow_no_match','force','timeout','pretty','human','error_trace','source','filter_path']);
2720+
$url = $this->addQueryString($url, $params, ['allow_no_match','force','close_job','timeout','pretty','human','error_trace','source','filter_path']);
27202721
$headers = [
27212722
'Accept' => 'application/json',
27222723
'Content-Type' => 'application/json',

0 commit comments

Comments
 (0)